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
-
do_not_run()[source]
-
get_all_states()[source]
-
get_config()[source]
-
get_name()[source]
-
get_objects_properties(table, properties=[])[source]
-
get_satellite_list(daemon_type)[source]
-
get_satellite_status(daemon_type, name)[source]
-
give_satellite_cfg()[source]
-
id = 0
-
is_correct()[source]
-
is_me(lookup_name)[source]
-
my_type = 'arbiter'
-
properties = {'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x41a8e10>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'host_name': <shinken.property.StringProp object at 0x41a8dd0>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>, 'arbiter_name': <shinken.property.StringProp object at 0x32cf0d0>}
-
class shinken.arbiterlink.ArbiterLinks(items)[source]
Bases: shinken.satellitelink.SatelliteLinks
-
inner_class
alias of ArbiterLink
-
linkify(modules)[source]
-
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
-
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.
-
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(http_daemon=None)[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]
brokerlink Module
-
class shinken.brokerlink.BrokerLink(*args, **kwargs)[source]
Bases: shinken.satellitelink.SatelliteLink
TODO: Add some comment about this class for the doc
-
get_name()[source]
-
id = 0
-
my_type = 'broker'
-
properties = {'broker_name': <shinken.property.StringProp object at 0x420f950>, 'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x420f450>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>}
-
register_to_my_realm()[source]
-
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
-
copy_shell()[source]
return a copy of the check but just what is important for execution
So we remove the ref and all
-
get_id()[source]
-
get_return_from(c)[source]
-
is_dependent()[source]
-
is_launchable(t)[source]
-
my_type = 'check'
-
properties = {'check_type': <shinken.property.IntegerProp object at 0x379e190>, 'exit_status': <shinken.property.IntegerProp object at 0x3762310>, 'reactionner_tag': <shinken.property.StringProp object at 0x379e490>, 's_time': <shinken.property.FloatProp object at 0x379eb10>, 'check_time': <shinken.property.IntegerProp object at 0x379e410>, 'long_output': <shinken.property.StringProp object at 0x3762b90>, 'state': <shinken.property.IntegerProp object at 0x3762350>, 'internal': <shinken.property.BoolProp object at 0x379e850>, 'u_time': <shinken.property.FloatProp object at 0x379e890>, 'env': <shinken.property.StringProp object at 0x379e5d0>, 'ref': <shinken.property.IntegerProp object at 0x3762a10>, 'from_trigger': <shinken.property.BoolProp object at 0x379ebd0>, 'status': <shinken.property.StringProp object at 0x3762b50>, 'execution_time': <shinken.property.FloatProp object at 0x379e2d0>, 'worker': <shinken.property.StringProp object at 0x379e310>, 't_to_go': <shinken.property.IntegerProp object at 0x3762a90>, 'module_type': <shinken.property.StringProp object at 0x379e810>, 'dep_check': <shinken.property.StringProp object at 0x379ecd0>, '_in_timeout': <shinken.property.BoolProp object at 0x3762610>, 'type': <shinken.property.StringProp object at 0x3762910>, 'depend_on': <shinken.property.StringProp object at 0x37625d0>, 'is_a': <shinken.property.StringProp object at 0x3762250>, 'poller_tag': <shinken.property.StringProp object at 0x379e290>, 'output': <shinken.property.StringProp object at 0x3762a50>, 'perf_data': <shinken.property.StringProp object at 0x379e7d0>}
-
set_type_active()[source]
-
set_type_passive()[source]
commandcall Module
-
class shinken.commandcall.CommandCall(commands, call, poller_tag='None', reactionner_tag='None', enable_environment_macros=0)[source]
Bases: shinken.commandcall.DummyCommandCall
This class is use when a service, contact or host define
a command with args.
-
args
-
call
-
command
-
enable_environment_macros
-
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]
-
late_relink_done
-
module_type
-
my_type = 'CommandCall'
-
poller_tag
-
properties = {'poller_tag': <shinken.property.StringProp object at 0x42f9f10>, 'reactionner_tag': <shinken.property.StringProp object at 0x42f9bd0>, 'valid': <shinken.property.BoolProp object at 0x44a0850>, 'call': <shinken.property.StringProp object at 0x42f9a90>, 'enable_environment_macros': <shinken.property.BoolProp object at 0x4486e10>, 'timeout': <shinken.property.IntegerProp object at 0x44a0650>, 'late_relink_done': <shinken.property.BoolProp object at 0x44a0ad0>, 'command': <shinken.property.StringProp object at 0x42f9290>, 'args': <shinken.property.StringProp object at 0x44a0950>, 'module_type': <shinken.property.StringProp object at 0x44a0690>}
-
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 :)
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]
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_retention_data()[source]
-
get_socks_activity(socks, timeout)[source]
-
handleRequests(timeout, suppl_socks=None)[source]
-
hook_point(hook_name)[source]
-
http_daemon_thread()[source]
-
load_config_file()[source]
-
load_modules_manager()[source]
-
look_for_early_exit()[source]
-
manage_signal(sig, frame)[source]
-
parse_config_file()[source]
-
properties = {'modules_dir': <shinken.property.PathProp object at 0x4db3b10>, 'server_cert': <shinken.property.StringProp object at 0x4e1aad0>, 'workdir': <shinken.property.PathProp object at 0x4da8e90>, 'group': <shinken.property.StringProp object at 0x4db39d0>, 'ca_cert': <shinken.property.StringProp object at 0x4e1aa90>, 'http_backend': <shinken.property.StringProp object at 0x4e1ad10>, 'log_level': <shinken.property.LogLevelProp object at 0x4e1ab50>, 'hard_ssl_name_check': <shinken.property.BoolProp object at 0x4e1ab90>, 'host': <shinken.property.StringProp object at 0x4db3310>, 'server_key': <shinken.property.StringProp object at 0x4e1aa50>, 'spare': <shinken.property.BoolProp object at 0x4e1ac50>, 'user': <shinken.property.StringProp object at 0x4db3410>, 'max_queue_size': <shinken.property.IntegerProp object at 0x4e1ac90>, 'daemon_enabled': <shinken.property.BoolProp object at 0x4e1ac10>, 'use_ssl': <shinken.property.BoolProp object at 0x4e1aa10>, 'use_local_log': <shinken.property.BoolProp object at 0x4e1ab10>, 'idontcareaboutsecurity': <shinken.property.BoolProp object at 0x4e1abd0>, 'daemon_thread_pool_size': <shinken.property.IntegerProp object at 0x4e1acd0>}
-
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]
-
unlink()[source]
-
wait_for_initial_conf(timeout=1.0)[source]
-
write_pid(pid=None)[source]
-
class shinken.daemon.Interface(app)[source]
Bases: 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
-
fetchall()[source]
Get all entry
-
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_complex_and_node_state()[source]
-
get_complex_node_state()[source]
-
get_complex_or_node_state()[source]
-
get_complex_xof_node_state()[source]
-
get_reverse_state(state)[source]
-
get_simple_node_state()[source]
-
get_state()[source]
-
is_valid()[source]
-
list_all_elements()[source]
-
switch_zeros_of_values()[source]
-
class shinken.dependencynode.DependencyNodeFactory(bound_item)[source]
Bases: object
-
eval_complex_cor_pattern(pattern, hosts, services, running=False)[source]
-
eval_cor_pattern(pattern, hosts, services, running=False)[source]
-
eval_simple_cor_pattern(pattern, hosts, services, running=False)[source]
-
eval_xof_pattern(node, pattern)[source]
-
expand_expression(pattern, hosts, services, running=False)[source]
-
find_object(pattern, hosts, services)[source]
-
get_host_filters(expr)[source]
-
get_srv_host_filters(expr)[source]
-
get_srv_service_filters(expr)[source]
-
host_flags = 'grl'
-
service_flags = 'grl'
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]
-
cancel()[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 0x56bdad0>, 'entry_time': <shinken.property.IntegerProp object at 0x56bd8d0>, 'start_time': <shinken.property.IntegerProp object at 0x56bd950>, 'is_in_effect': <shinken.property.BoolProp object at 0x56bdb10>, 'has_been_triggered': <shinken.property.BoolProp object at 0x56bdb50>, 'trigger_id': <shinken.property.IntegerProp object at 0x56bd9d0>, 'duration': <shinken.property.IntegerProp object at 0x56bd990>, 'author': <shinken.property.StringProp object at 0x56bda90>, 'can_be_deleted': <shinken.property.BoolProp object at 0x56bdb90>, 'activate_me': <shinken.property.StringProp object at 0x56bd890>, 'real_end_time': <shinken.property.IntegerProp object at 0x56bda50>, 'end_time': <shinken.property.IntegerProp object at 0x56bda10>, 'fixed': <shinken.property.BoolProp object at 0x56bd910>}
-
trigger_me(other_downtime)[source]
easter Module
-
shinken.easter.dark()[source]
- ‘. _.’-/’-‘-‘._
- ‘: _/.–’[[[[]’–._
- ‘: /_’ : |::”| : ‘.\
- ‘: // ./ |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 0x39b82d0>, 'module_type': <shinken.property.StringProp object at 0x3efc6d0>, 'check_time': <shinken.property.IntegerProp object at 0x3efc450>, 'exit_status': <shinken.property.StringProp object at 0x39b8dd0>, 'execution_time': <shinken.property.FloatProp object at 0x3efc8d0>, 's_time': <shinken.property.FloatProp object at 0x3efc110>, 'worker': <shinken.property.StringProp object at 0x35797d0>, 'timeout': <shinken.property.IntegerProp object at 0x3efc850>, 't_to_go': <shinken.property.StringProp object at 0x39b8110>, 'is_a': <shinken.property.StringProp object at 0x39b8fd0>, 'long_output': <shinken.property.StringProp object at 0x39b80d0>, 'reactionner_tag': <shinken.property.StringProp object at 0x3579190>, 'command': <shinken.property.StringProp object at 0x39b8150>, 'u_time': <shinken.property.FloatProp object at 0x3efc890>, 'env': <shinken.property.StringProp object at 0x3efc5d0>, 'output': <shinken.property.StringProp object at 0x39b8310>, '_in_timeout': <shinken.property.StringProp object at 0x39b8e10>, 'sched_id': <shinken.property.IntegerProp object at 0x3efcb90>, 'type': <shinken.property.StringProp object at 0x39b8d50>, 'perf_data': <shinken.property.StringProp object at 0x3efc810>}
-
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]
-
dfs_loop_search(root)[source]
-
get_accessibility_packs()[source]
-
loop_check()[source]
http_client Module
-
class shinken.http_client.HTTPClient(address='', port=0, use_ssl=False, timeout=3, data_timeout=120, uri='')[source]
Bases: object
-
get(path, args={}, wait='short')[source]
-
post(path, args, wait='short')[source]
-
exception shinken.http_client.HTTPException[source]
Bases: exceptions.Exception
http_daemon Module
-
class shinken.http_daemon.CherryPyBackend(host, port, use_ssl, ca_cert, ssl_key, ssl_cert, hard_ssl_name_check, daemon_thread_pool_size)[source]
Bases: object
-
get_sockets()[source]
-
run()[source]
-
stop()[source]
-
class shinken.http_daemon.CherryPyServer(host='127.0.0.1', port=8080, **config)[source]
Bases: shinken.webui.bottlecore.ServerAdapter
-
run(handler)[source]
-
class shinken.http_daemon.HTTPDaemon(host, port, http_backend, use_ssl, ca_cert, ssl_key, ssl_cert, hard_ssl_name_check, daemon_thread_pool_size)[source]
Bases: object
-
create_uri(address, port, obj_name, use_ssl=False)[source]
-
get_sockets()[source]
-
get_socks_activity(timeout)[source]
-
handleRequests(s)[source]
-
register(obj)[source]
-
run()[source]
-
set_timeout(con, timeout)[source]
-
shutdown()[source]
-
unregister(obj)[source]
-
exception shinken.http_daemon.InvalidWorkDir[source]
Bases: exceptions.Exception
-
exception shinken.http_daemon.PortNotFree[source]
Bases: exceptions.Exception
-
class shinken.http_daemon.WSGIREFAdapter(host='127.0.0.1', port=8080, **config)[source]
Bases: shinken.webui.bottlecore.ServerAdapter
-
run(handler)[source]
-
class shinken.http_daemon.WSGIREFBackend(host, port, use_ssl, ca_cert, ssl_key, ssl_cert, hard_ssl_name_check, daemon_thread_pool_size)[source]
Bases: object
-
get_sockets()[source]
-
get_socks_activity(socks, timeout)[source]
-
handle_one_request_thread(sock)[source]
-
run()[source]
-
stop()[source]
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_display_level(b)[source]
-
set_display_time(b)[source]
-
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
-
class shinken.modulesctx.ModulesContext[source]
Bases: object
-
get_module(name)[source]
-
get_modulesdir()[source]
-
set_modulesdir(modulesdir)[source]
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]
-
shinken.modulesmanager.uniform_module_type(s)[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', enable_environment_macros=0)[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
-
enable_environment_macros
-
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 0x4493710>, 'status': <shinken.property.StringProp object at 0x36b75d0>, 'u_time': <shinken.property.FloatProp object at 0x36b7450>, 'ack_data': <shinken.property.StringProp object at 0x36b78d0>, 'execution_time': <shinken.property.FloatProp object at 0x36b7710>, 'creation_time': <shinken.property.IntegerProp object at 0x3826e10>, 'start_time': <shinken.property.StringProp object at 0x4493e90>, 's_time': <shinken.property.FloatProp object at 0x36b7310>, 'worker': <shinken.property.StringProp object at 0x36b7690>, 'command_call': <shinken.property.StringProp object at 0x36b7190>, 'notif_nb': <shinken.property.IntegerProp object at 0x36b7210>, 'reactionner_tag': <shinken.property.StringProp object at 0x36b7850>, 'module_type': <shinken.property.StringProp object at 0x36b7810>, 't_to_go': <shinken.property.IntegerProp object at 0x36b71d0>, 'service_description': <shinken.property.StringProp object at 0x4493850>, 'notification_type': <shinken.property.IntegerProp object at 0x4493d10>, 'contact_name': <shinken.property.StringProp object at 0x4493b90>, 'sched_id': <shinken.property.IntegerProp object at 0x36b7250>, 'timeout': <shinken.property.IntegerProp object at 0x36b7950>, 'exit_status': <shinken.property.IntegerProp object at 0x36b7910>, 'check_time': <shinken.property.IntegerProp object at 0x36b7610>, 'contacts_notified': <shinken.property.StringProp object at 0x36b77d0>, 'ack_author': <shinken.property.StringProp object at 0x36b70d0>, 'enable_environment_macros': <shinken.property.BoolProp object at 0x3826850>, 'escalated': <shinken.property.BoolProp object at 0x36b7410>, 'is_a': <shinken.property.StringProp object at 0x4493c90>, 'state': <shinken.property.StringProp object at 0x36b7550>, 'contact': <shinken.property.StringProp object at 0x36b7290>, 'command': <shinken.property.StringProp object at 0x36b72d0>, 'end_time': <shinken.property.StringProp object at 0x44939d0>, 'env': <shinken.property.StringProp object at 0x36b7990>, 'output': <shinken.property.StringProp object at 0x36b7590>, '_in_timeout': <shinken.property.BoolProp object at 0x36b73d0>, 'already_start_escalations': <shinken.property.StringProp object at 0x3826c90>, 'type': <shinken.property.StringProp object at 0x4493f90>, 'host_name': <shinken.property.StringProp object at 0x4493f50>}
-
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
-
get_name()[source]
-
id = 0
-
my_type = 'poller'
-
properties = {'poller_name': <shinken.property.StringProp object at 0x54fa110>, 'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'poller_tags': <shinken.property.ListProp object at 0x54fa090>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'passive': <shinken.property.BoolProp object at 0x54fa050>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'max_workers': <shinken.property.IntegerProp object at 0x54fa6d0>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x54fa190>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>, 'min_workers': <shinken.property.IntegerProp object at 0x54fa150>, 'processes_by_worker': <shinken.property.IntegerProp object at 0x54fa0d0>}
-
register_to_my_realm()[source]
-
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 0x383c050>, 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, split_on_coma=True, merging='uniq')[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 0x383c050>, 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, split_on_coma=True, merging='uniq')[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 0x383c050>, 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, split_on_coma=True, merging='uniq')[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 0x383c050>, 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, split_on_coma=True, merging='uniq')[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 0x383c050>, 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, split_on_coma=True, merging='uniq')[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 0x383c050>, 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, split_on_coma=True, merging='uniq')[source]
Bases: shinken.property.Property
Please Add a Docstring to describe the class here
-
pythonize(val)[source]
reactionnerlink Module
-
class shinken.reactionnerlink.ReactionnerLink(*args, **kwargs)[source]
Bases: shinken.satellitelink.SatelliteLink
Please Add a Docstring to describe the class here
-
get_name()[source]
-
id = 0
-
my_type = 'reactionner'
-
properties = {'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'reactionner_name': <shinken.property.StringProp object at 0x6caced0>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'passive': <shinken.property.BoolProp object at 0x6cacf50>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'max_workers': <shinken.property.IntegerProp object at 0x6cacfd0>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x6cacf10>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'reactionner_tags': <shinken.property.ListProp object at 0x6cb4090>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>, 'min_workers': <shinken.property.IntegerProp object at 0x6cacf90>, 'processes_by_worker': <shinken.property.IntegerProp object at 0x6cb4050>}
-
register_to_my_realm()[source]
-
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
-
get_name()[source]
-
id = 0
-
my_type = 'receiver'
-
properties = {'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'receiver_name': <shinken.property.StringProp object at 0x6d67250>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x6d671d0>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'direct_routing': <shinken.property.BoolProp object at 0x6d67090>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x6d67150>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x6d67190>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>}
-
push_host_names(sched_id, hnames)[source]
-
register_to_my_realm()[source]
-
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
-
do_stop()[source]
-
get_external_commands()[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_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]
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.
-
add_failed_check_attempt(reason='')[source]
-
add_global_conf_parameters(params)[source]
-
create_connection()[source]
-
do_i_manage(cfg_id, push_flavor)[source]
-
get_all_broks()[source]
-
get_external_commands()[source]
-
get_my_type()[source]
-
give_satellite_cfg()[source]
-
got_conf()[source]
-
have_conf(magic_hash=None)[source]
-
known_conf_managed_push(cfg_id, push_flavor)[source]
-
ping()[source]
-
prepare_for_conf()[source]
-
properties = {'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'use': <shinken.property.ListProp object at 0x4486550>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'name': <shinken.property.StringProp object at 0x4486590>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>}
-
push_broks(broks)[source]
-
put_conf(conf)[source]
-
remove_from_conf(sched_id)[source]
-
running_properties = {'configuration_errors': <shinken.property.ListProp object at 0x4486490>, 'broks': <shinken.property.StringProp object at 0x41a8c50>, 'hash': <shinken.property.StringProp object at 0x44861d0>, 'tags': <shinken.property.ListProp object at 0x4486390>, 'reachable': <shinken.property.StringProp object at 0x41a8cd0>, 'alive': <shinken.property.StringProp object at 0x41a8c10>, 'last_check': <shinken.property.IntegerProp object at 0x41a8d10>, 'configuration_warnings': <shinken.property.ListProp object at 0x4486fd0>, 'managed_confs': <shinken.property.StringProp object at 0x41a8d50>, 'attempt': <shinken.property.StringProp object at 0x41a8c90>, 'con': <shinken.property.StringProp object at 0x41a8bd0>}
-
set_alive()[source]
-
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
-
set_dead()[source]
-
update_infos()[source]
-
update_managed_list()[source]
-
wait_new_conf()[source]
-
class shinken.satellitelink.SatelliteLinks(items)[source]
Bases: shinken.objects.item.Items
Please Add a Docstring to describe the class here
-
linkify(realms, modules)[source]
-
linkify_s_by_p(realms)[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_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_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_links_from_type(type)[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]
-
scatter_master_notifications()[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]
schedulerlink Module
-
class shinken.schedulerlink.SchedulerLink(*args, **kwargs)[source]
Bases: shinken.satellitelink.SatelliteLink
Please Add a Docstring to describe the class here
-
get_name()[source]
-
get_override_configuration()[source]
-
give_satellite_cfg()[source]
-
id = 0
-
my_type = 'scheduler'
-
properties = {'timeout': <shinken.property.IntegerProp object at 0x41a8750>, 'definition_order': <shinken.property.IntegerProp object at 0x4486290>, 'weight': <shinken.property.IntegerProp object at 0x797e090>, 'use_timezone': <shinken.property.StringProp object at 0x41a8a50>, 'spare': <shinken.property.BoolProp object at 0x41a8910>, 'address': <shinken.property.StringProp object at 0x41a8710>, 'realm': <shinken.property.StringProp object at 0x41a8a90>, 'manage_arbiters': <shinken.property.BoolProp object at 0x41a8990>, 'imported_from': <shinken.property.StringProp object at 0x4486150>, 'scheduler_name': <shinken.property.StringProp object at 0x797e890>, 'use': <shinken.property.ListProp object at 0x4486550>, 'data_timeout': <shinken.property.IntegerProp object at 0x41a8850>, 'name': <shinken.property.StringProp object at 0x4486590>, 'skip_initial_broks': <shinken.property.BoolProp object at 0x797e250>, 'modules': <shinken.property.ListProp object at 0x41a89d0>, 'port': <shinken.property.IntegerProp object at 0x797e510>, 'manage_sub_realms': <shinken.property.BoolProp object at 0x41a8950>, 'satellitemap': <shinken.property.DictProp object at 0x41a8ad0>, 'check_interval': <shinken.property.IntegerProp object at 0x41a8890>, 'polling_interval': <shinken.property.IntegerProp object at 0x41a8a10>, 'use_ssl': <shinken.property.BoolProp object at 0x41a8b90>, 'max_check_attempts': <shinken.property.IntegerProp object at 0x41a88d0>}
-
register_to_my_realm()[source]
-
run_external_commands(commands)[source]
-
running_properties = {'configuration_errors': <shinken.property.ListProp object at 0x4486490>, 'broks': <shinken.property.StringProp object at 0x41a8c50>, 'external_commands': <shinken.property.StringProp object at 0x797e150>, 'hash': <shinken.property.StringProp object at 0x44861d0>, 'conf': <shinken.property.StringProp object at 0x797e1d0>, 'tags': <shinken.property.ListProp object at 0x4486390>, 'attempt': <shinken.property.StringProp object at 0x41a8c90>, 'alive': <shinken.property.StringProp object at 0x41a8c10>, 'last_check': <shinken.property.IntegerProp object at 0x41a8d10>, 'need_conf': <shinken.property.StringProp object at 0x797e190>, 'reachable': <shinken.property.StringProp object at 0x41a8cd0>, 'managed_confs': <shinken.property.StringProp object at 0x41a8d50>, 'configuration_warnings': <shinken.property.ListProp object at 0x4486fd0>, 'push_flavor': <shinken.property.IntegerProp object at 0x7976f10>, 'con': <shinken.property.StringProp object at 0x41a8bd0>}
-
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
-
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
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.filter_any(name)[source]
-
shinken.util.filter_host_by_bp_rule_label(label)[source]
-
shinken.util.filter_host_by_group(group)[source]
-
shinken.util.filter_host_by_name(name)[source]
-
shinken.util.filter_host_by_regex(regex)[source]
-
shinken.util.filter_none(name)[source]
-
shinken.util.filter_service_by_bp_rule_label(label)[source]
-
shinken.util.filter_service_by_host_bp_rule_label(label)[source]
-
shinken.util.filter_service_by_host_name(host_name)[source]
-
shinken.util.filter_service_by_hostgroup_name(group)[source]
-
shinken.util.filter_service_by_name(name)[source]
-
shinken.util.filter_service_by_regex_host_name(regex)[source]
-
shinken.util.filter_service_by_regex_name(regex)[source]
-
shinken.util.filter_service_by_servicegroup_name(group)[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.split_semicolon(line, maxsplit=None)[source]
Split a line on semicolons characters but not on the escaped semicolons
-
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, split_on_coma=True)[source]
-
shinken.util.to_svc_hst_distinct_lists(ref, tab)[source]
-
shinken.util.unique_value(val)[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', http_daemon=None)[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]