repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_results_from_passive_satellites
def get_results_from_passive_satellites(self): # pylint: disable=broad-except """Get actions/checks results from passive poller/reactionners :return: None """ # We loop for our passive pollers or reactionners for satellites in [self.my_daemon.pollers, self.my_daemon.rea...
python
def get_results_from_passive_satellites(self): # pylint: disable=broad-except """Get actions/checks results from passive poller/reactionners :return: None """ # We loop for our passive pollers or reactionners for satellites in [self.my_daemon.pollers, self.my_daemon.rea...
Get actions/checks results from passive poller/reactionners :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1158-L1188
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.manage_internal_checks
def manage_internal_checks(self): """Run internal checks :return: None """ if os.getenv('ALIGNAK_MANAGE_INTERNAL', '1') != '1': return now = time.time() for chk in list(self.checks.values()): if not chk.internal: # Exclude checks t...
python
def manage_internal_checks(self): """Run internal checks :return: None """ if os.getenv('ALIGNAK_MANAGE_INTERNAL', '1') != '1': return now = time.time() for chk in list(self.checks.values()): if not chk.internal: # Exclude checks t...
Run internal checks :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1190-L1222
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.reset_topology_change_flag
def reset_topology_change_flag(self): """Set topology_change attribute to False in all hosts and services :return: None """ for i in self.hosts: i.topology_change = False for i in self.services: i.topology_change = False
python
def reset_topology_change_flag(self): """Set topology_change attribute to False in all hosts and services :return: None """ for i in self.hosts: i.topology_change = False for i in self.services: i.topology_change = False
Set topology_change attribute to False in all hosts and services :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1224-L1232
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.update_retention
def update_retention(self): """Call hook point 'save_retention'. Retention modules will write back retention (to file, db etc) :param forced: is update forced? :type forced: bool :return: None """ # If we set the retention update to 0, we do not want to manage re...
python
def update_retention(self): """Call hook point 'save_retention'. Retention modules will write back retention (to file, db etc) :param forced: is update forced? :type forced: bool :return: None """ # If we set the retention update to 0, we do not want to manage re...
Call hook point 'save_retention'. Retention modules will write back retention (to file, db etc) :param forced: is update forced? :type forced: bool :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1234-L1253
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.retention_load
def retention_load(self, forced=False): """Call hook point 'load_retention'. Retention modules will read retention (from file, db etc) :param forced: is load forced? :type forced: bool :return: None """ # If we set the retention update to 0, we do not want to man...
python
def retention_load(self, forced=False): """Call hook point 'load_retention'. Retention modules will read retention (from file, db etc) :param forced: is load forced? :type forced: bool :return: None """ # If we set the retention update to 0, we do not want to man...
Call hook point 'load_retention'. Retention modules will read retention (from file, db etc) :param forced: is load forced? :type forced: bool :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1255-L1274
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.log_initial_states
def log_initial_states(self): """Raise hosts and services initial status logs First, raise hosts status and then services. This to allow the events log to be a little sorted. :return: None """ # Raise hosts initial status broks for elt in self.hosts: ...
python
def log_initial_states(self): """Raise hosts and services initial status logs First, raise hosts status and then services. This to allow the events log to be a little sorted. :return: None """ # Raise hosts initial status broks for elt in self.hosts: ...
Raise hosts and services initial status logs First, raise hosts status and then services. This to allow the events log to be a little sorted. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1276-L1290
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_retention_data
def get_retention_data(self): # pylint: disable=too-many-branches,too-many-statements # pylint: disable=too-many-locals """Get all hosts and services data to be sent to the retention storage. This function only prepares the data because a module is in charge of making the data survive ...
python
def get_retention_data(self): # pylint: disable=too-many-branches,too-many-statements # pylint: disable=too-many-locals """Get all hosts and services data to be sent to the retention storage. This function only prepares the data because a module is in charge of making the data survive ...
Get all hosts and services data to be sent to the retention storage. This function only prepares the data because a module is in charge of making the data survive to the scheduler restart. todo: Alignak scheduler creates two separate dictionaries: hosts and services It would be better ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1292-L1349
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.restore_retention_data
def restore_retention_data(self, data): """Restore retention data Data coming from retention will override data coming from configuration It is kinda confusing when you modify an attribute (external command) and it get saved by retention :param data: data from retention ...
python
def restore_retention_data(self, data): """Restore retention data Data coming from retention will override data coming from configuration It is kinda confusing when you modify an attribute (external command) and it get saved by retention :param data: data from retention ...
Restore retention data Data coming from retention will override data coming from configuration It is kinda confusing when you modify an attribute (external command) and it get saved by retention :param data: data from retention :type data: dict :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1351-L1382
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.restore_retention_data_item
def restore_retention_data_item(self, data, item): # pylint: disable=too-many-branches, too-many-locals """ Restore data in item :param data: retention data of the item :type data: dict :param item: host or service item :type item: alignak.objects.host.Host | ali...
python
def restore_retention_data_item(self, data, item): # pylint: disable=too-many-branches, too-many-locals """ Restore data in item :param data: retention data of the item :type data: dict :param item: host or service item :type item: alignak.objects.host.Host | ali...
Restore data in item :param data: retention data of the item :type data: dict :param item: host or service item :type item: alignak.objects.host.Host | alignak.objects.service.Service :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1384-L1468
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.fill_initial_broks
def fill_initial_broks(self, broker_name): # pylint: disable=too-many-branches """Create initial broks for a specific broker :param broker_name: broker name :type broker_name: str :return: number of created broks """ broker_uuid = None logger.debug("My br...
python
def fill_initial_broks(self, broker_name): # pylint: disable=too-many-branches """Create initial broks for a specific broker :param broker_name: broker name :type broker_name: str :return: number of created broks """ broker_uuid = None logger.debug("My br...
Create initial broks for a specific broker :param broker_name: broker name :type broker_name: str :return: number of created broks
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1470-L1547
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_program_status_brok
def get_program_status_brok(self, brok_type='program_status'): """Create a program status brok Initially builds the running properties and then, if initial status brok, get the properties from the Config class where an entry exist for the brok 'full_status' :return: Brok with p...
python
def get_program_status_brok(self, brok_type='program_status'): """Create a program status brok Initially builds the running properties and then, if initial status brok, get the properties from the Config class where an entry exist for the brok 'full_status' :return: Brok with p...
Create a program status brok Initially builds the running properties and then, if initial status brok, get the properties from the Config class where an entry exist for the brok 'full_status' :return: Brok with program status data :rtype: alignak.brok.Brok
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1563-L1606
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.consume_results
def consume_results(self): # pylint: disable=too-many-branches """Handle results waiting in waiting_results list. Check ref will call consume result and update their status :return: None """ # All results are in self.waiting_results # We need to get them first q...
python
def consume_results(self): # pylint: disable=too-many-branches """Handle results waiting in waiting_results list. Check ref will call consume result and update their status :return: None """ # All results are in self.waiting_results # We need to get them first q...
Handle results waiting in waiting_results list. Check ref will call consume result and update their status :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1608-L1675
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.delete_zombie_checks
def delete_zombie_checks(self): """Remove checks that have a zombie status (usually timeouts) :return: None """ id_to_del = [] for chk in list(self.checks.values()): if chk.status == ACT_STATUS_ZOMBIE: id_to_del.append(chk.uuid) # une petite t...
python
def delete_zombie_checks(self): """Remove checks that have a zombie status (usually timeouts) :return: None """ id_to_del = [] for chk in list(self.checks.values()): if chk.status == ACT_STATUS_ZOMBIE: id_to_del.append(chk.uuid) # une petite t...
Remove checks that have a zombie status (usually timeouts) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1677-L1689
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.delete_zombie_actions
def delete_zombie_actions(self): """Remove actions that have a zombie status (usually timeouts) :return: None """ id_to_del = [] for act in list(self.actions.values()): if act.status == ACT_STATUS_ZOMBIE: id_to_del.append(act.uuid) # une petit...
python
def delete_zombie_actions(self): """Remove actions that have a zombie status (usually timeouts) :return: None """ id_to_del = [] for act in list(self.actions.values()): if act.status == ACT_STATUS_ZOMBIE: id_to_del.append(act.uuid) # une petit...
Remove actions that have a zombie status (usually timeouts) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1691-L1703
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.update_downtimes_and_comments
def update_downtimes_and_comments(self): # pylint: disable=too-many-branches """Iter over all hosts and services:: TODO: add some unit tests for the maintenance period feature. * Update downtime status (start / stop) regarding maintenance period * Register new comments in comme...
python
def update_downtimes_and_comments(self): # pylint: disable=too-many-branches """Iter over all hosts and services:: TODO: add some unit tests for the maintenance period feature. * Update downtime status (start / stop) regarding maintenance period * Register new comments in comme...
Iter over all hosts and services:: TODO: add some unit tests for the maintenance period feature. * Update downtime status (start / stop) regarding maintenance period * Register new comments in comments list :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1705-L1784
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.schedule
def schedule(self, elements=None): """Iterate over all hosts and services and call schedule method (schedule next check) If elements is None all our hosts and services are scheduled for a check. :param elements: None or list of host / services to schedule :type elements: None |...
python
def schedule(self, elements=None): """Iterate over all hosts and services and call schedule method (schedule next check) If elements is None all our hosts and services are scheduled for a check. :param elements: None or list of host / services to schedule :type elements: None |...
Iterate over all hosts and services and call schedule method (schedule next check) If elements is None all our hosts and services are scheduled for a check. :param elements: None or list of host / services to schedule :type elements: None | list :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1786-L1803
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_new_actions
def get_new_actions(self): """Call 'get_new_actions' hook point Iter over all hosts and services to add new actions in internal lists :return: None """ _t0 = time.time() self.hook_point('get_new_actions') statsmgr.timer('hook.get-new-actions', time.time() - _t0) ...
python
def get_new_actions(self): """Call 'get_new_actions' hook point Iter over all hosts and services to add new actions in internal lists :return: None """ _t0 = time.time() self.hook_point('get_new_actions') statsmgr.timer('hook.get-new-actions', time.time() - _t0) ...
Call 'get_new_actions' hook point Iter over all hosts and services to add new actions in internal lists :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1805-L1820
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_new_broks
def get_new_broks(self): """Iter over all hosts and services to add new broks in internal lists :return: None """ # ask for service and hosts their broks waiting # be eaten for elt in self.all_my_hosts_and_services(): for brok in elt.broks: se...
python
def get_new_broks(self): """Iter over all hosts and services to add new broks in internal lists :return: None """ # ask for service and hosts their broks waiting # be eaten for elt in self.all_my_hosts_and_services(): for brok in elt.broks: se...
Iter over all hosts and services to add new broks in internal lists :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1822-L1840
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.check_freshness
def check_freshness(self): """ Iter over all hosts and services to check freshness if check_freshness enabled and passive_checks_enabled are set For the host items, the list of hosts to check contains hosts that: - have freshness check enabled - are not yet freshness exp...
python
def check_freshness(self): """ Iter over all hosts and services to check freshness if check_freshness enabled and passive_checks_enabled are set For the host items, the list of hosts to check contains hosts that: - have freshness check enabled - are not yet freshness exp...
Iter over all hosts and services to check freshness if check_freshness enabled and passive_checks_enabled are set For the host items, the list of hosts to check contains hosts that: - have freshness check enabled - are not yet freshness expired - are only passively checked ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1842-L1939
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.check_orphaned
def check_orphaned(self): """Check for orphaned checks/actions:: * status == 'in_poller' and t_to_go < now - time_to_orphanage (300 by default) if so raise a warning log. :return: None """ orphans_count = {} now = int(time.time()) actions = list(self.ch...
python
def check_orphaned(self): """Check for orphaned checks/actions:: * status == 'in_poller' and t_to_go < now - time_to_orphanage (300 by default) if so raise a warning log. :return: None """ orphans_count = {} now = int(time.time()) actions = list(self.ch...
Check for orphaned checks/actions:: * status == 'in_poller' and t_to_go < now - time_to_orphanage (300 by default) if so raise a warning log. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1941-L1976
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.send_broks_to_modules
def send_broks_to_modules(self): """Put broks into module queues Only broks without sent_to_externals to True are sent Only modules that ask for broks will get some :return: None """ t00 = time.time() nb_sent = 0 broks = [] for broker_link in list...
python
def send_broks_to_modules(self): """Put broks into module queues Only broks without sent_to_externals to True are sent Only modules that ask for broks will get some :return: None """ t00 = time.time() nb_sent = 0 broks = [] for broker_link in list...
Put broks into module queues Only broks without sent_to_externals to True are sent Only modules that ask for broks will get some :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L1978-L2011
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_scheduler_stats
def get_scheduler_stats(self, details=False): # pylint: disable=unused-argument # pylint: disable=too-many-locals, too-many-branches """Get the scheduler statistics :return: A dict with the following structure :: { 'modules': [ {'internal': {'name':...
python
def get_scheduler_stats(self, details=False): # pylint: disable=unused-argument # pylint: disable=too-many-locals, too-many-branches """Get the scheduler statistics :return: A dict with the following structure :: { 'modules': [ {'internal': {'name':...
Get the scheduler statistics :return: A dict with the following structure :: { 'modules': [ {'internal': {'name': "MYMODULE1", 'state': 'ok'}, {'external': {'name': "MYMODULE2", 'state': 'stopped'}, ] 'la...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2021-L2163
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_latency_average_percentile
def get_latency_average_percentile(self): """ Get a overview of the latencies with just a 95 percentile + min/max values :return: None """ (_, _, time_interval) = self.recurrent_works[21] last_time = time.time() - time_interval latencies = [s.latency for s in sel...
python
def get_latency_average_percentile(self): """ Get a overview of the latencies with just a 95 percentile + min/max values :return: None """ (_, _, time_interval) = self.recurrent_works[21] last_time = time.time() - time_interval latencies = [s.latency for s in sel...
Get a overview of the latencies with just a 95 percentile + min/max values :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2165-L2179
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.get_checks_status_counts
def get_checks_status_counts(self, checks=None): """ Compute the counts of the different checks status and return it as a defaultdict(int) with the keys being the different status and the values being the count of the checks in that status. :checks: None or the checks you want to count ...
python
def get_checks_status_counts(self, checks=None): """ Compute the counts of the different checks status and return it as a defaultdict(int) with the keys being the different status and the values being the count of the checks in that status. :checks: None or the checks you want to count ...
Compute the counts of the different checks status and return it as a defaultdict(int) with the keys being the different status and the values being the count of the checks in that status. :checks: None or the checks you want to count their statuses. If None then self.checks is ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2181-L2201
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.find_item_by_id
def find_item_by_id(self, object_id): """Get item based on its id or uuid :param object_id: :type object_id: int | str :return: :rtype: alignak.objects.item.Item | None """ # Item id may be an item if isinstance(object_id, Item): return object...
python
def find_item_by_id(self, object_id): """Get item based on its id or uuid :param object_id: :type object_id: int | str :return: :rtype: alignak.objects.item.Item | None """ # Item id may be an item if isinstance(object_id, Item): return object...
Get item based on its id or uuid :param object_id: :type object_id: int | str :return: :rtype: alignak.objects.item.Item | None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2203-L2227
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.before_run
def before_run(self): """Initialize the scheduling process""" # Actions and checks counters self.nb_checks = 0 self.nb_internal_checks = 0 self.nb_checks_launched = 0 self.nb_actions_launched = 0 self.nb_checks_results = 0 self.nb_checks_results_timeout =...
python
def before_run(self): """Initialize the scheduling process""" # Actions and checks counters self.nb_checks = 0 self.nb_internal_checks = 0 self.nb_checks_launched = 0 self.nb_actions_launched = 0 self.nb_checks_results = 0 self.nb_checks_results_timeout =...
Initialize the scheduling process
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2230-L2257
Alignak-monitoring/alignak
alignak/scheduler.py
Scheduler.run
def run(self): # pylint: disable=too-many-locals, too-many-statements, too-many-branches """Main scheduler function:: * Load retention * Call 'pre_scheduler_mod_start' hook point * Start modules * Schedule first checks * Init connection with pollers/reactionners ...
python
def run(self): # pylint: disable=too-many-locals, too-many-statements, too-many-branches """Main scheduler function:: * Load retention * Call 'pre_scheduler_mod_start' hook point * Start modules * Schedule first checks * Init connection with pollers/reactionners ...
Main scheduler function:: * Load retention * Call 'pre_scheduler_mod_start' hook point * Start modules * Schedule first checks * Init connection with pollers/reactionners * Run main loop * Do recurrent works * Push/Get actions to passive satellit...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/scheduler.py#L2265-L2365
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.add
def add(self, elt): """Generic function to add objects to the daemon internal lists. Manage Broks, External commands :param elt: object to add :type elt: alignak.AlignakObject :return: None """ # external commands may be received as a dictionary when pushed from ...
python
def add(self, elt): """Generic function to add objects to the daemon internal lists. Manage Broks, External commands :param elt: object to add :type elt: alignak.AlignakObject :return: None """ # external commands may be received as a dictionary when pushed from ...
Generic function to add objects to the daemon internal lists. Manage Broks, External commands :param elt: object to add :type elt: alignak.AlignakObject :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L110-L145
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.setup_new_conf
def setup_new_conf(self): """Receiver custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a receiver daemon: - get and configure its satellites - configure the modules :return: None """ #...
python
def setup_new_conf(self): """Receiver custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a receiver daemon: - get and configure its satellites - configure the modules :return: None """ #...
Receiver custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a receiver daemon: - get and configure its satellites - configure the modules :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L147-L210
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.get_external_commands_from_arbiters
def get_external_commands_from_arbiters(self): """Get external commands from our arbiters As of now, only the arbiter are requested to provide their external commands that the receiver will push to all the known schedulers to make them being executed. :return: None """ ...
python
def get_external_commands_from_arbiters(self): """Get external commands from our arbiters As of now, only the arbiter are requested to provide their external commands that the receiver will push to all the known schedulers to make them being executed. :return: None """ ...
Get external commands from our arbiters As of now, only the arbiter are requested to provide their external commands that the receiver will push to all the known schedulers to make them being executed. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L212-L242
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.push_external_commands_to_schedulers
def push_external_commands_to_schedulers(self): """Push received external commands to the schedulers :return: None """ if not self.unprocessed_external_commands: return # Those are the global external commands commands_to_process = self.unprocessed_external_...
python
def push_external_commands_to_schedulers(self): """Push received external commands to the schedulers :return: None """ if not self.unprocessed_external_commands: return # Those are the global external commands commands_to_process = self.unprocessed_external_...
Push received external commands to the schedulers :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L244-L305
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.do_loop_turn
def do_loop_turn(self): """Receiver daemon main loop :return: None """ # Begin to clean modules self.check_and_del_zombie_modules() # Maybe the arbiter pushed a new configuration... if self.watch_for_new_conf(timeout=0.05): logger.info("I got a new ...
python
def do_loop_turn(self): """Receiver daemon main loop :return: None """ # Begin to clean modules self.check_and_del_zombie_modules() # Maybe the arbiter pushed a new configuration... if self.watch_for_new_conf(timeout=0.05): logger.info("I got a new ...
Receiver daemon main loop :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L307-L341
Alignak-monitoring/alignak
alignak/daemons/receiverdaemon.py
Receiver.get_daemon_stats
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # Call the base Daemon one res = super(Receiver, self).get_daemon_stats(details=details) res.update({'name': self.name, ...
python
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # Call the base Daemon one res = super(Receiver, self).get_daemon_stats(details=details) res.update({'name': self.name, ...
Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/receiverdaemon.py#L343-L358
Alignak-monitoring/alignak
alignak/check.py
Check.get_return_from
def get_return_from(self, check): """Update check data from action (notification for instance) :param check: action to get data from :type check: alignak.action.Action :return: None """ for prop in ['exit_status', 'output', 'long_output', 'check_time', 'execution_time', ...
python
def get_return_from(self, check): """Update check data from action (notification for instance) :param check: action to get data from :type check: alignak.action.Action :return: None """ for prop in ['exit_status', 'output', 'long_output', 'check_time', 'execution_time', ...
Update check data from action (notification for instance) :param check: action to get data from :type check: alignak.action.Action :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/check.py#L103-L112
Alignak-monitoring/alignak
alignak/check.py
Check.serialize
def serialize(self): """This function serializes into a simple dict object. The only usage is to send to poller, and it does not need to have the depend_on and depend_on_me properties. :return: json representation of a Check :rtype: dict """ res = super(Check, s...
python
def serialize(self): """This function serializes into a simple dict object. The only usage is to send to poller, and it does not need to have the depend_on and depend_on_me properties. :return: json representation of a Check :rtype: dict """ res = super(Check, s...
This function serializes into a simple dict object. The only usage is to send to poller, and it does not need to have the depend_on and depend_on_me properties. :return: json representation of a Check :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/check.py#L136-L150
Alignak-monitoring/alignak
alignak/alignakobject.py
AlignakObject.serialize
def serialize(self): """This function serializes into a simple dictionary object. It is used when transferring data to other daemons over the network (http) Here is the generic function that simply export attributes declared in the properties dictionary of the object. Note tha...
python
def serialize(self): """This function serializes into a simple dictionary object. It is used when transferring data to other daemons over the network (http) Here is the generic function that simply export attributes declared in the properties dictionary of the object. Note tha...
This function serializes into a simple dictionary object. It is used when transferring data to other daemons over the network (http) Here is the generic function that simply export attributes declared in the properties dictionary of the object. Note that a SetProp property will be ser...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/alignakobject.py#L92-L117
Alignak-monitoring/alignak
alignak/alignakobject.py
AlignakObject.fill_default
def fill_default(self): """ Define the object properties with a default value when the property is not yet defined :return: None """ for prop, entry in self.__class__.properties.items(): if hasattr(self, prop): continue if not hasattr(entr...
python
def fill_default(self): """ Define the object properties with a default value when the property is not yet defined :return: None """ for prop, entry in self.__class__.properties.items(): if hasattr(self, prop): continue if not hasattr(entr...
Define the object properties with a default value when the property is not yet defined :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/alignakobject.py#L119-L134
Alignak-monitoring/alignak
alignak/objects/host.py
Host.convert_conf_for_unreachable
def convert_conf_for_unreachable(params): """ The 'u' state for UNREACHABLE has been rewritten in 'x' in: * flap_detection_options * notification_options * snapshot_criteria So convert value from config file to keep compatibility with Nagios :param params: param...
python
def convert_conf_for_unreachable(params): """ The 'u' state for UNREACHABLE has been rewritten in 'x' in: * flap_detection_options * notification_options * snapshot_criteria So convert value from config file to keep compatibility with Nagios :param params: param...
The 'u' state for UNREACHABLE has been rewritten in 'x' in: * flap_detection_options * notification_options * snapshot_criteria So convert value from config file to keep compatibility with Nagios :param params: parameters of the host before put in properties :type param...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L275-L302
Alignak-monitoring/alignak
alignak/objects/host.py
Host.fill_predictive_missing_parameters
def fill_predictive_missing_parameters(self): """Fill address with host_name if not already set and define state with initial_state :return: None """ if hasattr(self, 'host_name') and not hasattr(self, 'address'): self.address = self.host_name if hasattr(self...
python
def fill_predictive_missing_parameters(self): """Fill address with host_name if not already set and define state with initial_state :return: None """ if hasattr(self, 'host_name') and not hasattr(self, 'address'): self.address = self.host_name if hasattr(self...
Fill address with host_name if not already set and define state with initial_state :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L304-L317
Alignak-monitoring/alignak
alignak/objects/host.py
Host.is_correct
def is_correct(self): """Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = True # Inter...
python
def is_correct(self): """Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = True # Inter...
Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L319-L350
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_name
def get_name(self): """Get the host name. Try several attributes before returning UNNAMED* :return: The name of the host :rtype: str """ if not self.is_tpl(): try: return self.host_name except AttributeError: # outch, no hostname ...
python
def get_name(self): """Get the host name. Try several attributes before returning UNNAMED* :return: The name of the host :rtype: str """ if not self.is_tpl(): try: return self.host_name except AttributeError: # outch, no hostname ...
Get the host name. Try several attributes before returning UNNAMED* :return: The name of the host :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L360-L376
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_groupnames
def get_groupnames(self, hostgroups): """Get names of the host's hostgroups :return: comma separated names of hostgroups alphabetically sorted :rtype: str """ group_names = [] for hostgroup_id in self.hostgroups: hostgroup = hostgroups[hostgroup_id] ...
python
def get_groupnames(self, hostgroups): """Get names of the host's hostgroups :return: comma separated names of hostgroups alphabetically sorted :rtype: str """ group_names = [] for hostgroup_id in self.hostgroups: hostgroup = hostgroups[hostgroup_id] ...
Get names of the host's hostgroups :return: comma separated names of hostgroups alphabetically sorted :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L408-L418
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_groupaliases
def get_groupaliases(self, hostgroups): """Get aliases of the host's hostgroups :return: comma separated aliases of hostgroups alphabetically sorted :rtype: str """ group_aliases = [] for hostgroup_id in self.hostgroups: hostgroup = hostgroups[hostgroup_id] ...
python
def get_groupaliases(self, hostgroups): """Get aliases of the host's hostgroups :return: comma separated aliases of hostgroups alphabetically sorted :rtype: str """ group_aliases = [] for hostgroup_id in self.hostgroups: hostgroup = hostgroups[hostgroup_id] ...
Get aliases of the host's hostgroups :return: comma separated aliases of hostgroups alphabetically sorted :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L420-L430
Alignak-monitoring/alignak
alignak/objects/host.py
Host.is_excluded_for_sdesc
def is_excluded_for_sdesc(self, sdesc, is_tpl=False): """ Check whether this host should have the passed service *description* be "excluded" or "not included". :param sdesc: service description :type sdesc: :param is_tpl: True if service is template, otherwise False ...
python
def is_excluded_for_sdesc(self, sdesc, is_tpl=False): """ Check whether this host should have the passed service *description* be "excluded" or "not included". :param sdesc: service description :type sdesc: :param is_tpl: True if service is template, otherwise False ...
Check whether this host should have the passed service *description* be "excluded" or "not included". :param sdesc: service description :type sdesc: :param is_tpl: True if service is template, otherwise False :type is_tpl: bool :return: True if service description ex...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L464-L479
Alignak-monitoring/alignak
alignak/objects/host.py
Host.set_state_from_exit_status
def set_state_from_exit_status(self, status, notif_period, hosts, services): """Set the state in UP, DOWN, or UNREACHABLE according to the status of a check result. :param status: integer between 0 and 3 (but not 1) :type status: int :return: None """ now = time.time() ...
python
def set_state_from_exit_status(self, status, notif_period, hosts, services): """Set the state in UP, DOWN, or UNREACHABLE according to the status of a check result. :param status: integer between 0 and 3 (but not 1) :type status: int :return: None """ now = time.time() ...
Set the state in UP, DOWN, or UNREACHABLE according to the status of a check result. :param status: integer between 0 and 3 (but not 1) :type status: int :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L492-L548
Alignak-monitoring/alignak
alignak/objects/host.py
Host.is_state
def is_state(self, status): """Return if status match the current host status :param status: status to compare ( "o", "d", "x"). Usually comes from config files :type status: str :return: True if status <=> self.status, otherwise False :rtype: bool """ if status ...
python
def is_state(self, status): """Return if status match the current host status :param status: status to compare ( "o", "d", "x"). Usually comes from config files :type status: str :return: True if status <=> self.status, otherwise False :rtype: bool """ if status ...
Return if status match the current host status :param status: status to compare ( "o", "d", "x"). Usually comes from config files :type status: str :return: True if status <=> self.status, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L550-L567
Alignak-monitoring/alignak
alignak/objects/host.py
Host.last_time_non_ok_or_up
def last_time_non_ok_or_up(self): """Get the last time the host was in a non-OK state :return: self.last_time_down if self.last_time_down > self.last_time_up, 0 otherwise :rtype: int """ non_ok_times = [x for x in [self.last_time_down] if x > self.last_ti...
python
def last_time_non_ok_or_up(self): """Get the last time the host was in a non-OK state :return: self.last_time_down if self.last_time_down > self.last_time_up, 0 otherwise :rtype: int """ non_ok_times = [x for x in [self.last_time_down] if x > self.last_ti...
Get the last time the host was in a non-OK state :return: self.last_time_down if self.last_time_down > self.last_time_up, 0 otherwise :rtype: int
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L569-L581
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_check_result
def raise_check_result(self): """Raise ACTIVE CHECK RESULT entry Example : "ACTIVE HOST CHECK: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if not self.__class__.log_active_checks: return log_level = 'info' if self.state == 'DOWN...
python
def raise_check_result(self): """Raise ACTIVE CHECK RESULT entry Example : "ACTIVE HOST CHECK: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if not self.__class__.log_active_checks: return log_level = 'info' if self.state == 'DOWN...
Raise ACTIVE CHECK RESULT entry Example : "ACTIVE HOST CHECK: server;DOWN;HARD;1;I don't know what to say..." :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L583-L601
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_alert_log_entry
def raise_alert_log_entry(self): """Raise HOST ALERT entry Format is : "HOST ALERT: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "HOST ALERT: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if self.__class__.log_alerts: lo...
python
def raise_alert_log_entry(self): """Raise HOST ALERT entry Format is : "HOST ALERT: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "HOST ALERT: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if self.__class__.log_alerts: lo...
Raise HOST ALERT entry Format is : "HOST ALERT: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "HOST ALERT: server;DOWN;HARD;1;I don't know what to say..." :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L603-L629
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_initial_state
def raise_initial_state(self): """Raise CURRENT HOST ALERT entry (info level) Format is : "CURRENT HOST STATE: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "CURRENT HOST STATE: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if not se...
python
def raise_initial_state(self): """Raise CURRENT HOST ALERT entry (info level) Format is : "CURRENT HOST STATE: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "CURRENT HOST STATE: server;DOWN;HARD;1;I don't know what to say..." :return: None """ if not se...
Raise CURRENT HOST ALERT entry (info level) Format is : "CURRENT HOST STATE: *get_name()*;*state*;*state_type*;*attempt*;*output*" Example : "CURRENT HOST STATE: server;DOWN;HARD;1;I don't know what to say..." :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L631-L651
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_snapshot_log_entry
def raise_snapshot_log_entry(self, command): """Raise HOST SNAPSHOT entry (critical level) Format is : "HOST SNAPSHOT: *self.get_name()*;*state*;*state_type*;*attempt*; *command.get_name()*" Example : "HOST SNAPSHOT: server;UP;HARD;1;notify-by-rss" :param command: Sn...
python
def raise_snapshot_log_entry(self, command): """Raise HOST SNAPSHOT entry (critical level) Format is : "HOST SNAPSHOT: *self.get_name()*;*state*;*state_type*;*attempt*; *command.get_name()*" Example : "HOST SNAPSHOT: server;UP;HARD;1;notify-by-rss" :param command: Sn...
Raise HOST SNAPSHOT entry (critical level) Format is : "HOST SNAPSHOT: *self.get_name()*;*state*;*state_type*;*attempt*; *command.get_name()*" Example : "HOST SNAPSHOT: server;UP;HARD;1;notify-by-rss" :param command: Snapshot command launched :type command: alignak.o...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L720-L743
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_flapping_start_log_entry
def raise_flapping_start_log_entry(self, change_ratio, threshold): """Raise HOST FLAPPING ALERT START entry (critical level) Format is : "HOST FLAPPING ALERT: *self.get_name()*;STARTED; Host appears to have started flapping (*change_ratio*% change >= *threshold*...
python
def raise_flapping_start_log_entry(self, change_ratio, threshold): """Raise HOST FLAPPING ALERT START entry (critical level) Format is : "HOST FLAPPING ALERT: *self.get_name()*;STARTED; Host appears to have started flapping (*change_ratio*% change >= *threshold*...
Raise HOST FLAPPING ALERT START entry (critical level) Format is : "HOST FLAPPING ALERT: *self.get_name()*;STARTED; Host appears to have started flapping (*change_ratio*% change >= *threshold*% threshold)" Example : "HOST FLAPPING ALERT: server;STARTED; ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L745-L769
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_acknowledge_log_entry
def raise_acknowledge_log_entry(self): """Raise HOST ACKNOWLEDGE ALERT entry (critical level) :return: None """ if not self.__class__.log_acknowledgements: return brok = make_monitoring_log( 'info', "HOST ACKNOWLEDGE ALERT: %s;STARTED; " ...
python
def raise_acknowledge_log_entry(self): """Raise HOST ACKNOWLEDGE ALERT entry (critical level) :return: None """ if not self.__class__.log_acknowledgements: return brok = make_monitoring_log( 'info', "HOST ACKNOWLEDGE ALERT: %s;STARTED; " ...
Raise HOST ACKNOWLEDGE ALERT entry (critical level) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L810-L822
Alignak-monitoring/alignak
alignak/objects/host.py
Host.raise_enter_downtime_log_entry
def raise_enter_downtime_log_entry(self): """Raise HOST DOWNTIME ALERT entry (critical level) Format is : "HOST DOWNTIME ALERT: *get_name()*;STARTED; Host has entered a period of scheduled downtime" Example : "HOST DOWNTIME ALERT: test_host_0;STARTED; Host ...
python
def raise_enter_downtime_log_entry(self): """Raise HOST DOWNTIME ALERT entry (critical level) Format is : "HOST DOWNTIME ALERT: *get_name()*;STARTED; Host has entered a period of scheduled downtime" Example : "HOST DOWNTIME ALERT: test_host_0;STARTED; Host ...
Raise HOST DOWNTIME ALERT entry (critical level) Format is : "HOST DOWNTIME ALERT: *get_name()*;STARTED; Host has entered a period of scheduled downtime" Example : "HOST DOWNTIME ALERT: test_host_0;STARTED; Host has entered a period of scheduled downtime" ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L838-L854
Alignak-monitoring/alignak
alignak/objects/host.py
Host.manage_stalking
def manage_stalking(self, check): """Check if the host need stalking or not (immediate recheck) If one stalking_options matches the exit_status ('o' <=> 0 ...) then stalk is needed Raise a log entry (info level) if stalk is needed :param check: finished check (check.status == 'waitconsu...
python
def manage_stalking(self, check): """Check if the host need stalking or not (immediate recheck) If one stalking_options matches the exit_status ('o' <=> 0 ...) then stalk is needed Raise a log entry (info level) if stalk is needed :param check: finished check (check.status == 'waitconsu...
Check if the host need stalking or not (immediate recheck) If one stalking_options matches the exit_status ('o' <=> 0 ...) then stalk is needed Raise a log entry (info level) if stalk is needed :param check: finished check (check.status == 'waitconsume') :type check: alignak.check.Check...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L892-L912
Alignak-monitoring/alignak
alignak/objects/host.py
Host.notification_is_blocked_by_contact
def notification_is_blocked_by_contact(self, notifways, timeperiods, notif, contact): """Check if the notification is blocked by this contact. :param notif: notification created earlier :type notif: alignak.notification.Notification :param contact: contact we want to notify :typ...
python
def notification_is_blocked_by_contact(self, notifways, timeperiods, notif, contact): """Check if the notification is blocked by this contact. :param notif: notification created earlier :type notif: alignak.notification.Notification :param contact: contact we want to notify :typ...
Check if the notification is blocked by this contact. :param notif: notification created earlier :type notif: alignak.notification.Notification :param contact: contact we want to notify :type notif: alignak.objects.contact.Contact :return: True if the notification is blocked, Fa...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L914-L926
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_duration
def get_duration(self): """Get duration formatted Format is : "HHh MMm SSs" Example : "10h 20m 40s" :return: Formatted duration :rtype: str """ mins, secs = divmod(self.duration_sec, 60) hours, mins = divmod(mins, 60) return "%02dh %02dm %02ds" % ...
python
def get_duration(self): """Get duration formatted Format is : "HHh MMm SSs" Example : "10h 20m 40s" :return: Formatted duration :rtype: str """ mins, secs = divmod(self.duration_sec, 60) hours, mins = divmod(mins, 60) return "%02dh %02dm %02ds" % ...
Get duration formatted Format is : "HHh MMm SSs" Example : "10h 20m 40s" :return: Formatted duration :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L937-L947
Alignak-monitoring/alignak
alignak/objects/host.py
Host._tot_services_by_state
def _tot_services_by_state(self, services, state): """Get the number of service in the specified state :param state: state to filter service :type state: :return: number of service with s.state_id == state :rtype: int """ return str(sum(1 for s in self.services ...
python
def _tot_services_by_state(self, services, state): """Get the number of service in the specified state :param state: state to filter service :type state: :return: number of service with s.state_id == state :rtype: int """ return str(sum(1 for s in self.services ...
Get the number of service in the specified state :param state: state to filter service :type state: :return: number of service with s.state_id == state :rtype: int
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1095-L1104
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_status
def get_status(self, hosts, services): """Get the status of this host :return: "UP", "DOWN", "UNREACHABLE" or "n/a" based on host state_id or business_rule state :rtype: str """ if self.got_business_rule: mapping = { 0: "UP", 1: "DOWN"...
python
def get_status(self, hosts, services): """Get the status of this host :return: "UP", "DOWN", "UNREACHABLE" or "n/a" based on host state_id or business_rule state :rtype: str """ if self.got_business_rule: mapping = { 0: "UP", 1: "DOWN"...
Get the status of this host :return: "UP", "DOWN", "UNREACHABLE" or "n/a" based on host state_id or business_rule state :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1220-L1234
Alignak-monitoring/alignak
alignak/objects/host.py
Host.get_overall_state
def get_overall_state(self, services): """Get the host overall state including the host self status and the status of its services Compute the host overall state identifier, including: - the acknowledged state - the downtime state The host overall state is (prioritized)...
python
def get_overall_state(self, services): """Get the host overall state including the host self status and the status of its services Compute the host overall state identifier, including: - the acknowledged state - the downtime state The host overall state is (prioritized)...
Get the host overall state including the host self status and the status of its services Compute the host overall state identifier, including: - the acknowledged state - the downtime state The host overall state is (prioritized): - an host not monitored (5) - an...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1236-L1298
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.linkify
def linkify(self, timeperiods=None, commands=None, contacts=None, # pylint: disable=R0913 realms=None, resultmodulations=None, businessimpactmodulations=None, escalations=None, hostgroups=None, checkmodulations=None, macromodulations=None): """Create link between...
python
def linkify(self, timeperiods=None, commands=None, contacts=None, # pylint: disable=R0913 realms=None, resultmodulations=None, businessimpactmodulations=None, escalations=None, hostgroups=None, checkmodulations=None, macromodulations=None): """Create link between...
Create link between objects:: * hosts -> timeperiods * hosts -> hosts (parents, etc) * hosts -> commands (check_command) * hosts -> contacts :param timeperiods: timeperiods to link :type timeperiods: alignak.objects.timeperiod.Timeperiods :param commands: co...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1308-L1362
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.linkify_h_by_h
def linkify_h_by_h(self): """Link hosts with their parents :return: None """ for host in self: # The new member list new_parents = [] for parent in getattr(host, 'parents', []): parent = parent.strip() o_parent = self.f...
python
def linkify_h_by_h(self): """Link hosts with their parents :return: None """ for host in self: # The new member list new_parents = [] for parent in getattr(host, 'parents', []): parent = parent.strip() o_parent = self.f...
Link hosts with their parents :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1372-L1390
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.linkify_h_by_realms
def linkify_h_by_realms(self, realms): """Link hosts with realms :param realms: realms object to link with :type realms: alignak.objects.realm.Realms :return: None """ default_realm = realms.get_default() for host in self: if not getattr(host, 'realm'...
python
def linkify_h_by_realms(self, realms): """Link hosts with realms :param realms: realms object to link with :type realms: alignak.objects.realm.Realms :return: None """ default_realm = realms.get_default() for host in self: if not getattr(host, 'realm'...
Link hosts with realms :param realms: realms object to link with :type realms: alignak.objects.realm.Realms :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1392-L1413
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.linkify_h_by_hg
def linkify_h_by_hg(self, hostgroups): """Link hosts with hostgroups :param hostgroups: hostgroups object to link with :type hostgroups: alignak.objects.hostgroup.Hostgroups :return: None """ # Register host in the hostgroups for host in self: new_hos...
python
def linkify_h_by_hg(self, hostgroups): """Link hosts with hostgroups :param hostgroups: hostgroups object to link with :type hostgroups: alignak.objects.hostgroup.Hostgroups :return: None """ # Register host in the hostgroups for host in self: new_hos...
Link hosts with hostgroups :param hostgroups: hostgroups object to link with :type hostgroups: alignak.objects.hostgroup.Hostgroups :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1415-L1436
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.explode
def explode(self, hostgroups, contactgroups): """Explode hosts with hostgroups, contactgroups:: * Add contact from contactgroups to host contacts * Add host into their hostgroups as hostgroup members :param hostgroups: Hostgroups to explode :type hostgroups: alignak.objects.hos...
python
def explode(self, hostgroups, contactgroups): """Explode hosts with hostgroups, contactgroups:: * Add contact from contactgroups to host contacts * Add host into their hostgroups as hostgroup members :param hostgroups: Hostgroups to explode :type hostgroups: alignak.objects.hos...
Explode hosts with hostgroups, contactgroups:: * Add contact from contactgroups to host contacts * Add host into their hostgroups as hostgroup members :param hostgroups: Hostgroups to explode :type hostgroups: alignak.objects.hostgroup.Hostgroups :param contactgroups: Contactgo...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1438-L1464
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.apply_dependencies
def apply_dependencies(self): """Loop on hosts and register dependency between parent and son call Host.fill_parents_dependency() :return: None """ for host in self: for parent_id in getattr(host, 'parents', []): if parent_id is None: ...
python
def apply_dependencies(self): """Loop on hosts and register dependency between parent and son call Host.fill_parents_dependency() :return: None """ for host in self: for parent_id in getattr(host, 'parents', []): if parent_id is None: ...
Loop on hosts and register dependency between parent and son call Host.fill_parents_dependency() :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1466-L1487
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.find_hosts_that_use_template
def find_hosts_that_use_template(self, tpl_name): """Find hosts that use the template defined in argument tpl_name :param tpl_name: the template name we filter or :type tpl_name: str :return: list of the host_name of the hosts that got the template tpl_name in tags :rtype: list[...
python
def find_hosts_that_use_template(self, tpl_name): """Find hosts that use the template defined in argument tpl_name :param tpl_name: the template name we filter or :type tpl_name: str :return: list of the host_name of the hosts that got the template tpl_name in tags :rtype: list[...
Find hosts that use the template defined in argument tpl_name :param tpl_name: the template name we filter or :type tpl_name: str :return: list of the host_name of the hosts that got the template tpl_name in tags :rtype: list[str]
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1489-L1497
Alignak-monitoring/alignak
alignak/objects/host.py
Hosts.is_correct
def is_correct(self): """Check if the hosts list configuration is correct :: * check if any loop exists in each host dependencies * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = T...
python
def is_correct(self): """Check if the hosts list configuration is correct :: * check if any loop exists in each host dependencies * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = T...
Check if the hosts list configuration is correct :: * check if any loop exists in each host dependencies * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/host.py#L1499-L1524
Alignak-monitoring/alignak
alignak/objects/arbiterlink.py
ArbiterLink.is_me
def is_me(self): # pragma: no cover, seems not to be used anywhere """Check if parameter name if same than name of this object TODO: is it useful? :return: true if parameter name if same than this name :rtype: bool """ logger.info("And arbiter is launched with the host...
python
def is_me(self): # pragma: no cover, seems not to be used anywhere """Check if parameter name if same than name of this object TODO: is it useful? :return: true if parameter name if same than this name :rtype: bool """ logger.info("And arbiter is launched with the host...
Check if parameter name if same than name of this object TODO: is it useful? :return: true if parameter name if same than this name :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/arbiterlink.py#L79-L89
Alignak-monitoring/alignak
alignak/objects/arbiterlink.py
ArbiterLink.do_not_run
def do_not_run(self): """Check if satellite running or not If not, try to run :return: true if satellite not running :rtype: bool """ logger.debug("[%s] do_not_run", self.name) try: self.con.get('_do_not_run') return True except H...
python
def do_not_run(self): """Check if satellite running or not If not, try to run :return: true if satellite not running :rtype: bool """ logger.debug("[%s] do_not_run", self.name) try: self.con.get('_do_not_run') return True except H...
Check if satellite running or not If not, try to run :return: true if satellite not running :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/arbiterlink.py#L91-L114
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.get_broks
def get_broks(self, broker_name): """Send broks to a specific broker :param broker_name: broker name to send broks :type broker_name: str :greturn: dict of brok for this broker :rtype: dict[alignak.brok.Brok] """ logger.debug("Broker %s requests my broks list", b...
python
def get_broks(self, broker_name): """Send broks to a specific broker :param broker_name: broker name to send broks :type broker_name: str :greturn: dict of brok for this broker :rtype: dict[alignak.brok.Brok] """ logger.debug("Broker %s requests my broks list", b...
Send broks to a specific broker :param broker_name: broker name to send broks :type broker_name: str :greturn: dict of brok for this broker :rtype: dict[alignak.brok.Brok]
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L127-L153
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.compensate_system_time_change
def compensate_system_time_change(self, difference): # pragma: no cover, # pylint: disable=too-many-branches # not with unit tests """Compensate a system time change of difference for all hosts/services/checks/notifs :param difference: difference in seconds :type difference: in...
python
def compensate_system_time_change(self, difference): # pragma: no cover, # pylint: disable=too-many-branches # not with unit tests """Compensate a system time change of difference for all hosts/services/checks/notifs :param difference: difference in seconds :type difference: in...
Compensate a system time change of difference for all hosts/services/checks/notifs :param difference: difference in seconds :type difference: int :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L155-L231
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.do_loop_turn
def do_loop_turn(self): """Scheduler loop turn Simply run the Alignak scheduler loop This is called when a configuration got received by the scheduler daemon. As of it, check if the first scheduling has been done... and manage this. :return: None """ if not sel...
python
def do_loop_turn(self): """Scheduler loop turn Simply run the Alignak scheduler loop This is called when a configuration got received by the scheduler daemon. As of it, check if the first scheduling has been done... and manage this. :return: None """ if not sel...
Scheduler loop turn Simply run the Alignak scheduler loop This is called when a configuration got received by the scheduler daemon. As of it, check if the first scheduling has been done... and manage this. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L238-L282
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.get_managed_configurations
def get_managed_configurations(self): """Get the configurations managed by this scheduler The configuration managed by a scheduler is the self configuration got by the scheduler during the dispatching. :return: a dict of scheduler links with instance_id as key and hash, push_fl...
python
def get_managed_configurations(self): """Get the configurations managed by this scheduler The configuration managed by a scheduler is the self configuration got by the scheduler during the dispatching. :return: a dict of scheduler links with instance_id as key and hash, push_fl...
Get the configurations managed by this scheduler The configuration managed by a scheduler is the self configuration got by the scheduler during the dispatching. :return: a dict of scheduler links with instance_id as key and hash, push_flavor and configuration identifier as values ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L284-L309
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.setup_new_conf
def setup_new_conf(self): # pylint: disable=too-many-statements, too-many-branches, too-many-locals """Setup new conf received for scheduler :return: None """ # Execute the base class treatment... super(Alignak, self).setup_new_conf() # ...then our own specific ...
python
def setup_new_conf(self): # pylint: disable=too-many-statements, too-many-branches, too-many-locals """Setup new conf received for scheduler :return: None """ # Execute the base class treatment... super(Alignak, self).setup_new_conf() # ...then our own specific ...
Setup new conf received for scheduler :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L311-L501
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.clean_previous_run
def clean_previous_run(self): """Clean variables from previous configuration :return: None """ # Execute the base class treatment... super(Alignak, self).clean_previous_run() # Clean all lists self.pollers.clear() self.reactionners.clear() self.b...
python
def clean_previous_run(self): """Clean variables from previous configuration :return: None """ # Execute the base class treatment... super(Alignak, self).clean_previous_run() # Clean all lists self.pollers.clear() self.reactionners.clear() self.b...
Clean variables from previous configuration :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L503-L514
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.get_daemon_stats
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # Call the base Daemon one res = super(Alignak, self).get_daemon_stats(details=details) res.update({'name': self.name, '...
python
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # Call the base Daemon one res = super(Alignak, self).get_daemon_stats(details=details) res.update({'name': self.name, '...
Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L516-L551
Alignak-monitoring/alignak
alignak/daemons/schedulerdaemon.py
Alignak.get_monitoring_problems
def get_monitoring_problems(self): """Get the current scheduler livesynthesis :return: live synthesis and problems dictionary :rtype: dict """ res = {} if not self.sched: return res # Get statistics from the scheduler scheduler_stats = self.s...
python
def get_monitoring_problems(self): """Get the current scheduler livesynthesis :return: live synthesis and problems dictionary :rtype: dict """ res = {} if not self.sched: return res # Get statistics from the scheduler scheduler_stats = self.s...
Get the current scheduler livesynthesis :return: live synthesis and problems dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/schedulerdaemon.py#L553-L570
Alignak-monitoring/alignak
alignak/objects/serviceextinfo.py
ServicesExtInfo.merge
def merge(self, services): """Merge extended host information into services :param services: services list, to look for a specific one :type services: alignak.objects.service.Services :return: None """ for extinfo in self: if hasattr(extinfo, 'register') and ...
python
def merge(self, services): """Merge extended host information into services :param services: services list, to look for a specific one :type services: alignak.objects.service.Services :return: None """ for extinfo in self: if hasattr(extinfo, 'register') and ...
Merge extended host information into services :param services: services list, to look for a specific one :type services: alignak.objects.service.Services :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/serviceextinfo.py#L124-L141
Alignak-monitoring/alignak
alignak/objects/serviceextinfo.py
ServicesExtInfo.merge_extinfo
def merge_extinfo(service, extinfo): """Merge extended host information into a service :param service: the service to edit :type service: alignak.objects.service.Service :param extinfo: the external info we get data from :type extinfo: alignak.objects.serviceextinfo.ServiceExtIn...
python
def merge_extinfo(service, extinfo): """Merge extended host information into a service :param service: the service to edit :type service: alignak.objects.service.Service :param extinfo: the external info we get data from :type extinfo: alignak.objects.serviceextinfo.ServiceExtIn...
Merge extended host information into a service :param service: the service to edit :type service: alignak.objects.service.Service :param extinfo: the external info we get data from :type extinfo: alignak.objects.serviceextinfo.ServiceExtInfo :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/serviceextinfo.py#L144-L157
Alignak-monitoring/alignak
alignak/commandcall.py
CommandCall.get_command_and_args
def get_command_and_args(self): r"""We want to get the command and the args with ! splitting. but don't forget to protect against the \! to avoid splitting on them Remember: A Nagios-like command is command_name!arg1!arg2!... :return: None """ # First protect p...
python
def get_command_and_args(self): r"""We want to get the command and the args with ! splitting. but don't forget to protect against the \! to avoid splitting on them Remember: A Nagios-like command is command_name!arg1!arg2!... :return: None """ # First protect p...
r"""We want to get the command and the args with ! splitting. but don't forget to protect against the \! to avoid splitting on them Remember: A Nagios-like command is command_name!arg1!arg2!... :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/commandcall.py#L157-L169
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_a_satellite_link
def get_a_satellite_link(sat_type, sat_dict): """Get a SatelliteLink object for a given satellite type and a dictionary :param sat_type: type of satellite :param sat_dict: satellite configuration data :return: """ cls = get_alignak_class('alignak.objects.%slink.%sLink' %...
python
def get_a_satellite_link(sat_type, sat_dict): """Get a SatelliteLink object for a given satellite type and a dictionary :param sat_type: type of satellite :param sat_dict: satellite configuration data :return: """ cls = get_alignak_class('alignak.objects.%slink.%sLink' %...
Get a SatelliteLink object for a given satellite type and a dictionary :param sat_type: type of satellite :param sat_dict: satellite configuration data :return:
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L306-L314
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_livestate
def get_livestate(self): """Get the SatelliteLink live state. The live state is a tuple information containing a state identifier and a message, where: state is: - 0 for an up and running satellite - 1 if the satellite is not reachale - 2 if the satellite...
python
def get_livestate(self): """Get the SatelliteLink live state. The live state is a tuple information containing a state identifier and a message, where: state is: - 0 for an up and running satellite - 1 if the satellite is not reachale - 2 if the satellite...
Get the SatelliteLink live state. The live state is a tuple information containing a state identifier and a message, where: state is: - 0 for an up and running satellite - 1 if the satellite is not reachale - 2 if the satellite is dead - 3 else (not a...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L316-L344
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.set_arbiter_satellite_map
def set_arbiter_satellite_map(self, satellite_map=None): """ satellite_map is the satellites map in current context: - A SatelliteLink is owned by an Arbiter - satellite_map attribute of a SatelliteLink is the map defined IN THE satellite configuration...
python
def set_arbiter_satellite_map(self, satellite_map=None): """ satellite_map is the satellites map in current context: - A SatelliteLink is owned by an Arbiter - satellite_map attribute of a SatelliteLink is the map defined IN THE satellite configuration...
satellite_map is the satellites map in current context: - A SatelliteLink is owned by an Arbiter - satellite_map attribute of a SatelliteLink is the map defined IN THE satellite configuration but for creating connections, we need to have the satellites map...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L346-L361
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_and_clear_context
def get_and_clear_context(self): """Get and clean all of our broks, actions, external commands and homerun :return: list of all broks of the satellite link :rtype: list """ res = (self.broks, self.actions, self.wait_homerun, self.pushed_commands) self.broks = [] ...
python
def get_and_clear_context(self): """Get and clean all of our broks, actions, external commands and homerun :return: list of all broks of the satellite link :rtype: list """ res = (self.broks, self.actions, self.wait_homerun, self.pushed_commands) self.broks = [] ...
Get and clean all of our broks, actions, external commands and homerun :return: list of all broks of the satellite link :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L363-L374
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.prepare_for_conf
def prepare_for_conf(self): """Initialize the pushed configuration dictionary with the inner properties that are to be propagated to the satellite link. :return: None """ logger.debug("- preparing: %s", self) self.cfg = { 'self_conf': self.give_satellite_cfg(...
python
def prepare_for_conf(self): """Initialize the pushed configuration dictionary with the inner properties that are to be propagated to the satellite link. :return: None """ logger.debug("- preparing: %s", self) self.cfg = { 'self_conf': self.give_satellite_cfg(...
Initialize the pushed configuration dictionary with the inner properties that are to be propagated to the satellite link. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L386-L398
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.give_satellite_cfg
def give_satellite_cfg(self): """Get the default information for a satellite. Overridden by the specific satellites links :return: dictionary of information common to all the links :rtype: dict """ # All the satellite link class properties that are 'to_send' are stored ...
python
def give_satellite_cfg(self): """Get the default information for a satellite. Overridden by the specific satellites links :return: dictionary of information common to all the links :rtype: dict """ # All the satellite link class properties that are 'to_send' are stored ...
Get the default information for a satellite. Overridden by the specific satellites links :return: dictionary of information common to all the links :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L400-L415
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.give_satellite_json
def give_satellite_json(self): """Get the json information for a satellite. This to provide information that will be exposed by a daemon on its HTTP interface. :return: dictionary of information common to all the links :rtype: dict """ daemon_properties = ['type', 'name...
python
def give_satellite_json(self): """Get the json information for a satellite. This to provide information that will be exposed by a daemon on its HTTP interface. :return: dictionary of information common to all the links :rtype: dict """ daemon_properties = ['type', 'name...
Get the json information for a satellite. This to provide information that will be exposed by a daemon on its HTTP interface. :return: dictionary of information common to all the links :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L417-L437
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.manages
def manages(self, cfg_part): """Tell if the satellite is managing this configuration part The managed configuration is formed as a dictionary indexed on the link instance_id: { u'SchedulerLink_1': { u'hash': u'4d08630a3483e1eac7898e7a721bd5d7768c8320', ...
python
def manages(self, cfg_part): """Tell if the satellite is managing this configuration part The managed configuration is formed as a dictionary indexed on the link instance_id: { u'SchedulerLink_1': { u'hash': u'4d08630a3483e1eac7898e7a721bd5d7768c8320', ...
Tell if the satellite is managing this configuration part The managed configuration is formed as a dictionary indexed on the link instance_id: { u'SchedulerLink_1': { u'hash': u'4d08630a3483e1eac7898e7a721bd5d7768c8320', u'push_flavor': u'4d08630a3483e1eac78...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L439-L480
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.create_connection
def create_connection(self): """Initialize HTTP connection with a satellite (con attribute) and set its uri attribute This is called on the satellite link initialization :return: None """ # Create the HTTP client for the connection try: self.con = HT...
python
def create_connection(self): """Initialize HTTP connection with a satellite (con attribute) and set its uri attribute This is called on the satellite link initialization :return: None """ # Create the HTTP client for the connection try: self.con = HT...
Initialize HTTP connection with a satellite (con attribute) and set its uri attribute This is called on the satellite link initialization :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L482-L502
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.set_alive
def set_alive(self): """Set alive, reachable, and reset attempts. If we change state, raise a status brok update alive, means the daemon is prenset in the system reachable, means that the HTTP connection is valid With this function we confirm that the daemon is reachable and, t...
python
def set_alive(self): """Set alive, reachable, and reset attempts. If we change state, raise a status brok update alive, means the daemon is prenset in the system reachable, means that the HTTP connection is valid With this function we confirm that the daemon is reachable and, t...
Set alive, reachable, and reset attempts. If we change state, raise a status brok update alive, means the daemon is prenset in the system reachable, means that the HTTP connection is valid With this function we confirm that the daemon is reachable and, thus, we assume it is alive! ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L504-L523
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.set_dead
def set_dead(self): """Set the satellite into dead state: If we change state, raise a status brok update :return:None """ was_alive = self.alive self.alive = False self.reachable = False self.attempt = 0 # We will have to create a new connection.....
python
def set_dead(self): """Set the satellite into dead state: If we change state, raise a status brok update :return:None """ was_alive = self.alive self.alive = False self.reachable = False self.attempt = 0 # We will have to create a new connection.....
Set the satellite into dead state: If we change state, raise a status brok update :return:None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L525-L541
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.add_failed_check_attempt
def add_failed_check_attempt(self, reason=''): """Set the daemon as unreachable and add a failed attempt if we reach the maximum attempts, set the daemon as dead :param reason: the reason of adding an attempts (stack trace sometimes) :type reason: str :return: None """ ...
python
def add_failed_check_attempt(self, reason=''): """Set the daemon as unreachable and add a failed attempt if we reach the maximum attempts, set the daemon as dead :param reason: the reason of adding an attempts (stack trace sometimes) :type reason: str :return: None """ ...
Set the daemon as unreachable and add a failed attempt if we reach the maximum attempts, set the daemon as dead :param reason: the reason of adding an attempts (stack trace sometimes) :type reason: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L543-L575
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.valid_connection
def valid_connection(*outer_args, **outer_kwargs): # pylint: disable=unused-argument, no-method-argument """Check if the daemon connection is established and valid""" def decorator(func): # pylint: disable=missing-docstring def decorated(*args, **kwargs): # pylint: disable=missing-...
python
def valid_connection(*outer_args, **outer_kwargs): # pylint: disable=unused-argument, no-method-argument """Check if the daemon connection is established and valid""" def decorator(func): # pylint: disable=missing-docstring def decorated(*args, **kwargs): # pylint: disable=missing-...
Check if the daemon connection is established and valid
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L577-L592
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.communicate
def communicate(*outer_args, **outer_kwargs): # pylint: disable=unused-argument, no-method-argument """Check if the daemon connection is authorized and valid""" def decorator(func): # pylint: disable=missing-docstring def decorated(*args, **kwargs): # pylint: disable=missing-docstr...
python
def communicate(*outer_args, **outer_kwargs): # pylint: disable=unused-argument, no-method-argument """Check if the daemon connection is authorized and valid""" def decorator(func): # pylint: disable=missing-docstring def decorated(*args, **kwargs): # pylint: disable=missing-docstr...
Check if the daemon connection is authorized and valid
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L594-L642
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_running_id
def get_running_id(self): """Send a HTTP request to the satellite (GET /identity) Used to get the daemon running identifier that allows to know if the daemon got restarted This is called on connection initialization or re-connection If the daemon is notreachable, this function will rai...
python
def get_running_id(self): """Send a HTTP request to the satellite (GET /identity) Used to get the daemon running identifier that allows to know if the daemon got restarted This is called on connection initialization or re-connection If the daemon is notreachable, this function will rai...
Send a HTTP request to the satellite (GET /identity) Used to get the daemon running identifier that allows to know if the daemon got restarted This is called on connection initialization or re-connection If the daemon is notreachable, this function will raise an exception and the caller ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L645-L685
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.stop_request
def stop_request(self, stop_now=False): """Send a stop request to the daemon :param stop_now: stop now or go to stop wait mode :type stop_now: bool :return: the daemon response (True) """ logger.debug("Sending stop request to %s, stop now: %s", self.name, stop_now) ...
python
def stop_request(self, stop_now=False): """Send a stop request to the daemon :param stop_now: stop now or go to stop wait mode :type stop_now: bool :return: the daemon response (True) """ logger.debug("Sending stop request to %s, stop now: %s", self.name, stop_now) ...
Send a stop request to the daemon :param stop_now: stop now or go to stop wait mode :type stop_now: bool :return: the daemon response (True)
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L689-L699
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.update_infos
def update_infos(self, forced=False, test=False): """Update satellite info each self.polling_interval seconds so we smooth arbiter actions for just useful actions. Raise a satellite update status Brok If forced is True, then ignore the ping period. This is used when the configuration ...
python
def update_infos(self, forced=False, test=False): """Update satellite info each self.polling_interval seconds so we smooth arbiter actions for just useful actions. Raise a satellite update status Brok If forced is True, then ignore the ping period. This is used when the configuration ...
Update satellite info each self.polling_interval seconds so we smooth arbiter actions for just useful actions. Raise a satellite update status Brok If forced is True, then ignore the ping period. This is used when the configuration has not yet been dispatched to the Arbiter satellites....
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L703-L740
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_daemon_stats
def get_daemon_stats(self, details=False): """Send a HTTP request to the satellite (GET /get_daemon_stats) :return: Daemon statistics :rtype: dict """ logger.debug("Get daemon statistics for %s, %s %s", self.name, self.alive, self.reachable) return self.con.get('stats%s'...
python
def get_daemon_stats(self, details=False): """Send a HTTP request to the satellite (GET /get_daemon_stats) :return: Daemon statistics :rtype: dict """ logger.debug("Get daemon statistics for %s, %s %s", self.name, self.alive, self.reachable) return self.con.get('stats%s'...
Send a HTTP request to the satellite (GET /get_daemon_stats) :return: Daemon statistics :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L744-L751
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_initial_broks
def get_initial_broks(self, broker_name): """Send a HTTP request to the satellite (GET /_initial_broks) Used to build the initial broks for a broker connecting to a scheduler :param broker_name: the concerned broker name :type broker_name: str :return: Boolean indicating if the...
python
def get_initial_broks(self, broker_name): """Send a HTTP request to the satellite (GET /_initial_broks) Used to build the initial broks for a broker connecting to a scheduler :param broker_name: the concerned broker name :type broker_name: str :return: Boolean indicating if the...
Send a HTTP request to the satellite (GET /_initial_broks) Used to build the initial broks for a broker connecting to a scheduler :param broker_name: the concerned broker name :type broker_name: str :return: Boolean indicating if the running id changed :type: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L755-L766