Skip to content

Commit

Permalink
Fix pylint and test suite (11th) - rebased on develop and fix broken …
Browse files Browse the repository at this point in the history
…tests :)
  • Loading branch information
mohierf committed May 26, 2017
1 parent 50a51e4 commit f93316a
Show file tree
Hide file tree
Showing 43 changed files with 1,438 additions and 9 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions test_load/cfg/passive_daemons/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This configuration is built as such:
# - the 6 standard alignak daemons
# - a localhost host that is checked with _internal host check and that has no services
# - this host is in the only existing realm (All)
# - this host has 5 services that each run the script ./dummy_command.sh
# - services are: ok, warning, critical, unknown and timeout, thus to check that poller workers
# run correctly the checks action and that the reactionner daemon run correctly its actions
# - the 4 first services are run normally, the last one raises a timeout alert
# - one more service that uses the internal _echo command that set the same state as the current
# one, thus the default initial state
255 changes: 255 additions & 0 deletions test_load/cfg/passive_daemons/alignak.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
# --------------------------------------------------------------------
# Alignak main configuration file
# --------------------------------------------------------------------
# This file is the main file that will be loaded by Alignak on boot.
# It is the entry point for the framework configuration.
# --------------------------------------------------------------------
# Please see the official project documentation for documentation about
# the configuration:
# http://alignak-doc.readthedocs.io/en/latest/04_configuration/index.html
# --------------------------------------------------------------------

# -------------------------------------------------------------------------
# Monitored objects configuration part
# -------------------------------------------------------------------------
# Configuration files with common objects like commands, timeperiods,
# or templates that are used by the host/service/contacts
cfg_dir=arbiter/objects

# Templates and packs for hosts, services and contacts
cfg_dir=arbiter/templates

# Alignak daemons and modules are loaded
cfg_dir=arbiter/daemons

# Alignak extra realms
cfg_dir=arbiter/realms

# You will find global MACROS into the files in those directories
cfg_dir=arbiter/resource.d

# -------------------------------------------------------------------------
# Alignak framework configuration part
# -------------------------------------------------------------------------

# Notifications configuration
# ---
# Notifications are enabled/disabled
# enable_notifications=1

# After a timeout, launched plugins are killed
#notification_timeout=30


# Retention configuration
# ---
# Number of minutes between 2 retention save, default is 60 minutes
#retention_update_interval=60

# Checks configuration
# ---
# Active host/service checks are enabled/disabled
#execute_host_checks=1
#execute_service_checks=1

# Passive host/service checks are enabled/disabled
#accept_passive_host_checks=1
#accept_passive_service_checks=1

# As default, passive host checks are HARD states
#passive_host_checks_are_soft=0


# Interval length and re-scheduling configuration
# Do not change those values unless you are reaaly sure to master what you are doing ...
#interval_length=60
#auto_reschedule_checks=1
auto_rescheduling_interval=1
auto_rescheduling_window=180


# Number of interval to spread the first checks for hosts and services
# Default is 30
#max_service_check_spread=30
max_service_check_spread=5
# Default is 30
#max_host_check_spread=30
max_host_check_spread=5


# Max plugin output for the plugins launched by the pollers, in bytes
#max_plugins_output_length=8192
max_plugins_output_length=65536


# After a timeout, launched plugins are killed
# and the host state is set to a default value (2 for DOWN)
# and the service state is set to a default value (2 for CRITICAL)
#host_check_timeout=30
##### Set to 5 for tests
host_check_timeout=5
#service_check_timeout=60
##### Set to 5 for tests
service_check_timeout=5
#timeout_exit_status=2
#event_handler_timeout=30
#notification_timeout=30
#ocsp_timeout=15
#ohsp_timeout=15


# Freshness check
# Default is enabled for hosts and services
#check_host_freshness=1
#check_service_freshness=1
# Default is 60 for hosts and services
#host_freshness_check_interval=60
#service_freshness_check_interval=60
# Extra time for freshness check ...
#additional_freshness_latency=15


# Flapping detection configuration
# ---
# Default is enabled
#enable_flap_detection=1

# Flapping threshold for hosts and services
#low_service_flap_threshold=20
#high_service_flap_threshold=30
#low_host_flap_threshold=20
#high_host_flap_threshold=30

# flap_history is the lengh of history states we keep to look for flapping.
# 20 by default, can be useful to increase it. Each flap_history increases cost:
# flap_history cost = 4Bytes * flap_history * (nb hosts + nb services)
# Example: 4 * 20 * (1000+10000) ~ 900Ko for a quite big conf. So, go for it!
#flap_history=20


# Performance data configuration
# ---
# Performance data management is enabled/disabled
#process_performance_data=1

# Performance data commands
#host_perfdata_command=
#service_perfdata_command=

# After a timeout, launched plugins are killed
#event_handler_timeout=30


# Event handlers configuration
# ---
# Event handlers are enabled/disabled
#enable_event_handlers=1

# By default don't launch even handlers during downtime. Put 0 to
# get back the default nagios behavior
no_event_handlers_during_downtimes=1

# Global host/service event handlers
#global_host_event_handler=
#global_service_event_handler=

# After a timeout, launched plugins are killed
#event_handler_timeout=30


# External commands configuration
# ---
# External commands are enabled/disabled
# check_external_commands=1

# By default don't launch even handlers during downtime. Put 0 to
# get back the default nagios behavior
no_event_handlers_during_downtimes=1


# Impacts configuration
# ---
# Enable or not the state change on impact detection (like a host going unreachable
# if a parent is DOWN for example). It's for services and hosts.
# Note: defaults to 0 for Nagios old behavior compatibility
#enable_problem_impacts_states_change=0
enable_problem_impacts_states_change=1


# if 1, disable all notice and warning messages at
# configuration checking when arbiter checks the configuration.
# Default is to log the notices and warnings
#disable_old_nagios_parameters_whining=0
disable_old_nagios_parameters_whining=1


# Environment macros configuration
# ---
# Disabling environment macros is good for performance. If you really need it, enable it.
#enable_environment_macros=1
enable_environment_macros=0


# Monitoring log configuration
# ---
# Note that alerts and downtimes are always logged
# ---
# Notifications
# log_notifications=1

# Services retries
# log_service_retries=1

# Hosts retries
# log_host_retries=1

# Event handlers
# log_event_handlers=1

# Flappings
# log_flappings=1

# Snapshots
# log_snapshots=1

# External commands
# log_external_commands=1

# Active checks
# log_active_checks=0

# Passive checks
# log_passive_checks=0

# Initial states
# log_initial_states=1


# [Optional], a pack distribution file is a local file near the arbiter
# that will keep host pack id association, and so push same host on the same
# scheduler if possible between restarts.
pack_distribution_file=/tmp/var/lib/alignak/pack_distribution.dat


# If you need to set a specific timezone to your deamons, uncomment it
#use_timezone=Europe/Paris


# --------------------------------------------------------------------
## Alignak internal metrics
# --------------------------------------------------------------------
# Export all alignak inner performances into a statsd server.
# By default at localhost:8125 (UDP) with the alignak prefix
# Default is not enabled
#statsd_host=localhost
#statsd_port=8125
#statsd_prefix=alignak
#statsd_enabled=0


# --------------------------------------------------------------------
## Arbiter daemon part, similar to daemon ini file
# --------------------------------------------------------------------
#
# Those parameters are defined in the arbiterd.ini file
#
43 changes: 43 additions & 0 deletions test_load/cfg/passive_daemons/arbiter/daemons/arbiter-master.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#===============================================================================
# ARBITER
#===============================================================================
# Description: The Arbiter is responsible for:
# - Loading, manipulating and dispatching the configuration
# - Validating the health of all other Alignak daemons
# - Issuing global directives to Alignak daemons (kill, activate-spare, etc.)
# https://alignak.readthedocs.org/en/latest/08_configobjects/arbiter.html
#===============================================================================
# IMPORTANT: If you use several arbiters you MUST set the host_name on each
# servers to its real DNS name ('hostname' command).
#===============================================================================
define arbiter {
arbiter_name arbiter-master
#host_name node1 ; CHANGE THIS if you have several Arbiters (like with a spare)
address 127.0.0.1
port 7770

## Realm
#realm All

## Modules
# Default: None
## Interesting modules:
# - backend_arbiter = get the monitored objects configuration from the Alignak backend
#modules backend_arbiter

## Optional parameters:
## Uncomment these lines in a HA architecture so the master and slaves know
## how long they may wait for each other.
#timeout 3 ; Ping timeout
#data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 5 ; Ping node every N seconds

# In a HA architecture this daemon can be a spare
spare 0 ; 1 = is a spare, 0 = is not a spare

# Enable https or not
use_ssl 0
# enable certificate/hostname check, will avoid man in the middle attacks
hard_ssl_name_check 0
}
48 changes: 48 additions & 0 deletions test_load/cfg/passive_daemons/arbiter/daemons/broker-master.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#===============================================================================
# BROKER (S1_Broker)
#===============================================================================
# Description: The broker is responsible for:
# - Exporting centralized logs of all Alignak daemon processes
# - Exporting status data
# - Exporting performance data
# - Exposing Alignak APIs:
# - Status data
# - Performance data
# - Configuration data
# - Command interface
# https://alignak.readthedocs.org/en/latest/08_configobjects/broker.html
#===============================================================================
define broker {
broker_name broker-master
address 127.0.0.1
port 7772

## Realm
#realm All

## Modules
# Default: None
# Interesting modules that can be used:
# - backend_broker = update the live state in the Alignak backend
# - logs = create a log for all monitoring events (alerts, acknowledges, ...)
#modules backend_broker, logs

## Optional parameters:
timeout 3 ; Ping timeout
data_timeout 120 ; Data send timeout
max_check_attempts 3 ; If ping fails N or more, then the node is dead
check_interval 60 ; Ping node every N seconds

# In a HA architecture this daemon can be a spare
spare 0 ; 1 = is a spare, 0 = is not a spare

# Enable https or not
use_ssl 0
# enable certificate/hostname check, will avoid man in the middle attacks
hard_ssl_name_check 0

## Advanced parameters:
manage_arbiters 1 ; Take data from Arbiter. There should be only one
; broker for the arbiter.
manage_sub_realms 1 ; Does it take jobs from schedulers of sub-Realms?
}
Loading

0 comments on commit f93316a

Please sign in to comment.