shinken Package¶
shinken Package¶
acknowledge Module¶
- class shinken.acknowledge.Acknowledge(ref, sticky, notify, persistent, author, comment, end_time=0)[source]¶
Allows you to acknowledge the current problem for the specified service. By acknowledging the current problem, future notifications (for the same servicestate) are disabled.
- id = 1¶
- properties = {'comment': None, 'author': None, 'sticky': None, 'end_time': None, 'id': None, 'notify': None}¶
action Module¶
arbiterlink Module¶
- class shinken.arbiterlink.ArbiterLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
- id = 0¶
- my_type = 'arbiter'¶
- properties = {'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633f5f5410>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'host_name': <shinken.property.StringProp object at 0x7f633f5f53d0>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>, 'arbiter_name': <shinken.property.StringProp object at 0x7f633f5f5390>}¶
- class shinken.arbiterlink.ArbiterLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
- inner_class¶
alias of ArbiterLink
- name_property = 'name'¶
autoslots Module¶
The AutoSlots Class is a MetaClass: it manages how other classes are created (Classes, not instances of theses classes). Here it’s role is to create the __slots__ list of the class with all properties of Class.properties and Class.running_properties so we do not have to add manually all properties to the __slots__ list when we add a new entry
basemodule Module¶
This python module contains the class BaseModule that shinken modules will subclass
- class shinken.basemodule.BaseModule(mod_conf)[source]¶
Bases: object
This is the base class for the shinken modules. Modules can be used by the different shinken daemons/services for different tasks. Example of task that a shinken module can do:
- load additional configuration objects.
- recurrently save hosts/services status/perfdata informations in different format.
- ...
- create_queues(manager=None)[source]¶
The manager is None on android, but a true Manager() elsewhere Create the shared queues that will be used by shinken daemon process and this module process. But clear queues if they were already set before recreating new one.
- do_loop_turn()[source]¶
For external modules only: implement in this method the body of you main loop
- do_stop()[source]¶
Called just before the module will exit Put in this method all you need to cleanly release all open resources used by your module
- init()[source]¶
Handle this module “post” init ; just before it’ll be started. Like just open necessaries file(s), database(s), or whatever the module will need.
- manage_brok(brok)[source]¶
Request the module to manage the given brok. There a lot of different possible broks to manage.
- set_exit_handler(sigs=None)¶
- work()¶
module “main” method. Only used by external modules.
bin Module¶
This file is to be imported by every Shinken service component: Arbiter, Scheduler, etc. It just checks for the main requirement of Shinken.
borg Module¶
brok Module¶
brokerlink Module¶
- class shinken.brokerlink.BrokerLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
TODO: Add some comment about this class for the doc
- id = 0¶
- my_type = 'broker'¶
- properties = {'broker_name': <shinken.property.StringProp object at 0x7f633f2b2950>, 'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633f2b2990>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>}¶
- class shinken.brokerlink.BrokerLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
TODO: Add some comment about this class for the doc
- inner_class¶
alias of BrokerLink
- name_property = 'broker_name'¶
check Module¶
- class shinken.check.Check(status, command, ref, t_to_go, dep_check=None, id=None, timeout=10, poller_tag='None', reactionner_tag='None', env={}, module_type='fork', from_trigger=False, dependency_check=False)[source]¶
Bases: shinken.action.Action
ODO: Add some comment about this class for the doc
- check_time¶
- check_type¶
- copy_shell()[source]¶
return a copy of the check but just what is important for execution So we remove the ref and all
- dep_check¶
- depend_on¶
- env¶
- execution_time¶
- exit_status¶
- from_trigger¶
- internal¶
- is_a¶
- long_output¶
- module_type¶
- my_type = 'check'¶
- output¶
- perf_data¶
- poller_tag¶
- properties = {'check_type': <shinken.property.IntegerProp object at 0x7f633f419750>, 'exit_status': <shinken.property.IntegerProp object at 0x7f633f4192d0>, 'reactionner_tag': <shinken.property.StringProp object at 0x7f633fb34e10>, 's_time': <shinken.property.FloatProp object at 0x7f633f419490>, 'check_time': <shinken.property.IntegerProp object at 0x7f633f419e90>, 'long_output': <shinken.property.StringProp object at 0x7f633f419290>, 'state': <shinken.property.IntegerProp object at 0x7f633f419610>, 'internal': <shinken.property.BoolProp object at 0x7f633fb34650>, 'u_time': <shinken.property.FloatProp object at 0x7f633f419cd0>, 'env': <shinken.property.StringProp object at 0x7f633fb348d0>, 'ref': <shinken.property.IntegerProp object at 0x7f633f419d90>, 'from_trigger': <shinken.property.BoolProp object at 0x7f633fb34610>, 'status': <shinken.property.StringProp object at 0x7f633f419250>, 'execution_time': <shinken.property.FloatProp object at 0x7f633f419150>, 'worker': <shinken.property.StringProp object at 0x7f633fb34810>, 't_to_go': <shinken.property.IntegerProp object at 0x7f633f419050>, 'module_type': <shinken.property.StringProp object at 0x7f633fb34350>, 'dep_check': <shinken.property.StringProp object at 0x7f633f419ed0>, '_in_timeout': <shinken.property.BoolProp object at 0x7f633f4194d0>, 'type': <shinken.property.StringProp object at 0x7f633f4196d0>, 'depend_on': <shinken.property.StringProp object at 0x7f633f419510>, 'is_a': <shinken.property.StringProp object at 0x7f633f419d50>, 'poller_tag': <shinken.property.StringProp object at 0x7f633f4191d0>, 'output': <shinken.property.StringProp object at 0x7f633f419450>, 'perf_data': <shinken.property.StringProp object at 0x7f633f419110>}¶
- reactionner_tag¶
- ref¶
- s_time¶
- state¶
- status¶
- t_to_go¶
- type¶
- u_time¶
- worker¶
commandcall Module¶
- class shinken.commandcall.CommandCall(commands, call, poller_tag='None', reactionner_tag='None')[source]¶
Bases: shinken.commandcall.DummyCommandCall
This class is use when a service, contact or host define a command with args.
- args¶
- call¶
- command¶
- get_command_and_args()[source]¶
We want to get the command and the args with ! splitting. but don’t forget to protect against the ! to do not split them
- id = 0¶
- late_relink_done¶
- module_type¶
- my_type = 'CommandCall'¶
- poller_tag¶
- properties = {'poller_tag': <shinken.property.StringProp object at 0x7f633f512090>, 'reactionner_tag': <shinken.property.StringProp object at 0x7f633f512610>, 'valid': <shinken.property.BoolProp object at 0x7f633f512450>, 'call': <shinken.property.StringProp object at 0x7f633f512710>, 'timeout': <shinken.property.IntegerProp object at 0x7f633f512150>, 'late_relink_done': <shinken.property.BoolProp object at 0x7f633f512c90>, 'command': <shinken.property.StringProp object at 0x7f633f512d50>, 'args': <shinken.property.StringProp object at 0x7f633f512690>, 'module_type': <shinken.property.StringProp object at 0x7f633f512790>}¶
- reactionner_tag¶
- timeout¶
- valid¶
comment Module¶
- class shinken.comment.Comment(ref, persistent, author, comment, comment_type, entry_type, source, expires, expire_time)[source]¶
- id = 1¶
- properties = {'comment': None, 'source': None, 'entry_time': None, 'comment_type': None, 'author': None, 'expire_time': None, 'entry_type': None, 'can_be_deleted': None, 'expires': None, 'persistent': None}¶
complexexpression Module¶
contactdowntime Module¶
daemon Module¶
- class shinken.daemon.Daemon(name, config_file, is_daemon, do_replace, debug, debug_file)[source]¶
Bases: object
- properties = {'server_cert': <shinken.property.StringProp object at 0x7f633f4ed710>, 'workdir': <shinken.property.PathProp object at 0x7f633f110b10>, 'ca_cert': <shinken.property.StringProp object at 0x7f633f4ed950>, 'hard_ssl_name_check': <shinken.property.BoolProp object at 0x7f633f4ede50>, 'host': <shinken.property.StringProp object at 0x7f633f4ed750>, 'spare': <shinken.property.BoolProp object at 0x7f633f6d6a90>, 'user': <shinken.property.StringProp object at 0x7f633f4edf50>, 'use_ssl': <shinken.property.BoolProp object at 0x7f633f4edc50>, 'log_level': <shinken.property.LogLevelProp object at 0x7f633f4ed690>, 'use_local_log': <shinken.property.BoolProp object at 0x7f633f4ed150>, 'idontcareaboutsecurity': <shinken.property.BoolProp object at 0x7f633f4ed990>, 'certs_dir': <shinken.property.StringProp object at 0x7f633f4eda90>, 'group': <shinken.property.StringProp object at 0x7f633f4ed7d0>, 'max_queue_size': <shinken.property.IntegerProp object at 0x7f633f6d6b10>, 'daemon_enabled': <shinken.property.BoolProp object at 0x7f633f4ed810>}¶
- exception shinken.daemon.InvalidPidFile[source]¶
Bases: exceptions.Exception
daterange Module¶
- class shinken.daterange.CalendarDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
Bases: shinken.daterange.Daterange
- class shinken.daterange.Daterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
-
- months = {'march': 3, 'august': 8, 'september': 9, 'december': 12, 'june': 6, 'july': 7, 'november': 11, 'february': 2, 'october': 10, 'may': 5, 'january': 1, 'april': 4}¶
- weekdays = {'monday': 0, 'tuesday': 1, 'friday': 4, 'wednesday': 2, 'thursday': 3, 'sunday': 6, 'saturday': 5}¶
- class shinken.daterange.MonthDateDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
Bases: shinken.daterange.Daterange
- class shinken.daterange.MonthDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
Bases: shinken.daterange.Daterange
- class shinken.daterange.MonthWeekDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
Bases: shinken.daterange.Daterange
- class shinken.daterange.StandardDaterange(day, other)[source]¶
Bases: shinken.daterange.Daterange
- class shinken.daterange.WeekDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]¶
Bases: shinken.daterange.Daterange
db Module¶
- class shinken.db.DB(table_prefix='')[source]¶
Bases: object
DB is a generic class for SQL Database
- create_insert_query(table, data)[source]¶
Create a INSERT query in table with all data of data (a dict)
db_mysql Module¶
- class shinken.db_mysql.DBMysql(host, user, password, database, character_set, table_prefix='', port=3306)[source]¶
Bases: shinken.db.DB
DBMysql is a MySQL access database class
db_oracle Module¶
- class shinken.db_oracle.DBOracle(user, password, database, table_prefix='')[source]¶
Bases: shinken.db.DB
Manage connection and query execution against Oracle databases.
db_sqlite Module¶
dispatcher Module¶
This is the class of the dispatcher. Its role is to dispatch configurations to other elements like schedulers, reactionner, pollers, receivers and brokers. It is responsible for high availability part. If an element dies and the element type has a spare, it sends the config of the dead one to the spare
downtime Module¶
- class shinken.downtime.Downtime(ref, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
-
- id = 1¶
- properties = {'comment': <shinken.property.StringProp object at 0x7f633dac6f90>, 'entry_time': <shinken.property.IntegerProp object at 0x7f633dac6d90>, 'start_time': <shinken.property.IntegerProp object at 0x7f633dac6e10>, 'is_in_effect': <shinken.property.BoolProp object at 0x7f633dac6fd0>, 'has_been_triggered': <shinken.property.BoolProp object at 0x7f633dad0050>, 'trigger_id': <shinken.property.IntegerProp object at 0x7f633dac6e90>, 'duration': <shinken.property.IntegerProp object at 0x7f633dac6e50>, 'author': <shinken.property.StringProp object at 0x7f633dac6f50>, 'can_be_deleted': <shinken.property.BoolProp object at 0x7f633dad0090>, 'activate_me': <shinken.property.StringProp object at 0x7f633dac6d50>, 'real_end_time': <shinken.property.IntegerProp object at 0x7f633dac6f10>, 'end_time': <shinken.property.IntegerProp object at 0x7f633dac6ed0>, 'fixed': <shinken.property.BoolProp object at 0x7f633dac6dd0>}¶
easter Module¶
- shinken.easter.get_coffee()[source]¶
- (
- ) (
- ___...(——-)-....___
.-“” ) ( “”-.
.-‘``’|-._ ) _.-|
/ .–.| “”—...........—”“ |
/ / | | | | | |
_..—”“` /`“”—.._
.-‘ / ‘-.
: `-.__ __.-‘ : : ) “”—...—”” ( :
‘._ “–...___...–” _.’- jgs “”–..__ __..–”“/
- ‘._ “’”—-.....______.....—-“’” _.’
- “”–..,,_____ _____,,..–”“
- “’”—-“’”
eventhandler Module¶
- class shinken.eventhandler.EventHandler(command, id=None, ref=None, timeout=10, env={}, module_type='fork', reactionner_tag='None')[source]¶
Bases: shinken.action.Action
- check_time¶
- command¶
- env¶
- execution_time¶
- exit_status¶
- is_a¶
- long_output¶
- module_type¶
- my_type = 'eventhandler'¶
- output¶
- perf_data¶
- properties = {'status': <shinken.property.StringProp object at 0x7f633f746a10>, 'module_type': <shinken.property.StringProp object at 0x7f633feb9bd0>, 'check_time': <shinken.property.IntegerProp object at 0x7f633feb9710>, 'exit_status': <shinken.property.StringProp object at 0x7f633feb9810>, 'execution_time': <shinken.property.FloatProp object at 0x7f633feb9890>, 's_time': <shinken.property.FloatProp object at 0x7f633feb9750>, 'worker': <shinken.property.StringProp object at 0x7f633feb98d0>, 'timeout': <shinken.property.IntegerProp object at 0x7f633feb9110>, 't_to_go': <shinken.property.StringProp object at 0x7f633feb93d0>, 'is_a': <shinken.property.StringProp object at 0x7f633f746bd0>, 'long_output': <shinken.property.StringProp object at 0x7f633feb9410>, 'reactionner_tag': <shinken.property.StringProp object at 0x7f633feb97d0>, 'command': <shinken.property.StringProp object at 0x7f633feb9b50>, 'u_time': <shinken.property.FloatProp object at 0x7f633feb9850>, 'env': <shinken.property.StringProp object at 0x7f633feb96d0>, 'output': <shinken.property.StringProp object at 0x7f633feb9c90>, '_in_timeout': <shinken.property.StringProp object at 0x7f633f746fd0>, 'sched_id': <shinken.property.IntegerProp object at 0x7f633feb9790>, 'type': <shinken.property.StringProp object at 0x7f633f746990>, 'perf_data': <shinken.property.StringProp object at 0x7f633feb9450>}¶
- reactionner_tag¶
- s_time¶
- sched_id¶
- status¶
- t_to_go¶
- timeout¶
- type¶
- u_time¶
- worker¶
external_command Module¶
- class shinken.external_command.ExternalCommandManager(conf, mode)[source]¶
-
- ACKNOWLEDGE_HOST_PROBLEM_EXPIRE(host, sticky, notify, persistent, end_time, author, comment)[source]¶
- ACKNOWLEDGE_SVC_PROBLEM_EXPIRE(service, sticky, notify, persistent, end_time, author, comment)[source]¶
- SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME(host, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME(host, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_HOSTGROUP_HOST_DOWNTIME(hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_HOSTGROUP_SVC_DOWNTIME(hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_HOST_DOWNTIME(host, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_HOST_SVC_DOWNTIME(host, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_SERVICEGROUP_HOST_DOWNTIME(servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_SERVICEGROUP_SVC_DOWNTIME(servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- SCHEDULE_SVC_DOWNTIME(service, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]¶
- commands = {'ACKNOWLEDGE_SVC_PROBLEM_EXPIRE': {'global': False, 'args': ['service', 'to_int', 'to_bool', 'to_bool', 'to_int', 'author', None]}, 'CHANGE_NORMAL_HOST_CHECK_INTERVAL': {'global': False, 'args': ['host', 'to_int']}, 'ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['service_group']}, 'DELAY_SVC_NOTIFICATION': {'global': False, 'args': ['service', 'to_int']}, 'ENABLE_HOSTGROUP_SVC_CHECKS': {'global': True, 'args': ['host_group']}, 'CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD': {'global': True, 'args': ['contact', 'time_period']}, 'SCHEDULE_SVC_DOWNTIME': {'global': False, 'args': ['service', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'DEL_SVC_COMMENT': {'global': True, 'args': ['to_int']}, 'DISABLE_EVENT_HANDLERS': {'global': True, 'args': []}, 'REMOVE_SVC_ACKNOWLEDGEMENT': {'global': False, 'args': ['service']}, 'ENABLE_HOST_FRESHNESS_CHECKS': {'global': True, 'args': []}, 'REMOVE_HOST_ACKNOWLEDGEMENT': {'global': False, 'args': ['host']}, 'DISABLE_FLAP_DETECTION': {'global': True, 'args': []}, 'ENABLE_EVENT_HANDLERS': {'global': True, 'args': []}, 'ACKNOWLEDGE_HOST_PROBLEM_EXPIRE': {'global': False, 'args': ['host', 'to_int', 'to_bool', 'to_bool', 'to_int', 'author', None]}, 'SEND_CUSTOM_SVC_NOTIFICATION': {'global': False, 'args': ['service', 'to_int', 'author', None]}, 'ENABLE_NOTIFICATIONS': {'global': True, 'args': []}, 'SHUTDOWN_PROGRAM': {'global': True, 'args': []}, 'PROCESS_FILE': {'global': True, 'args': [None, 'to_bool']}, 'ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS': {'global': True, 'args': ['host_group']}, 'SCHEDULE_HOST_CHECK': {'global': False, 'args': ['host', 'to_int']}, 'STOP_OBSESSING_OVER_HOST_CHECKS': {'global': True, 'args': []}, 'DISABLE_CONTACTGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['contact_group']}, 'DISABLE_HOST_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'DISABLE_FAILURE_PREDICTION': {'global': True, 'args': []}, 'DISABLE_CONTACTGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['contact_group']}, 'SCHEDULE_SERVICEGROUP_SVC_DOWNTIME': {'global': True, 'args': ['service_group', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'DEL_ALL_SVC_COMMENTS': {'global': False, 'args': ['service']}, 'CHANGE_SVC_CHECK_TIMEPERIOD': {'global': False, 'args': ['service', 'time_period']}, 'ENABLE_CONTACTGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['contact_group']}, 'SET_HOST_NOTIFICATION_NUMBER': {'global': False, 'args': ['host', 'to_int']}, 'ENABLE_FLAP_DETECTION': {'global': True, 'args': []}, 'SCHEDULE_HOSTGROUP_SVC_DOWNTIME': {'global': True, 'args': ['host_group', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS': {'global': True, 'args': ['host_group']}, 'CHANGE_MAX_SVC_CHECK_ATTEMPTS': {'global': False, 'args': ['service', 'to_int']}, 'ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS': {'global': True, 'args': ['service_group']}, 'DISABLE_PERFORMANCE_DATA': {'global': True, 'args': []}, 'DISABLE_SERVICE_FLAP_DETECTION': {'global': False, 'args': ['service']}, 'DISABLE_HOST_FRESHNESS_CHECKS': {'global': True, 'args': []}, 'CHANGE_RETRY_HOST_CHECK_INTERVAL': {'global': False, 'args': ['service', 'to_int']}, 'DEL_CONTACT_DOWNTIME': {'global': True, 'args': ['to_int']}, 'ENABLE_HOST_SVC_CHECKS': {'global': False, 'args': ['host']}, 'ENABLE_SERVICEGROUP_SVC_CHECKS': {'global': True, 'args': ['service_group']}, 'CHANGE_CONTACT_SVC_NOTIFICATION_TIMEPERIOD': {'global': True, 'args': ['contact', 'time_period']}, 'DEL_HOST_DEPENDENCY': {'global': False, 'args': ['host', 'host']}, 'CHANGE_SVC_EVENT_HANDLER': {'global': False, 'args': ['service', 'command']}, 'ADD_HOST_COMMENT': {'global': False, 'args': ['host', 'to_bool', 'author', None]}, 'DISABLE_HOST_AND_CHILD_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'DISABLE_SERVICEGROUP_HOST_CHECKS': {'global': True, 'args': ['service_group']}, 'CHANGE_RETRY_SVC_CHECK_INTERVAL': {'global': False, 'args': ['service', 'to_int']}, 'ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['service_group']}, 'DISABLE_HOST_FLAP_DETECTION': {'global': False, 'args': ['host']}, 'ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS': {'global': True, 'args': ['service_group']}, 'ACKNOWLEDGE_SVC_PROBLEM': {'global': False, 'args': ['service', 'to_int', 'to_bool', 'to_bool', 'author', None]}, 'CHANGE_CONTACT_MODSATTR': {'global': True, 'args': ['contact', None]}, 'LAUNCH_SVC_EVENT_HANDLER': {'global': False, 'args': ['service']}, 'DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS': {'global': True, 'args': ['service_group']}, 'DISABLE_HOST_SVC_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'ENABLE_HOST_CHECK': {'global': False, 'args': ['host']}, 'ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST': {'global': False, 'args': ['host']}, 'STOP_ACCEPTING_PASSIVE_SVC_CHECKS': {'global': True, 'args': []}, 'DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS': {'global': True, 'args': ['host_group']}, 'ADD_SIMPLE_HOST_DEPENDENCY': {'global': False, 'args': ['host', 'host']}, 'CHANGE_SVC_NOTIFICATION_TIMEPERIOD': {'global': False, 'args': ['service', 'time_period']}, 'ENABLE_HOST_SVC_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'DISABLE_HOST_EVENT_HANDLER': {'global': False, 'args': ['host']}, 'START_ACCEPTING_PASSIVE_SVC_CHECKS': {'global': True, 'args': []}, 'CHANGE_HOST_CHECK_COMMAND': {'global': False, 'args': ['host', 'command']}, 'ACKNOWLEDGE_HOST_PROBLEM': {'global': False, 'args': ['host', 'to_int', 'to_bool', 'to_bool', 'author', None]}, 'SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME': {'global': False, 'args': ['host', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'PROCESS_SERVICE_OUTPUT': {'global': False, 'args': ['service', None]}, 'DISABLE_HOST_CHECK': {'global': False, 'args': ['host']}, 'DISABLE_HOSTGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['host_group']}, 'CHANGE_CUSTOM_HOST_VAR': {'global': False, 'args': ['host', None, None]}, 'CHANGE_MAX_HOST_CHECK_ATTEMPTS': {'global': False, 'args': ['host', 'to_int']}, 'ENABLE_CONTACT_HOST_NOTIFICATIONS': {'global': True, 'args': ['contact']}, 'SCHEDULE_CONTACT_DOWNTIME': {'global': True, 'args': ['contact', 'to_int', 'to_int', 'author', None]}, 'START_EXECUTING_SVC_CHECKS': {'global': True, 'args': []}, 'START_EXECUTING_HOST_CHECKS': {'global': True, 'args': []}, 'DISABLE_HOSTGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['host_group']}, 'CHANGE_CUSTOM_SVC_VAR': {'global': False, 'args': ['service', None, None]}, 'DISABLE_SVC_NOTIFICATIONS': {'global': False, 'args': ['service']}, 'DISABLE_NOTIFICATIONS': {'global': True, 'args': []}, 'ENABLE_PASSIVE_HOST_CHECKS': {'global': False, 'args': ['host']}, 'DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS': {'global': True, 'args': ['service_group']}, 'STOP_OBSESSING_OVER_HOST': {'global': False, 'args': ['host']}, 'ENABLE_CONTACT_SVC_NOTIFICATIONS': {'global': True, 'args': ['contact']}, 'ENABLE_SVC_CHECK': {'global': False, 'args': ['service']}, 'DEL_HOST_DOWNTIME': {'global': True, 'args': ['to_int']}, 'ENABLE_HOST_AND_CHILD_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'SCHEDULE_FORCED_HOST_SVC_CHECKS': {'global': False, 'args': ['host', 'to_int']}, 'DISABLE_SERVICE_FRESHNESS_CHECKS': {'global': True, 'args': []}, 'ENABLE_HOST_EVENT_HANDLER': {'global': False, 'args': ['host']}, 'START_OBSESSING_OVER_HOST': {'global': False, 'args': ['host']}, 'ENABLE_PERFORMANCE_DATA': {'global': True, 'args': []}, 'ENABLE_HOSTGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['host_group']}, 'ENABLE_SERVICEGROUP_HOST_CHECKS': {'global': True, 'args': ['service_group']}, 'SET_SVC_NOTIFICATION_NUMBER': {'global': False, 'args': ['service', 'to_int']}, 'DISABLE_SVC_CHECK': {'global': False, 'args': ['service']}, 'DISABLE_SVC_EVENT_HANDLER': {'global': False, 'args': ['service']}, 'ENABLE_PASSIVE_SVC_CHECKS': {'global': False, 'args': ['service']}, 'CHANGE_CONTACT_MODHATTR': {'global': True, 'args': ['contact', None]}, 'PROCESS_HOST_OUTPUT': {'global': False, 'args': ['host', None]}, 'CHANGE_GLOBAL_SVC_EVENT_HANDLER': {'global': True, 'args': ['command']}, 'SCHEDULE_HOST_SVC_DOWNTIME': {'global': False, 'args': ['host', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'DISABLE_HOSTGROUP_HOST_CHECKS': {'global': True, 'args': ['host_group']}, 'ENABLE_HOST_FLAP_DETECTION': {'global': False, 'args': ['host']}, 'STOP_ACCEPTING_PASSIVE_HOST_CHECKS': {'global': True, 'args': []}, 'CHANGE_SVC_MODATTR': {'global': False, 'args': ['service', 'to_int']}, 'SCHEDULE_HOST_SVC_CHECKS': {'global': False, 'args': ['host', 'to_int']}, 'ENABLE_CONTACTGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['contact_group']}, 'ENABLE_HOSTGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['host_group']}, 'DISABLE_SERVICEGROUP_SVC_CHECKS': {'global': True, 'args': ['service_group']}, 'SAVE_STATE_INFORMATION': {'global': True, 'args': []}, 'DEL_ALL_HOST_DOWNTIMES': {'global': False, 'args': ['host']}, 'CHANGE_GLOBAL_HOST_EVENT_HANDLER': {'global': True, 'args': ['command']}, 'DEL_ALL_SVC_DOWNTIMES': {'global': False, 'args': ['service']}, 'ADD_SIMPLE_POLLER': {'global': True, 'internal': True, 'args': [None, None, None, None]}, 'READ_STATE_INFORMATION': {'global': True, 'args': []}, 'START_OBSESSING_OVER_HOST_CHECKS': {'global': True, 'args': []}, 'DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST': {'global': False, 'args': ['host']}, 'DISABLE_HOSTGROUP_SVC_CHECKS': {'global': True, 'args': ['host_group']}, 'STOP_EXECUTING_SVC_CHECKS': {'global': True, 'args': []}, 'DEL_HOST_COMMENT': {'global': True, 'args': ['to_int']}, 'CHANGE_HOST_MODATTR': {'global': False, 'args': ['host', 'to_int']}, 'ENABLE_HOST_NOTIFICATIONS': {'global': False, 'args': ['host']}, 'CHANGE_NORMAL_SVC_CHECK_INTERVAL': {'global': False, 'args': ['service', 'to_int']}, 'START_OBSESSING_OVER_SVC_CHECKS': {'global': True, 'args': []}, 'DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS': {'global': True, 'args': ['service_group']}, 'STOP_EXECUTING_HOST_CHECKS': {'global': True, 'args': []}, 'LAUNCH_HOST_EVENT_HANDLER': {'global': False, 'args': ['host']}, 'ENABLE_HOSTGROUP_HOST_CHECKS': {'global': True, 'args': ['host_group']}, 'ENABLE_SVC_EVENT_HANDLER': {'global': False, 'args': ['service']}, 'SCHEDULE_AND_PROPAGATE_TRIGGERED_HOST_DOWNTIME': {'global': False, 'args': ['host', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'SCHEDULE_HOSTGROUP_HOST_DOWNTIME': {'global': True, 'args': ['host_group', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'DISABLE_SVC_FLAP_DETECTION': {'global': False, 'args': ['service']}, 'SCHEDULE_FORCED_SVC_CHECK': {'global': False, 'args': ['service', 'to_int']}, 'CHANGE_CONTACT_MODATTR': {'global': True, 'args': ['contact', None]}, 'DEL_ALL_HOST_COMMENTS': {'global': False, 'args': ['host']}, 'DISABLE_PASSIVE_SVC_CHECKS': {'global': False, 'args': ['service']}, 'START_ACCEPTING_PASSIVE_HOST_CHECKS': {'global': True, 'args': []}, 'SCHEDULE_SERVICEGROUP_HOST_DOWNTIME': {'global': True, 'args': ['service_group', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'ENABLE_SERVICE_FRESHNESS_CHECKS': {'global': True, 'args': []}, 'START_OBSESSING_OVER_SVC': {'global': False, 'args': ['service']}, 'PROCESS_SERVICE_CHECK_RESULT': {'global': False, 'args': ['service', 'to_int', None]}, 'DELAY_HOST_NOTIFICATION': {'global': False, 'args': ['host', 'to_int']}, 'CHANGE_CUSTOM_CONTACT_VAR': {'global': True, 'args': ['contact', None, None]}, 'SEND_CUSTOM_HOST_NOTIFICATION': {'global': False, 'args': ['host', 'to_int', 'author', None]}, 'ENABLE_FAILURE_PREDICTION': {'global': True, 'args': []}, 'CHANGE_HOST_CHECK_TIMEPERIOD': {'global': False, 'args': ['host', 'time_period']}, 'DEL_SVC_DOWNTIME': {'global': True, 'args': ['to_int']}, 'RESTART_PROGRAM': {'global': True, 'args': []}, 'ENABLE_SVC_FLAP_DETECTION': {'global': False, 'args': ['service']}, 'DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS': {'global': True, 'args': ['service_group']}, 'PROCESS_HOST_CHECK_RESULT': {'global': False, 'args': ['host', 'to_int', None]}, 'ENABLE_SVC_NOTIFICATIONS': {'global': False, 'args': ['service']}, 'STOP_OBSESSING_OVER_SVC': {'global': False, 'args': ['service']}, 'SCHEDULE_HOST_DOWNTIME': {'global': False, 'args': ['host', 'to_int', 'to_int', 'to_bool', 'to_int', 'to_int', 'author', None]}, 'SCHEDULE_SVC_CHECK': {'global': False, 'args': ['service', 'to_int']}, 'CHANGE_SVC_CHECK_COMMAND': {'global': False, 'args': ['service', 'command']}, 'DISABLE_HOST_SVC_CHECKS': {'global': False, 'args': ['host']}, 'DISABLE_CONTACT_SVC_NOTIFICATIONS': {'global': True, 'args': ['contact']}, 'ADD_SVC_COMMENT': {'global': False, 'args': ['service', 'to_bool', 'author', None]}, 'DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS': {'global': True, 'args': ['host_group']}, 'CHANGE_HOST_EVENT_HANDLER': {'global': False, 'args': ['host', 'command']}, 'DISABLE_CONTACT_HOST_NOTIFICATIONS': {'global': True, 'args': ['contact']}, 'DISABLE_PASSIVE_HOST_CHECKS': {'global': False, 'args': ['host']}, 'SCHEDULE_FORCED_HOST_CHECK': {'global': False, 'args': ['host', 'to_int']}, 'STOP_OBSESSING_OVER_SVC_CHECKS': {'global': True, 'args': []}}¶
- shinken.external_command.MODATTR_NOTIFICATION_TIMEPERIOD = 65536¶
TODO: Add some comment about this class for the doc
graph Module¶
http_client Module¶
http_daemon Module¶
load Module¶
- class shinken.load.Load(m=1, initial_value=0)[source]¶
This class is for having a easy Load calculation without having to send value at regular interval (but it’s more efficient if you do this :) ) and without having a list or other stuff. It’s just an object, an update and a get You can define m: the average for m minutes. The val is the initial value. It’s better if it’s 0 but you can choose.
log Module¶
- class shinken.log.Log[source]¶
Shinken logger class, wrapping access to Python logging standard library.
- CRITICAL = 50¶
- DEBUG = 10¶
- ERROR = 40¶
- INFO = 20¶
- NOTSET = 0¶
- WARNING = 30¶
- static get_level_id(lvlName)[source]¶
Convert a level name (string) to its integer value and vice-versa. Input a level and it will return a name. Raise KeyError when name or level not found
- load_obj(object, name_=None)[source]¶
We load the object where we will put log broks with the ‘add’ method
- log(message, format=None, print_it=True)[source]¶
Old log method, kept for NAGIOS compatibility What strings should not use the new format ??
- register_local_log(path, level=None)[source]¶
The shinken logging wrapper can write to a local file if needed and return the file descriptor so we can avoid to close it.
macroresolver Module¶
- class shinken.macroresolver.MacroResolver[source]¶
Bases: shinken.borg.Borg
Please Add a Docstring to describe the class here
- macros = {'TOTALSERVICESCRITICALUNHANDLED': '_get_total_services_critical_unhandled', 'PROCESSSTARTTIME': '_get_process_start_time', 'SHORTDATETIME': '_get_short_date_time', 'TOTALHOSTPROBLEMSUNHANDLED': '_get_total_host_problems_unhandled', 'TOTALSERVICESWARNINGUNHANDLED': '_get_total_services_warning_unhandled', 'TOTALSERVICEPROBLEMSUNHANDLED': '_get_total_service_problems_unhandled', 'DATE': '_get_date', 'TOTALHOSTSUP': '_get_total_hosts_up', 'TOTALSERVICESCRITICAL': '_get_total_services_critical', 'TOTALHOSTSUNREACHABLEUNHANDLED': '_get_total_hosts_unreachable_unhandled', 'TIMET': '_get_timet', 'TOTALHOSTSUNREACHABLE': '_get_total_hosts_unreachable', 'TOTALSERVICESUNKNOWN': '_get_total_services_unknown', 'TOTALHOSTSDOWNUNHANDLED': '_get_total_hosts_unhandled', 'TOTALSERVICESUNKNOWNUNHANDLED': '_get_total_services_unknown_unhandled', 'EVENTSTARTTIME': '_get_events_start_time', 'TOTALSERVICESOK': '_get_total_service_ok', 'TOTALSERVICEPROBLEMS': '_get_total_service_problems', 'TOTALHOSTSDOWN': '_get_total_hosts_down', 'TOTALHOSTPROBLEMS': '_get_total_host_problems', 'LONGDATETIME': '_get_long_date_time', 'TIME': '_get_time', 'TOTALSERVICESWARNING': '_get_total_services_warning'}¶
- my_type = 'macroresolver'¶
memoized Module¶
message Module¶
modulesctx Module¶
modulesmanager Module¶
notification Module¶
- class shinken.notification.Notification(type='PROBLEM', status='scheduled', command='UNSET', command_call=None, ref=None, contact=None, t_to_go=0, contact_name='', host_name='', service_description='', reason_type=1, state=0, ack_author='', ack_data='', escalated=False, contacts_notified=0, start_time=0, end_time=0, notification_type=0, id=None, notif_nb=1, timeout=10, env={}, module_type='fork', reactionner_tag='None')[source]¶
Bases: shinken.action.Action
Please Add a Docstring to describe the class here
- ack_data¶
- already_start_escalations¶
- check_time¶
- command¶
- command_call¶
- contact¶
- contact_name¶
- contacts_notified¶
- creation_time¶
- end_time¶
- env¶
- escalated¶
- execution_time¶
- exit_status¶
- host_name¶
- is_a¶
- macros = {'NOTIFICATIONAUTHORNAME': 'author_name', 'HOSTNOTIFICATIONNUMBER': 'notif_nb', 'NOTIFICATIONAUTHORALIAS': 'author_alias', 'NOTIFICATIONRECIPIENTS': 'recipients', 'HOSTNOTIFICATIONID': 'id', 'NOTIFICATIONAUTHOR': 'author', 'NOTIFICATIONISESCALATED': 'escalated', 'NOTIFICATIONTYPE': 'type', 'SERVICENOTIFICATIONNUMBER': 'notif_nb', 'NOTIFICATIONCOMMENT': 'comment', 'SERVICENOTIFICATIONID': 'id'}¶
- module_type¶
- my_type = 'notification'¶
- notif_nb¶
- notification_type¶
- output¶
- properties = {'reason_type': <shinken.property.StringProp object at 0x7f633fa384d0>, 'status': <shinken.property.StringProp object at 0x7f633f746ad0>, 'u_time': <shinken.property.FloatProp object at 0x7f633f746f10>, 'ack_data': <shinken.property.StringProp object at 0x7f633fa383d0>, 'execution_time': <shinken.property.FloatProp object at 0x7f633fa388d0>, 'creation_time': <shinken.property.IntegerProp object at 0x7f633f746d10>, 'start_time': <shinken.property.StringProp object at 0x7f633f4d9250>, 's_time': <shinken.property.FloatProp object at 0x7f633f746c90>, 'worker': <shinken.property.StringProp object at 0x7f633f7467d0>, 'command_call': <shinken.property.StringProp object at 0x7f633fa38710>, 'notif_nb': <shinken.property.IntegerProp object at 0x7f633f746ed0>, 'reactionner_tag': <shinken.property.StringProp object at 0x7f633f746f50>, 'module_type': <shinken.property.StringProp object at 0x7f633f746d50>, 't_to_go': <shinken.property.IntegerProp object at 0x7f633f746910>, 'service_description': <shinken.property.StringProp object at 0x7f633f4d9350>, 'notification_type': <shinken.property.IntegerProp object at 0x7f633f4d9bd0>, 'contact_name': <shinken.property.StringProp object at 0x7f633f4d94d0>, 'sched_id': <shinken.property.IntegerProp object at 0x7f633f746850>, 'timeout': <shinken.property.IntegerProp object at 0x7f633f746dd0>, 'exit_status': <shinken.property.IntegerProp object at 0x7f633fa38550>, 'check_time': <shinken.property.IntegerProp object at 0x7f633f746b50>, 'contacts_notified': <shinken.property.StringProp object at 0x7f633fa38210>, 'ack_author': <shinken.property.StringProp object at 0x7f633fa38450>, 'escalated': <shinken.property.BoolProp object at 0x7f633fa38150>, 'is_a': <shinken.property.StringProp object at 0x7f633f4d9c50>, 'state': <shinken.property.StringProp object at 0x7f633fa38490>, 'contact': <shinken.property.StringProp object at 0x7f633f746e10>, 'command': <shinken.property.StringProp object at 0x7f633f746b90>, 'end_time': <shinken.property.StringProp object at 0x7f633f4d9210>, 'env': <shinken.property.StringProp object at 0x7f633fa38750>, 'output': <shinken.property.StringProp object at 0x7f633fa38190>, '_in_timeout': <shinken.property.BoolProp object at 0x7f633f746d90>, 'already_start_escalations': <shinken.property.StringProp object at 0x7f633f746cd0>, 'type': <shinken.property.StringProp object at 0x7f633f4d9f90>, 'host_name': <shinken.property.StringProp object at 0x7f633f4d93d0>}¶
- reactionner_tag¶
- reason_type¶
- s_time¶
- sched_id¶
- service_description¶
- start_time¶
- state¶
- status¶
- t_to_go¶
- timeout¶
- type¶
- u_time¶
- worker¶
pollerlink Module¶
- class shinken.pollerlink.PollerLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
This class is the link between Arbiter and Poller. With it, arbiter can see if a poller is alive, and can send it new configuration
- id = 0¶
- my_type = 'poller'¶
- properties = {'poller_name': <shinken.property.StringProp object at 0x7f633e354290>, 'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'poller_tags': <shinken.property.ListProp object at 0x7f633e354590>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'passive': <shinken.property.BoolProp object at 0x7f633e354610>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'max_workers': <shinken.property.IntegerProp object at 0x7f633e354d90>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633e354d50>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>, 'min_workers': <shinken.property.IntegerProp object at 0x7f633e354650>, 'processes_by_worker': <shinken.property.IntegerProp object at 0x7f633e354dd0>}¶
- class shinken.pollerlink.PollerLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
Please Add a Docstring to describe the class here
- inner_class¶
alias of PollerLink
- name_property = 'poller_name'¶
property Module¶
- class shinken.property.UnusedProp(text=None)[source]¶
Bases: shinken.property.Property
A unused Property. These are typically used by Nagios but no longer useful/used by Shinken.
This is just to warn the user that the option he uses is no more used in Shinken.
- class shinken.property.BoolProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
A Boolean Property.
Boolean values are currently case insensitively defined as 0, false, no, off for False, and 1, true, yes, on for True).
- class shinken.property.IntegerProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
- class shinken.property.FloatProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
- class shinken.property.CharProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
- class shinken.property.StringProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
- class shinken.property.ListProp(default=<object object at 0x7f633fd7bb40>, class_inherit=None, unmanaged=False, help='', no_slots=False, fill_brok=None, conf_send_preparation=None, brok_transformation=None, retention=False, retention_preparation=None, to_send=False, override=False, managed=True)[source]¶
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
reactionnerlink Module¶
- class shinken.reactionnerlink.ReactionnerLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
Please Add a Docstring to describe the class here
- id = 0¶
- my_type = 'reactionner'¶
- properties = {'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'reactionner_name': <shinken.property.StringProp object at 0x7f633cf3e710>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'passive': <shinken.property.BoolProp object at 0x7f633cf3e450>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'max_workers': <shinken.property.IntegerProp object at 0x7f633cf3e410>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633cf3e650>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'reactionner_tags': <shinken.property.ListProp object at 0x7f633cf3ed10>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>, 'min_workers': <shinken.property.IntegerProp object at 0x7f633cf3ec90>, 'processes_by_worker': <shinken.property.IntegerProp object at 0x7f633cf3e150>}¶
- class shinken.reactionnerlink.ReactionnerLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
Please Add a Docstring to describe the class here
- inner_class¶
alias of ReactionnerLink
- name_property = 'reactionner_name'¶
receiverlink Module¶
- class shinken.receiverlink.ReceiverLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
Please Add a Docstring to describe the class here
- id = 0¶
- my_type = 'receiver'¶
- properties = {'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'receiver_name': <shinken.property.StringProp object at 0x7f633e881050>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633e881510>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'direct_routing': <shinken.property.BoolProp object at 0x7f633e881610>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633e881110>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633e881b50>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>}¶
- class shinken.receiverlink.ReceiverLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
Please Add a Docstring to describe the class here
- inner_class¶
alias of ReceiverLink
- name_property = 'receiver_name'¶
satellite Module¶
This class is an interface for Reactionner and Poller daemons A Reactionner listens to a port for the configuration from the Arbiter The conf contains the schedulers where actionners will gather actions.
The Reactionner keeps on listening to the Arbiter (one a timeout)
- If Arbiter wants it to have a new conf, the satellite forgets the previous
- Schedulers (and actions into) and takes the new ones.
- class shinken.satellite.BaseSatellite(name, config_file, is_daemon, do_replace, debug, debug_file)[source]¶
Bases: shinken.daemon.Daemon
Please Add a Docstring to describe the class here
- class shinken.satellite.IBroks(app)[source]¶
Bases: shinken.daemon.Interface
Interface for Brokers They connect here and get all broks (data for brokers) data must be ORDERED! (initial status BEFORE update...)
- class shinken.satellite.IForArbiter(app)[source]¶
Bases: shinken.daemon.Interface
- class shinken.satellite.ISchedulers(app)[source]¶
Bases: shinken.daemon.Interface
Interface for Schedulers If we are passive, they connect to this and send/get actions
- exception shinken.satellite.NotWorkerMod[source]¶
Bases: exceptions.Exception
- class shinken.satellite.Satellite(name, config_file, is_daemon, do_replace, debug, debug_file)[source]¶
Bases: shinken.satellite.BaseSatellite
Our main APP class
satellitelink Module¶
- class shinken.satellitelink.SatelliteLink(*args, **kwargs)[source]¶
Bases: shinken.objects.item.Item
SatelliteLink is a common Class for link to satellite for Arbiter with Conf Dispatcher.
- properties = {'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>}¶
- running_properties = {'configuration_errors': <shinken.property.ListProp object at 0x7f633fcc60d0>, 'broks': <shinken.property.StringProp object at 0x7f633f5f5250>, 'hash': <shinken.property.StringProp object at 0x7f633fcc6cd0>, 'tags': <shinken.property.ListProp object at 0x7f633fcc6b10>, 'reachable': <shinken.property.StringProp object at 0x7f633f5f52d0>, 'alive': <shinken.property.StringProp object at 0x7f633f5f5210>, 'last_check': <shinken.property.IntegerProp object at 0x7f633f5f5310>, 'configuration_warnings': <shinken.property.ListProp object at 0x7f633fcc6950>, 'managed_confs': <shinken.property.StringProp object at 0x7f633f5f5350>, 'attempt': <shinken.property.StringProp object at 0x7f633f5f5290>, 'con': <shinken.property.StringProp object at 0x7f633f5f51d0>}¶
- set_arbiter_satellitemap(satellitemap)[source]¶
- arb_satmap is the satellitemap in current context:
- A SatelliteLink is owned by an Arbiter
- satellitemap attribute of SatelliteLink is the map defined IN THE satellite configuration but for creating connections, we need the have the satellitemap of the Arbiter
scheduler Module¶
schedulerlink Module¶
- class shinken.schedulerlink.SchedulerLink(*args, **kwargs)[source]¶
Bases: shinken.satellitelink.SatelliteLink
Please Add a Docstring to describe the class here
- id = 0¶
- my_type = 'scheduler'¶
- properties = {'timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e50>, 'weight': <shinken.property.IntegerProp object at 0x7f633d824c90>, 'use_timezone': <shinken.property.StringProp object at 0x7f633f5f50d0>, 'spare': <shinken.property.BoolProp object at 0x7f633f5f7f50>, 'address': <shinken.property.StringProp object at 0x7f633f5f7150>, 'realm': <shinken.property.StringProp object at 0x7f633f5f5110>, 'manage_arbiters': <shinken.property.BoolProp object at 0x7f633f5f7fd0>, 'imported_from': <shinken.property.StringProp object at 0x7f633f700590>, 'scheduler_name': <shinken.property.StringProp object at 0x7f633d824d10>, 'use': <shinken.property.ListProp object at 0x7f633fcc6990>, 'data_timeout': <shinken.property.IntegerProp object at 0x7f633f5f7e90>, 'name': <shinken.property.StringProp object at 0x7f633fcc6e10>, 'skip_initial_broks': <shinken.property.BoolProp object at 0x7f633d824f10>, 'modules': <shinken.property.ListProp object at 0x7f633f5f5050>, 'port': <shinken.property.IntegerProp object at 0x7f633d824510>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x7f633f5f7f90>, 'satellitemap': <shinken.property.DictProp object at 0x7f633f5f5150>, 'check_interval': <shinken.property.IntegerProp object at 0x7f633f5f7ed0>, 'polling_interval': <shinken.property.IntegerProp object at 0x7f633f5f5090>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x7f633f5f7f10>}¶
- running_properties = {'configuration_errors': <shinken.property.ListProp object at 0x7f633fcc60d0>, 'broks': <shinken.property.StringProp object at 0x7f633f5f5250>, 'external_commands': <shinken.property.StringProp object at 0x7f633d824b10>, 'hash': <shinken.property.StringProp object at 0x7f633fcc6cd0>, 'conf': <shinken.property.StringProp object at 0x7f633d824f90>, 'tags': <shinken.property.ListProp object at 0x7f633fcc6b10>, 'attempt': <shinken.property.StringProp object at 0x7f633f5f5290>, 'alive': <shinken.property.StringProp object at 0x7f633f5f5210>, 'last_check': <shinken.property.IntegerProp object at 0x7f633f5f5310>, 'need_conf': <shinken.property.StringProp object at 0x7f633d824910>, 'reachable': <shinken.property.StringProp object at 0x7f633f5f52d0>, 'managed_confs': <shinken.property.StringProp object at 0x7f633f5f5350>, 'configuration_warnings': <shinken.property.ListProp object at 0x7f633fcc6950>, 'push_flavor': <shinken.property.IntegerProp object at 0x7f633d824c50>, 'con': <shinken.property.StringProp object at 0x7f633f5f51d0>}¶
- class shinken.schedulerlink.SchedulerLinks(items)[source]¶
Bases: shinken.satellitelink.SatelliteLinks
Please Add a Docstring to describe the class here
- inner_class¶
alias of SchedulerLink
- name_property = 'scheduler_name'¶
singleton Module¶
sorteddict Module¶
- class shinken.sorteddict.SortedDict(*args, **kwargs)[source]¶
Bases: dict
Dictionary with sorted keys.
The interface is similar to the ordinary dict’s one, but: * methods: __repr__(), __str__(), __iter__(), iterkeys(), itervalues(),
iteritems(), keys(), values(), items() and popitem() – return results taking into consideration sorted keys order;- new methods: largest_key(), largest_item(), smallest_key(), smallest_item() added.
- classmethod fromkeys(S[, v]) → New dict with keys from S and values equal to v.[source]¶
v defaults to None.
- items() → a list of (key, value) pairs sorted by keys[source]¶
(add reverse=True for reverse ordering).
- iteritems() → an iterator over (key, value) pairs sorted by keys[source]¶
(add reverse=True for reverse ordering).
- iterkeys(reverse=False)¶
D.__iter__() <==> iter(D) <==> D.iterkeys() -> an iterator over sorted keys (add reverse=True for reverse ordering).
- itervalues() → an iterator over values sorted by keys[source]¶
(add reverse=True for reverse ordering).
- pop(k[, d]) → v, remove specified key and return the corresponding value.[source]¶
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem() → (k, v). Remove and return a (key, value) pair with[source]¶
the largest key; raise KeyError if D is empty.
trigger_functions Module¶
util Module¶
worker Module¶
- class shinken.worker.Worker(id, s, returns_queue, processes_by_worker, mortal=True, timeout=300, max_plugins_output_length=8192, target=None, loaded_into='unknown')[source]¶
This class is used for poller and reactionner to work. The worker is a process launch by theses process and read Message in a Queue (self.s) (slave) They launch the Check and then send the result in the Queue self.m (master) they can die if they do not do anything (param timeout)
- id = 0¶
Subpackages¶
- clients Package
- daemons Package
- discovery Package
- misc Package
- objects Package
- objects Package
- businessimpactmodulation Module
- checkmodulation Module
- command Module
- config Module
- contact Module
- contactgroup Module
- discoveryrule Module
- discoveryrun Module
- escalation Module
- host Module
- hostdependency Module
- hostescalation Module
- hostextinfo Module
- hostgroup Module
- item Module
- itemgroup Module
- macromodulation Module
- matchingitem Module
- module Module
- notificationway Module
- pack Module
- realm Module
- resultmodulation Module
- schedulingitem Module
- service Module
- servicedependency Module
- serviceescalation Module
- serviceextinfo Module
- servicegroup Module
- timeperiod Module
- trigger Module
- webui Package