misc Package

Diagrams

Simple PerfDatas class diagram :

Inheritance diagram of shinken.misc.perfdata.PerfDatas

Simple DataManager class diagram :

Inheritance diagram of shinken.misc.datamanager.DataManager

Simple Regenerator class diagram :

Inheritance diagram of shinken.misc.regenerator.Regenerator

Simple Metric class diagram :

Inheritance diagram of shinken.misc.perfdata.Metric

Package

misc Package

datamanager Module

class shinken.misc.datamanager.DataManager[source]

Bases: object

get_all_hosts_and_services()[source]
get_all_impacts()[source]
get_all_problems(to_sort=True, get_acknowledged=False)[source]
get_brokers()[source]
get_business_parents(obj, levels=3)[source]
get_contact(name)[source]
get_contacts()[source]
get_host(hname)[source]
get_host_tags_sorted()[source]
get_hostgroup(name)[source]
get_hostgroups()[source]
get_hostgroups_sorted(selected='')[source]
get_hosts()[source]
get_hosts_tagged_with(tag)[source]
get_important_elements()[source]
get_important_impacts()[source]
get_len_overall_state()[source]
get_nb_all_problems(user)[source]
get_nb_elements()[source]
get_nb_impacts()[source]
get_nb_problems()[source]
get_overall_it_state()[source]
get_overall_state()[source]
get_per_hosts_state()[source]
get_per_service_state()[source]
get_pollers()[source]
get_problems_time_sorted()[source]
get_program_start()[source]
get_reactionners()[source]
get_realm(r)[source]
get_realms()[source]
get_receivers()[source]
get_schedulers()[source]
get_service(hname, sdesc)[source]
get_service_tags_sorted()[source]
get_servicegroup(name)[source]
get_servicegroups()[source]
get_services()[source]
guess_root_problems(obj)[source]
load(rg)[source]

filter Module

Helper functions for some filtering, like for user based

md5crypt Module

md5crypt.py - Provides interoperable MD5-based crypt() function

SYNOPSIS

import md5crypt.py

cryptedpassword = md5crypt.md5crypt(password, salt);

DESCRIPTION

unix_md5_crypt() provides a crypt()-compatible interface to the rather new MD5-based crypt() function found in modern operating systems. It’s based on the implementation found on FreeBSD 2.2.[56]-RELEASE and contains the following license in it:

“THE BEER-WARE LICENSE” (Revision 42): <phk@login.dknet.dk> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp

apache_md5_crypt() provides a function compatible with Apache’s .htpasswd files. This was contributed by Bryan Hart <bryan@eai.com>.

shinken.misc.md5crypt.apache_md5_crypt(pw, salt)[source]
shinken.misc.md5crypt.md5crypt(pw, salt, magic=None)
shinken.misc.md5crypt.to64(v, n)[source]
shinken.misc.md5crypt.unix_md5_crypt(pw, salt, magic=None)[source]

perfdata Module

class shinken.misc.perfdata.Metric(s)[source]
class shinken.misc.perfdata.PerfDatas(s)[source]
shinken.misc.perfdata.guess_int_or_float(val)[source]

regenerator Module

class shinken.misc.regenerator.Regenerator[source]

Bases: object

all_done_linking(inst_id)[source]
before_after_hook(brok, obj)[source]

This can be used by derived classes to compare the data in the brok with the object which will be updated by these data. For example, it is possible to find out in this method whether the state of a host or service has changed.

create_reversed_list()[source]
linkify_a_command(o, prop)[source]
linkify_a_timeperiod(o, prop)[source]
linkify_a_timeperiod_by_name(o, prop)[source]
linkify_commands(o, prop)[source]
linkify_contacts(o, prop)[source]
linkify_dict_srv_and_hosts(o, prop)[source]
linkify_host_and_hosts(o, prop)[source]
load_external_queue(from_q)[source]
load_from_scheduler(sched)[source]
manage_brok(brok)[source]

Look for a manager function for a brok, and call it

manage_host_check_result_brok(b)[source]
manage_host_next_schedule_brok(b)[source]
manage_initial_broker_status_brok(b)[source]
manage_initial_broks_done_brok(b)[source]
manage_initial_command_status_brok(b)[source]
manage_initial_contact_status_brok(b)[source]
manage_initial_contactgroup_status_brok(b)[source]
manage_initial_host_status_brok(b)[source]
manage_initial_hostgroup_status_brok(b)[source]
manage_initial_poller_status_brok(b)[source]
manage_initial_reactionner_status_brok(b)[source]
manage_initial_receiver_status_brok(b)[source]
manage_initial_scheduler_status_brok(b)[source]
manage_initial_service_status_brok(b)[source]
manage_initial_servicegroup_status_brok(b)[source]
manage_initial_timeperiod_status_brok(b)[source]
manage_program_status_brok(b)[source]
manage_service_check_result_brok(b)[source]
manage_service_next_schedule_brok(b)[source]
manage_update_broker_status_brok(b)[source]
manage_update_host_status_brok(b)[source]
manage_update_poller_status_brok(b)[source]
manage_update_program_status_brok(b)[source]
manage_update_reactionner_status_brok(b)[source]
manage_update_receiver_status_brok(b)[source]
manage_update_scheduler_status_brok(b)[source]
manage_update_service_status_brok(b)[source]
update_element(e, data)[source]
want_brok(brok)[source]

sorter Module

Helper functions for some sorting

shinken.misc.sorter.hst_srv_sort(s1, s2)[source]
shinken.misc.sorter.last_state_change_earlier(s1, s2)[source]
shinken.misc.sorter.worse_first(s1, s2)[source]

termcolor Module

ANSII Color formatting for output in terminal.

shinken.misc.termcolor.colored(text, color=None, on_color=None, attrs=None)[source]

Colorize text.

Available text colors:
red, green, yellow, blue, magenta, cyan, white.
Available text highlights:
on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white.
Available attributes:
bold, dark, underline, blink, reverse, concealed.
Example:
colored(‘Hello, World!’, ‘red’, ‘on_grey’, [‘blue’, ‘blink’]) colored(‘Hello, World!’, ‘green’)
shinken.misc.termcolor.cprint(text, color=None, on_color=None, attrs=None, **kwargs)[source]

Print colorize text.

It accepts arguments of print function.

Read the Docs v: 2.0.3
Versions
stable
latest
branch-1.4
2.0.3
1.4.2
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.