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

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

class shinken.autoslots.AutoSlots[source]

Bases: type

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.
  • ...
clear_queues(manager)[source]

Release the resources associated to the queues of this instance

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

get_name()[source]
has(prop)[source]

The classic has: do we have a prop or not?

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.

main()[source]

module “main” method. Only used by external modules.

manage_brok(brok)[source]

Request the module to manage the given brok. There a lot of different possible broks to manage.

manage_signal(sig, frame)[source]
set_exit_handler(sigs=None)
set_loaded_into(daemon_name)[source]
set_proctitle(name)[source]
set_signal_handler(sigs=None)[source]
start()[source]
stop_process()[source]

Request the module process to stop and release it

want_brok(b)[source]
work()

module “main” method. Only used by external modules.

class shinken.basemodule.ModulePhases[source]

TODO: Add some comment about this class for the doc

CONFIGURATION = 1
LATE_CONFIGURATION = 2
RETENTION = 8
RUNNING = 4

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

class shinken.borg.Borg[source]

Bases: object

Here is the new-style Borg (not much more complex then the “old-style”)

brok Module

class shinken.brok.Brok(type, data)[source]

A Brok is a piece of information exported by Shinken to the Broker. Broker can do whatever he wants with it.

id = 0
my_type = 'brok'
prepare()[source]

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
get_id()[source]
get_return_from(c)[source]
internal
is_a
is_dependent()[source]
is_launchable(t)[source]
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
set_type_active()[source]
set_type_passive()[source]
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

get_name()[source]
id = 0
is_valid()[source]
late_linkify_with_command(commands)[source]
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
class shinken.commandcall.DummyCommandCall[source]

Bases: object

Ok, slots are fun: you cannot set the __autoslots__ on the same class you use, fun isn’t it? So we define* a dummy useless class to get such :)

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

class shinken.complexexpression.ComplexExpressionFactory(ctx='hostgroups', grps=None, all_elements=None)[source]

Bases: object

eval_cor_pattern(pattern)[source]
find_object(pattern)[source]
class shinken.complexexpression.ComplexExpressionNode[source]

Bases: object

is_valid()[source]
resolve_elements()[source]

contactdowntime Module

class shinken.contactdowntime.ContactDowntime(ref, start_time, end_time, author, comment)[source]
cancel()[source]
check_activation()[source]
enter()[source]
exit()[source]
id = 1
in_scheduled_downtime()[source]
properties = {'comment': None, 'author': None, 'start_time': None, 'is_in_effect': None, 'end_time': None, 'can_be_deleted': None}

daemon Module

class shinken.daemon.Daemon(name, config_file, is_daemon, do_replace, debug, debug_file)[source]

Bases: object

add(elt)[source]
change_to_user_group(insane=None)[source]
change_to_workdir()[source]
check_and_del_zombie_modules()[source]
check_for_system_time_change()[source]
check_parallel_run()[source]
check_shm()[source]
close_fds(skip_close_fds)[source]
compensate_system_time_change(difference)[source]
daemonize(skip_close_fds=None)[source]
do_daemon_init_and_start(use_pyro=True)[source]
do_load_modules()[source]
do_loop_turn()[source]
do_mainloop()[source]
do_stop()[source]
dump_memory()[source]
find_gid_from_name()[source]
find_modules_path()[source]
find_uid_from_name()[source]
get_header()[source]
get_retention_data()[source]
get_socks_activity(socks, timeout)[source]
handleRequests(timeout, suppl_socks=None)[source]
hook_point(hook_name)[source]
load_config_file()[source]
look_for_early_exit()[source]
manage_signal(sig, frame)[source]
parse_config_file()[source]
print_header()[source]
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>}
register_local_log()[source]
relative_paths_to_full(reference_path)[source]
request_stop()[source]
restore_retention_data(data)[source]
set_exit_handler()[source]
setup_pyro_daemon()[source]
wait_for_initial_conf(timeout=1.0)[source]
write_pid(pid=None)[source]
class shinken.daemon.Interface(app)[source]

Bases: Pyro.core.ObjBase, object

get_running_id()[source]
have_conf()[source]
ping()[source]
put_conf(conf)[source]
set_log_level(loglevel)[source]
wait_new_conf()[source]
exception shinken.daemon.InvalidPidFile[source]

Bases: exceptions.Exception

shinken.daemon.get_cur_group()[source]
shinken.daemon.get_cur_user()[source]

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

get_start_and_end_time(ref=None)[source]
class shinken.daterange.Daterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]
get_min_from_t(t)[source]
get_min_sec_from_morning()[source]
get_min_sec_out_from_morning()[source]
classmethod get_month_by_id(id)[source]
classmethod get_month_id(month)[source]
get_next_future_timerange_invalid(t)[source]
get_next_future_timerange_valid(t)[source]
get_next_invalid_day(t)[source]
get_next_invalid_time_from_t(t)[source]
get_next_valid_day(t)[source]
get_next_valid_time_from_t(t)[source]
get_start_and_end_time(ref=None)[source]
classmethod get_weekday_by_id(id)[source]
classmethod get_weekday_id(weekday)[source]
is_correct()[source]
is_time_day_invalid(t)[source]
is_time_day_valid(t)[source]
is_time_valid(t)[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

get_start_and_end_time(ref=None)[source]
class shinken.daterange.MonthDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]

Bases: shinken.daterange.Daterange

get_start_and_end_time(ref=None)[source]
class shinken.daterange.MonthWeekDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]

Bases: shinken.daterange.Daterange

get_start_and_end_time(ref=None)[source]
is_correct()[source]
class shinken.daterange.StandardDaterange(day, other)[source]

Bases: shinken.daterange.Daterange

get_start_and_end_time(ref=None)[source]
is_correct()[source]
class shinken.daterange.Timerange(entry)[source]
get_first_sec_out_from_morning()[source]
get_sec_from_morning()[source]
is_time_valid(t)[source]
class shinken.daterange.WeekDayDaterange(syear, smon, smday, swday, swday_offset, eyear, emon, emday, ewday, ewday_offset, skip_interval, other)[source]

Bases: shinken.daterange.Daterange

get_start_and_end_time(ref=None)[source]
shinken.daterange.find_day_by_offset(year, month, offset)[source]
shinken.daterange.find_day_by_weekday_offset(year, month, weekday, offset)[source]

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)

create_update_query(table, data, where_data)[source]

Create a update query of table with data, and use where data for the WHERE clause

fetchone()[source]

Just get an entry

stringify(val)[source]

Get a unicode from a value

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

connect_database()[source]

Create the database connection TODO: finish (begin :) ) error catch and conf parameters... Import to catch exception

execute_query(query, do_debug=False)[source]

Just run the query TODO: finish catch

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.

connect_database()[source]

Create the database connection TODO: finish (begin :) ) error catch and conf parameters...

execute_query(query)[source]

Execute a query against an Oracle database.

db_sqlite Module

class shinken.db_sqlite.DBSqlite(db_path, table_prefix='')[source]

Bases: shinken.db.DB

DBSqlite is a sqlite access database class

connect_database()[source]

Create the database connection

execute_query(query)[source]

Just run the query

dependencynode Module

class shinken.dependencynode.DependencyNode[source]

Bases: object

get_reverse_state(state)[source]
get_state()[source]
is_valid()[source]
list_all_elements()[source]
switch_zeros_of_values()[source]
class shinken.dependencynode.DependencyNodeFactory[source]

Bases: object

eval_cor_pattern(pattern, hosts, services)[source]
find_object(pattern, hosts, services)[source]

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

class shinken.dispatcher.Dispatcher(conf, arbiter)[source]
check_alive()[source]
check_bad_dispatch()[source]
check_dispatch()[source]
dispatch()[source]
get_scheduler_ordered_list(r)[source]

downtime Module

class shinken.downtime.Downtime(ref, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]
add_automatic_comment()[source]
cancel()[source]
del_automatic_comment()[source]
enter()[source]
exit()[source]
fill_data_brok_from(data, brok_type)[source]
get_initial_status_brok()[source]
id = 1
in_scheduled_downtime()[source]
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>}
trigger_me(other_downtime)[source]

easter Module

shinken.easter.dark()[source]
.-.

|_:_|

/(_Y_)

( /M/ )

‘. _.’-/’-‘-‘._
‘: _/.–’[[[[]’–._
‘: /_’ : |::”| : ‘.\
‘: // ./ |oUU| .’ :
‘: _:’..’ \_|___|_/ : :|
‘:. .’ |_[___]_| :.’:
[::\ | : | | : ; : \
‘-‘ /’.| |.’ .;.’ | |_ ‘-‘ : | | .: : | | | | ‘. : | / :. .; |

/ | | :__/ : \

| | : | | ||

/ : : |: / |__| /|

snd | : : :_/_| /’._\ ‘–|_
/___.-/_|-‘
‘-‘
shinken.easter.episode_iv()[source]
shinken.easter.get_coffee()[source]
(
) (
___...(——-)-....___

.-“” ) ( “”-.

.-‘``’|-._ ) _.-|

/ .–.| “”—...........—”“ |

/ / | | | | | |

| |
| |
``| | _/ / /

(__/ /

_..—”“` /`“”—.._

.-‘ / ‘-.

: `-.__ __.-‘ : : ) “”—...—”” ( :

‘._ “–...___...–” _.’
jgs “”–..__ __..–”“/
‘._ “’”—-.....______.....—-“’” _.’
“”–..,,_____ _____,,..–”“
“’”—-“’”
shinken.easter.myip()[source]
shinken.easter.naheulbeuk()[source]
shinken.easter.perdu()[source]

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
copy_shell()[source]
env
execution_time
exit_status
get_id()[source]
get_outputs(out, max_plugins_output_length)[source]
get_return_from(e)[source]
is_a
is_launchable(t)[source]
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.ExternalCommand(cmd_line)[source]
my_type = 'externalcommand'
class shinken.external_command.ExternalCommandManager(conf, mode)[source]
ACKNOWLEDGE_HOST_PROBLEM(host, sticky, notify, persistent, author, comment)[source]
ACKNOWLEDGE_HOST_PROBLEM_EXPIRE(host, sticky, notify, persistent, end_time, author, comment)[source]
ACKNOWLEDGE_SVC_PROBLEM(service, sticky, notify, persistent, author, comment)[source]
ACKNOWLEDGE_SVC_PROBLEM_EXPIRE(service, sticky, notify, persistent, end_time, author, comment)[source]
ADD_HOST_COMMENT(host, persistent, author, comment)[source]
ADD_SIMPLE_HOST_DEPENDENCY(son, father)[source]
ADD_SIMPLE_POLLER(realm_name, poller_name, address, port)[source]
ADD_SVC_COMMENT(service, persistent, author, comment)[source]
CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD(contact, notification_timeperiod)[source]
CHANGE_CONTACT_MODATTR(contact, value)[source]
CHANGE_CONTACT_MODHATTR(contact, value)[source]
CHANGE_CONTACT_MODSATTR(contact, value)[source]
CHANGE_CONTACT_SVC_NOTIFICATION_TIMEPERIOD(contact, notification_timeperiod)[source]
CHANGE_CUSTOM_CONTACT_VAR(contact, varname, varvalue)[source]
CHANGE_CUSTOM_HOST_VAR(host, varname, varvalue)[source]
CHANGE_CUSTOM_SVC_VAR(service, varname, varvalue)[source]
CHANGE_GLOBAL_HOST_EVENT_HANDLER(event_handler_command)[source]
CHANGE_GLOBAL_SVC_EVENT_HANDLER(event_handler_command)[source]
CHANGE_HOST_CHECK_COMMAND(host, check_command)[source]
CHANGE_HOST_CHECK_TIMEPERIOD(host, timeperiod)[source]
CHANGE_HOST_EVENT_HANDLER(host, event_handler_command)[source]
CHANGE_HOST_MODATTR(host, value)[source]
CHANGE_MAX_HOST_CHECK_ATTEMPTS(host, check_attempts)[source]
CHANGE_MAX_SVC_CHECK_ATTEMPTS(service, check_attempts)[source]
CHANGE_NORMAL_HOST_CHECK_INTERVAL(host, check_interval)[source]
CHANGE_NORMAL_SVC_CHECK_INTERVAL(service, check_interval)[source]
CHANGE_RETRY_HOST_CHECK_INTERVAL(host, check_interval)[source]
CHANGE_RETRY_SVC_CHECK_INTERVAL(service, check_interval)[source]
CHANGE_SVC_CHECK_COMMAND(service, check_command)[source]
CHANGE_SVC_CHECK_TIMEPERIOD(service, check_timeperiod)[source]
CHANGE_SVC_EVENT_HANDLER(service, event_handler_command)[source]
CHANGE_SVC_MODATTR(service, value)[source]
CHANGE_SVC_NOTIFICATION_TIMEPERIOD(service, notification_timeperiod)[source]
DELAY_HOST_NOTIFICATION(host, notification_time)[source]
DELAY_SVC_NOTIFICATION(service, notification_time)[source]
DEL_ALL_HOST_COMMENTS(host)[source]
DEL_ALL_HOST_DOWNTIMES(host)[source]
DEL_ALL_SVC_COMMENTS(service)[source]
DEL_ALL_SVC_DOWNTIMES(service)[source]
DEL_CONTACT_DOWNTIME(downtime_id)[source]
DEL_HOST_COMMENT(comment_id)[source]
DEL_HOST_DEPENDENCY(son, father)[source]
DEL_HOST_DOWNTIME(downtime_id)[source]
DEL_SVC_COMMENT(comment_id)[source]
DEL_SVC_DOWNTIME(downtime_id)[source]
DISABLE_ALL_NOTIFICATIONS_BEYOND_HOST(host)[source]
DISABLE_CONTACTGROUP_HOST_NOTIFICATIONS(contactgroup)[source]
DISABLE_CONTACTGROUP_SVC_NOTIFICATIONS(contactgroup)[source]
DISABLE_CONTACT_HOST_NOTIFICATIONS(contact)[source]
DISABLE_CONTACT_SVC_NOTIFICATIONS(contact)[source]
DISABLE_EVENT_HANDLERS()[source]
DISABLE_FAILURE_PREDICTION()[source]
DISABLE_FLAP_DETECTION()[source]
DISABLE_HOSTGROUP_HOST_CHECKS(hostgroup)[source]
DISABLE_HOSTGROUP_HOST_NOTIFICATIONS(hostgroup)[source]
DISABLE_HOSTGROUP_PASSIVE_HOST_CHECKS(hostgroup)[source]
DISABLE_HOSTGROUP_PASSIVE_SVC_CHECKS(hostgroup)[source]
DISABLE_HOSTGROUP_SVC_CHECKS(hostgroup)[source]
DISABLE_HOSTGROUP_SVC_NOTIFICATIONS(hostgroup)[source]
DISABLE_HOST_AND_CHILD_NOTIFICATIONS(host)[source]
DISABLE_HOST_CHECK(host)[source]
DISABLE_HOST_EVENT_HANDLER(host)[source]
DISABLE_HOST_FLAP_DETECTION(host)[source]
DISABLE_HOST_FRESHNESS_CHECKS()[source]
DISABLE_HOST_NOTIFICATIONS(host)[source]
DISABLE_HOST_SVC_CHECKS(host)[source]
DISABLE_HOST_SVC_NOTIFICATIONS(host)[source]
DISABLE_NOTIFICATIONS()[source]
DISABLE_PASSIVE_HOST_CHECKS(host)[source]
DISABLE_PASSIVE_SVC_CHECKS(service)[source]
DISABLE_PERFORMANCE_DATA()[source]
DISABLE_SERVICEGROUP_HOST_CHECKS(servicegroup)[source]
DISABLE_SERVICEGROUP_HOST_NOTIFICATIONS(servicegroup)[source]
DISABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS(servicegroup)[source]
DISABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS(servicegroup)[source]
DISABLE_SERVICEGROUP_SVC_CHECKS(servicegroup)[source]
DISABLE_SERVICEGROUP_SVC_NOTIFICATIONS(servicegroup)[source]
DISABLE_SERVICE_FLAP_DETECTION(service)[source]
DISABLE_SERVICE_FRESHNESS_CHECKS()[source]
DISABLE_SVC_CHECK(service)[source]
DISABLE_SVC_EVENT_HANDLER(service)[source]
DISABLE_SVC_FLAP_DETECTION(service)[source]
DISABLE_SVC_NOTIFICATIONS(service)[source]
ENABLE_ALL_NOTIFICATIONS_BEYOND_HOST(host)[source]
ENABLE_CONTACTGROUP_HOST_NOTIFICATIONS(contactgroup)[source]
ENABLE_CONTACTGROUP_SVC_NOTIFICATIONS(contactgroup)[source]
ENABLE_CONTACT_HOST_NOTIFICATIONS(contact)[source]
ENABLE_CONTACT_SVC_NOTIFICATIONS(contact)[source]
ENABLE_EVENT_HANDLERS()[source]
ENABLE_FAILURE_PREDICTION()[source]
ENABLE_FLAP_DETECTION()[source]
ENABLE_HOSTGROUP_HOST_CHECKS(hostgroup)[source]
ENABLE_HOSTGROUP_HOST_NOTIFICATIONS(hostgroup)[source]
ENABLE_HOSTGROUP_PASSIVE_HOST_CHECKS(hostgroup)[source]
ENABLE_HOSTGROUP_PASSIVE_SVC_CHECKS(hostgroup)[source]
ENABLE_HOSTGROUP_SVC_CHECKS(hostgroup)[source]
ENABLE_HOSTGROUP_SVC_NOTIFICATIONS(hostgroup)[source]
ENABLE_HOST_AND_CHILD_NOTIFICATIONS(host)[source]
ENABLE_HOST_CHECK(host)[source]
ENABLE_HOST_EVENT_HANDLER(host)[source]
ENABLE_HOST_FLAP_DETECTION(host)[source]
ENABLE_HOST_FRESHNESS_CHECKS()[source]
ENABLE_HOST_NOTIFICATIONS(host)[source]
ENABLE_HOST_SVC_CHECKS(host)[source]
ENABLE_HOST_SVC_NOTIFICATIONS(host)[source]
ENABLE_NOTIFICATIONS()[source]
ENABLE_PASSIVE_HOST_CHECKS(host)[source]
ENABLE_PASSIVE_SVC_CHECKS(service)[source]
ENABLE_PERFORMANCE_DATA()[source]
ENABLE_SERVICEGROUP_HOST_CHECKS(servicegroup)[source]
ENABLE_SERVICEGROUP_HOST_NOTIFICATIONS(servicegroup)[source]
ENABLE_SERVICEGROUP_PASSIVE_HOST_CHECKS(servicegroup)[source]
ENABLE_SERVICEGROUP_PASSIVE_SVC_CHECKS(servicegroup)[source]
ENABLE_SERVICEGROUP_SVC_CHECKS(servicegroup)[source]
ENABLE_SERVICEGROUP_SVC_NOTIFICATIONS(servicegroup)[source]
ENABLE_SERVICE_FRESHNESS_CHECKS()[source]
ENABLE_SVC_CHECK(service)[source]
ENABLE_SVC_EVENT_HANDLER(service)[source]
ENABLE_SVC_FLAP_DETECTION(service)[source]
ENABLE_SVC_NOTIFICATIONS(service)[source]
LAUNCH_HOST_EVENT_HANDLER(host)[source]
LAUNCH_SVC_EVENT_HANDLER(service)[source]
PROCESS_FILE(file_name, delete)[source]
PROCESS_HOST_CHECK_RESULT(host, status_code, plugin_output)[source]
PROCESS_HOST_OUTPUT(host, plugin_output)[source]
PROCESS_SERVICE_CHECK_RESULT(service, return_code, plugin_output)[source]
PROCESS_SERVICE_OUTPUT(service, plugin_output)[source]
READ_STATE_INFORMATION()[source]
REMOVE_HOST_ACKNOWLEDGEMENT(host)[source]
REMOVE_SVC_ACKNOWLEDGEMENT(service)[source]
RESTART_PROGRAM()[source]
SAVE_STATE_INFORMATION()[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_CONTACT_DOWNTIME(contact, start_time, end_time, author, comment)[source]
SCHEDULE_FORCED_HOST_CHECK(host, check_time)[source]
SCHEDULE_FORCED_HOST_SVC_CHECKS(host, check_time)[source]
SCHEDULE_FORCED_SVC_CHECK(service, check_time)[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_CHECK(host, check_time)[source]
SCHEDULE_HOST_DOWNTIME(host, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]
SCHEDULE_HOST_SVC_CHECKS(host, check_time)[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_CHECK(service, check_time)[source]
SCHEDULE_SVC_DOWNTIME(service, start_time, end_time, fixed, trigger_id, duration, author, comment)[source]
SEND_CUSTOM_HOST_NOTIFICATION(host, options, author, comment)[source]
SEND_CUSTOM_SVC_NOTIFICATION(service, options, author, comment)[source]
SET_HOST_NOTIFICATION_NUMBER(host, notification_number)[source]
SET_SVC_NOTIFICATION_NUMBER(service, notification_number)[source]
SHUTDOWN_PROGRAM()[source]
START_ACCEPTING_PASSIVE_HOST_CHECKS()[source]
START_ACCEPTING_PASSIVE_SVC_CHECKS()[source]
START_EXECUTING_HOST_CHECKS()[source]
START_EXECUTING_SVC_CHECKS()[source]
START_OBSESSING_OVER_HOST(host)[source]
START_OBSESSING_OVER_HOST_CHECKS()[source]
START_OBSESSING_OVER_SVC(service)[source]
START_OBSESSING_OVER_SVC_CHECKS()[source]
STOP_ACCEPTING_PASSIVE_HOST_CHECKS()[source]
STOP_ACCEPTING_PASSIVE_SVC_CHECKS()[source]
STOP_EXECUTING_HOST_CHECKS()[source]
STOP_EXECUTING_SVC_CHECKS()[source]
STOP_OBSESSING_OVER_HOST(host)[source]
STOP_OBSESSING_OVER_HOST_CHECKS()[source]
STOP_OBSESSING_OVER_SVC(service)[source]
STOP_OBSESSING_OVER_SVC_CHECKS()[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': []}}
dispatch_global_command(command)[source]
get()[source]
get_command_and_args(command, extcmd=None)[source]
load_arbiter(arbiter)[source]
load_receiver(receiver)[source]
load_scheduler(scheduler)[source]
open()[source]
resolve_command(excmd)[source]
search_host_and_dispatch(host_name, command, extcmd)[source]
shinken.external_command.MODATTR_NOTIFICATION_TIMEPERIOD = 65536

TODO: Add some comment about this class for the doc

graph Module

class shinken.graph.Graph[source]

Graph is a class to make graph things like DFS checks or accessibility Why use an atomic bomb when a little hammer is enough?

add_edge(from_node, to_node)[source]
add_node(node)[source]
add_nodes(nodes)[source]
dfs_get_all_childs(root)[source]
get_accessibility_packs()[source]
loop_check()[source]

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.

get_load()[source]
update_load(new_val, forced_interval=None)[source]

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
critical(msg, *args, **kwargs)[source]
debug(msg, *args, **kwargs)[source]
error(msg, *args, **kwargs)[source]
get_level()[source]
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

info(msg, *args, **kwargs)[source]
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 ??

quit()[source]

Close the local log file at program exit

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.

set_human_format(on=True)[source]

Set the output as human format.

If the optional parameter on is False, the timestamps format will be reset to the default format.

set_level(level)[source]
warning(msg, *args, **kwargs)[source]
shinken.log.cprint(s, color)[source]
shinken.log.is_tty()[source]

macroresolver Module

class shinken.macroresolver.MacroResolver[source]

Bases: shinken.borg.Borg

Please Add a Docstring to describe the class here

get_env_macros(data)[source]
init(conf)[source]
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'
resolve_command(com, data)[source]
resolve_simple_macros_in_string(c_line, data, args=None)[source]

memoized Module

class shinken.memoized.memoized(func)[source]

Bases: object

Decorator that caches a function’s return value each time it is called. If called later with the same arguments, the cached value is returned, and not re-evaluated.

message Module

class shinken.message.Message(id, type, data=None, source=None)[source]

This is a simple message class for communications between actionners and workers

get_data()[source]
get_from()[source]
get_type()[source]
my_type = 'message'
str()[source]

modulesctx Module

modulesmanager Module

class shinken.modulesmanager.ModulesManager(modules_type, modules_path, modules)[source]

Bases: object

This class is use to manage modules and call callback

check_alive_instances()[source]
clear_instances(insts=None)[source]
get_external_from_queues()[source]
get_external_instances(phase=None)[source]
get_external_to_queues()[source]
get_instances()[source]
get_internal_instances(phase=None)[source]
load()[source]
load_and_init()[source]
load_manager(manager)[source]
remove_instance(inst)[source]
set_max_queue_size(max_queue_size)[source]
set_modules(modules)[source]
set_to_restart(inst)[source]
start_external_instances(late_start=False)[source]
stop_all()[source]
try_instance_init(inst, late_start=False)[source]
try_to_restart_deads()[source]

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_author
ack_data
already_start_escalations
check_time
command
command_call
contact
contact_name
contacts_notified
copy_shell()[source]
creation_time
end_time
env
escalated
execution_time
exit_status
fill_data_brok_from(data, brok_type)[source]
get_id()[source]
get_initial_status_brok()[source]
get_return_from(n)[source]
host_name
is_a
is_administrative()[source]
is_launchable(t)[source]
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

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).

pythonize(val)[source]
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

pythonize(val)[source]
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

pythonize(val)[source]
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

pythonize(val)[source]
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

pythonize(val)[source]
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

pythonize(val)[source]

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

do_stop()[source]
watch_for_new_conf(timeout)[source]
what_i_managed()[source]
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...)

get_broks(bname)[source]
class shinken.satellite.IForArbiter(app)[source]

Bases: shinken.daemon.Interface

get_external_commands()[source]
got_conf()[source]
push_broks(broks)[source]
push_host_names(sched_id, hnames)[source]
remove_from_conf(sched_id)[source]
wait_new_conf()[source]
what_i_managed()[source]
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

get_returns(sched_id)[source]
push_actions(actions, sched_id)[source]
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

add(elt)[source]
add_actions(lst, sched_id)[source]
adjust_worker_number_by_load()[source]
assign_to_a_queue(a)[source]
check_and_del_zombie_workers()[source]
clean_previous_run()[source]
create_and_launch_worker(module_name='fork', mortal=True)[source]
do_loop_turn()[source]
do_post_daemon_init()[source]
do_stop()[source]
get_broks()[source]
get_external_commands()[source]
get_max_q_len(mod)[source]
get_new_actions()[source]
get_objects_from_from_queues()[source]
get_return_for_passive(sched_id)[source]
get_returns_queue_item()[source]
get_returns_queue_len()[source]
main()[source]
manage_action_return(action)[source]
manage_returns()[source]
pynag_con_init(id)[source]
setup_new_conf()[source]

scheduler Module

class shinken.scheduler.Scheduler(scheduler_daemon)[source]

Please Add a Docstring to describe the class here

add(elt)[source]
add_Brok(brok, bname=None)[source]
add_Check(c)[source]
add_Comment(comment)[source]
add_ContactDowntime(contact_dt)[source]
add_Downtime(dt)[source]
add_EventHandler(action)[source]
add_ExternalCommand(ext_cmd)[source]
add_Notification(notif)[source]
check_for_expire_acknowledge()[source]
check_freshness()[source]
check_orphaned()[source]
clean_caches()[source]
clean_queues()[source]
consume_results()[source]
del_comment(c_id)[source]
del_contact_downtime(dt_id)[source]
del_downtime(dt_id)[source]
delete_zombie_actions()[source]
delete_zombie_checks()[source]
die()[source]
dump_objects()[source]
fill_initial_broks(bname, with_logs=False)[source]
get_actions_from_passives_satellites()[source]
get_and_register_check_result_brok(item)[source]
get_and_register_program_status_brok()[source]
get_and_register_status_brok(item)[source]
get_and_register_update_program_status_brok()[source]
get_broks(bname)[source]
get_new_actions()[source]
get_new_broks()[source]
get_objects_from_from_queues()[source]
get_program_status_brok()[source]
get_retention_data()[source]
get_to_run_checks(do_checks=False, do_actions=False, poller_tags=['None'], reactionner_tags=['None'], worker_name='none', module_types=['fork'])[source]
hook_point(hook_name)[source]
is_connection_try_too_close(elt)[source]
load_conf(conf, in_test=False)[source]
load_external_command(e)[source]
load_satellites(pollers, reactionners)[source]
manage_internal_checks()[source]
push_actions_to_passives_satellites()[source]
put_results(c)[source]
pynag_con_init(id, type='poller')[source]
reset()[source]
reset_topology_change_flag()[source]
restore_retention_data(data)[source]
retention_load()[source]
run()[source]
run_external_command(command)[source]
run_external_commands(cmds)[source]
schedule()[source]
send_broks_to_modules()[source]
update_business_values()[source]
update_downtimes_and_comments()[source]
update_recurrent_works_tick(f_name, new_tick)[source]
update_retention_file(forced=False)[source]

singleton Module

class shinken.singleton.Singleton(name, bases, dict)[source]

Bases: type

The classic Singleton class. So all instance of this class will be the same instance in fact.

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.
clear() → None. Remove all items from D.[source]
copy() → a shallow copy of D (still as a SortedDict).[source]
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).

keys() → a sorted list of keys[source]

(add reverse=True for reverse ordering).

largest_item() → a (key, value) pair with the largest key;[source]

raise KeyError if D is empty.

largest_key() → the largest key; raise KeyError if D is empty.[source]
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.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D[source]
smallest_item() → a (key, value) pair with the smallest key;[source]

raise KeyError if D is empty.

smallest_key() → the smallest key; raise KeyError if D is empty.[source]
update([E, ]**F) → None. Update D from dict/iterable E and F.[source]

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → a list of values sorted by keys[source]

(add reverse=True for reverse ordering).

shinken.sorteddict.dictdoc(method)[source]

A decorator making reuse of the ordinary dict’s docstrings more concise.

trigger_functions Module

class shinken.trigger_functions.declared(f)[source]

Bases: object

Decorator to add function in trigger environnement

util Module

shinken.util.alive_then_spare_then_deads(x, y)[source]
shinken.util.apply_change_recursive_pattern_change(s, rule)[source]
shinken.util.expand_with_macros(ref, value)[source]
shinken.util.expand_xy_pattern(pattern)[source]
shinken.util.expect_file_dirs(root, path)[source]
shinken.util.format_t_into_dhms_format(t)[source]
shinken.util.from_bool_to_int(b)[source]
shinken.util.from_bool_to_string(b)[source]
shinken.util.from_float_to_int(val)[source]
shinken.util.from_list_to_split(val)[source]
shinken.util.get_customs_keys(d)[source]
shinken.util.get_customs_values(d)[source]
shinken.util.get_day(t)[source]
shinken.util.get_end_of_day(year, month_id, day)[source]
shinken.util.get_key_value_sequence(entry, default_value=None)[source]
shinken.util.get_obj_full_name(obj)[source]
shinken.util.get_obj_name(obj)[source]
shinken.util.get_obj_name_two_args_and_void(obj, value)[source]
shinken.util.get_sec_from_morning(t)[source]
shinken.util.get_start_of_day(year, month_id, day)[source]
shinken.util.get_wday(t)[source]
shinken.util.got_generation_rule_pattern_change(xy_couples)[source]
shinken.util.nighty_five_percent(t)[source]
shinken.util.print_date(t)[source]
shinken.util.safe_print(*args)[source]
shinken.util.scheduler_no_spare_first(x, y)[source]
shinken.util.sort_by_ids(x, y)[source]
shinken.util.strip_and_uniq(tab)[source]
shinken.util.to_best_int_float(val)[source]
shinken.util.to_bool(val)[source]
shinken.util.to_char(val)[source]
shinken.util.to_float(val)[source]
shinken.util.to_hostnames_list(ref, tab)[source]
shinken.util.to_int(val)[source]
shinken.util.to_list_of_names(ref, tab)[source]
shinken.util.to_list_string_of_names(ref, tab)[source]
shinken.util.to_name_if_possible(ref, value)[source]
shinken.util.to_split(val)[source]
shinken.util.to_svc_hst_distinct_lists(ref, tab)[source]

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)

add_idletime(time)[source]
check_for_system_time_change()[source]
do_work(s, returns_queue, c)[source]
get_new_checks()[source]
id = 0
is_alive()[source]
is_killable()[source]
is_mortal()[source]
join(timeout=None)[source]
launch_new_checks()[source]
manage_finished_checks()[source]
reset_idle()[source]
send_message(msg)[source]
set_proctitle()[source]
set_zombie()[source]
start()[source]
terminate()[source]
work(s, returns_queue, c)[source]