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 :

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_contactgroup(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

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: latest
Versions
latest
stable
branch-1.4
2.4.1
2.2
2.0.3
1.4.2
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.