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/objects/satellitelink.py
SatelliteLink.wait_new_conf
def wait_new_conf(self): """Send a HTTP request to the satellite (GET /wait_new_conf) :return: True if wait new conf, otherwise False :rtype: bool """ logger.debug("Wait new configuration for %s, %s %s", self.name, self.alive, self.reachable) return self.con.get('_wait_n...
python
def wait_new_conf(self): """Send a HTTP request to the satellite (GET /wait_new_conf) :return: True if wait new conf, otherwise False :rtype: bool """ logger.debug("Wait new configuration for %s, %s %s", self.name, self.alive, self.reachable) return self.con.get('_wait_n...
Send a HTTP request to the satellite (GET /wait_new_conf) :return: True if wait new conf, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L770-L777
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.put_conf
def put_conf(self, configuration, test=False): """Send the configuration to the satellite HTTP request to the satellite (POST /push_configuration) If test is True, store the configuration internally :param configuration: The conf to send (data depend on the satellite) :type con...
python
def put_conf(self, configuration, test=False): """Send the configuration to the satellite HTTP request to the satellite (POST /push_configuration) If test is True, store the configuration internally :param configuration: The conf to send (data depend on the satellite) :type con...
Send the configuration to the satellite HTTP request to the satellite (POST /push_configuration) If test is True, store the configuration internally :param configuration: The conf to send (data depend on the satellite) :type configuration: :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L781-L799
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.has_a_conf
def has_a_conf(self, magic_hash=None): # pragma: no cover """Send a HTTP request to the satellite (GET /have_conf) Used to know if the satellite has a conf :param magic_hash: Config hash. Only used for HA arbiter communication :type magic_hash: int :return: Boolean indicating i...
python
def has_a_conf(self, magic_hash=None): # pragma: no cover """Send a HTTP request to the satellite (GET /have_conf) Used to know if the satellite has a conf :param magic_hash: Config hash. Only used for HA arbiter communication :type magic_hash: int :return: Boolean indicating i...
Send a HTTP request to the satellite (GET /have_conf) Used to know if the satellite has a conf :param magic_hash: Config hash. Only used for HA arbiter communication :type magic_hash: int :return: Boolean indicating if the satellite has a (specific) configuration :type: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L803-L814
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_conf
def get_conf(self, test=False): """Send a HTTP request to the satellite (GET /managed_configurations) and update the cfg_managed attribute with the new information Set to {} on failure the managed configurations are a dictionary which keys are the scheduler link instance id and ...
python
def get_conf(self, test=False): """Send a HTTP request to the satellite (GET /managed_configurations) and update the cfg_managed attribute with the new information Set to {} on failure the managed configurations are a dictionary which keys are the scheduler link instance id and ...
Send a HTTP request to the satellite (GET /managed_configurations) and update the cfg_managed attribute with the new information Set to {} on failure the managed configurations are a dictionary which keys are the scheduler link instance id and the values are the push_flavor If ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L818-L856
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.push_broks
def push_broks(self, broks): """Send a HTTP request to the satellite (POST /push_broks) Send broks to the satellite :param broks: Brok list to send :type broks: list :return: True on success, False on failure :rtype: bool """ logger.debug("[%s] Pushing %d...
python
def push_broks(self, broks): """Send a HTTP request to the satellite (POST /push_broks) Send broks to the satellite :param broks: Brok list to send :type broks: list :return: True on success, False on failure :rtype: bool """ logger.debug("[%s] Pushing %d...
Send a HTTP request to the satellite (POST /push_broks) Send broks to the satellite :param broks: Brok list to send :type broks: list :return: True on success, False on failure :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L860-L870
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.push_actions
def push_actions(self, actions, scheduler_instance_id): """Post the actions to execute to the satellite. Indeed, a scheduler post its checks to a poller and its actions to a reactionner. :param actions: Action list to send :type actions: list :param scheduler_instance_id: Schedu...
python
def push_actions(self, actions, scheduler_instance_id): """Post the actions to execute to the satellite. Indeed, a scheduler post its checks to a poller and its actions to a reactionner. :param actions: Action list to send :type actions: list :param scheduler_instance_id: Schedu...
Post the actions to execute to the satellite. Indeed, a scheduler post its checks to a poller and its actions to a reactionner. :param actions: Action list to send :type actions: list :param scheduler_instance_id: Scheduler instance identifier :type scheduler_instance_id: uuid ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L874-L888
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.push_results
def push_results(self, results, scheduler_name): """Send a HTTP request to the satellite (POST /put_results) Send actions results to the satellite :param results: Results list to send :type results: list :param scheduler_name: Scheduler name :type scheduler_name: uuid ...
python
def push_results(self, results, scheduler_name): """Send a HTTP request to the satellite (POST /put_results) Send actions results to the satellite :param results: Results list to send :type results: list :param scheduler_name: Scheduler name :type scheduler_name: uuid ...
Send a HTTP request to the satellite (POST /put_results) Send actions results to the satellite :param results: Results list to send :type results: list :param scheduler_name: Scheduler name :type scheduler_name: uuid :return: True on success, False on failure :rt...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L892-L906
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.push_external_commands
def push_external_commands(self, commands): """Send a HTTP request to the satellite (POST /r_un_external_commands) to send the external commands to the satellite :param results: Results list to send :type results: list :return: True on success, False on failure :rtype: b...
python
def push_external_commands(self, commands): """Send a HTTP request to the satellite (POST /r_un_external_commands) to send the external commands to the satellite :param results: Results list to send :type results: list :return: True on success, False on failure :rtype: b...
Send a HTTP request to the satellite (POST /r_un_external_commands) to send the external commands to the satellite :param results: Results list to send :type results: list :return: True on success, False on failure :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L910-L920
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_external_commands
def get_external_commands(self): """Send a HTTP request to the satellite (GET /_external_commands) to get the external commands from the satellite. :return: External Command list on success, [] on failure :rtype: list """ res = self.con.get('_external_commands', wait=Fal...
python
def get_external_commands(self): """Send a HTTP request to the satellite (GET /_external_commands) to get the external commands from the satellite. :return: External Command list on success, [] on failure :rtype: list """ res = self.con.get('_external_commands', wait=Fal...
Send a HTTP request to the satellite (GET /_external_commands) to get the external commands from the satellite. :return: External Command list on success, [] on failure :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L924-L933
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_broks
def get_broks(self, broker_name): """Send a HTTP request to the satellite (GET /_broks) Get broks from the satellite. Un-serialize data received. :param broker_name: the concerned broker link :type broker_name: BrokerLink :return: Broks list on success, [] on failure ...
python
def get_broks(self, broker_name): """Send a HTTP request to the satellite (GET /_broks) Get broks from the satellite. Un-serialize data received. :param broker_name: the concerned broker link :type broker_name: BrokerLink :return: Broks list on success, [] on failure ...
Send a HTTP request to the satellite (GET /_broks) Get broks from the satellite. Un-serialize data received. :param broker_name: the concerned broker link :type broker_name: BrokerLink :return: Broks list on success, [] on failure :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L937-L949
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_events
def get_events(self): """Send a HTTP request to the satellite (GET /_events) Get monitoring events from the satellite. :return: Broks list on success, [] on failure :rtype: list """ res = self.con.get('_events', wait=False) logger.debug("Got events from %s: %s", ...
python
def get_events(self): """Send a HTTP request to the satellite (GET /_events) Get monitoring events from the satellite. :return: Broks list on success, [] on failure :rtype: list """ res = self.con.get('_events', wait=False) logger.debug("Got events from %s: %s", ...
Send a HTTP request to the satellite (GET /_events) Get monitoring events from the satellite. :return: Broks list on success, [] on failure :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L953-L962
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_results
def get_results(self, scheduler_instance_id): """Send a HTTP request to the satellite (GET /_results) Get actions results from satellite (only passive satellites expose this method. :param scheduler_instance_id: scheduler instance identifier :type scheduler_instance_id: str :ret...
python
def get_results(self, scheduler_instance_id): """Send a HTTP request to the satellite (GET /_results) Get actions results from satellite (only passive satellites expose this method. :param scheduler_instance_id: scheduler instance identifier :type scheduler_instance_id: str :ret...
Send a HTTP request to the satellite (GET /_results) Get actions results from satellite (only passive satellites expose this method. :param scheduler_instance_id: scheduler instance identifier :type scheduler_instance_id: str :return: Results list on success, [] on failure :rtyp...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L965-L976
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLink.get_actions
def get_actions(self, params): """Send a HTTP request to the satellite (GET /_checks) Get actions from the scheduler. Un-serialize data received. :param params: the request parameters :type params: str :return: Actions list on success, [] on failure :rtype: list ...
python
def get_actions(self, params): """Send a HTTP request to the satellite (GET /_checks) Get actions from the scheduler. Un-serialize data received. :param params: the request parameters :type params: str :return: Actions list on success, [] on failure :rtype: list ...
Send a HTTP request to the satellite (GET /_checks) Get actions from the scheduler. Un-serialize data received. :param params: the request parameters :type params: str :return: Actions list on success, [] on failure :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L979-L991
Alignak-monitoring/alignak
alignak/objects/satellitelink.py
SatelliteLinks.linkify
def linkify(self, modules): """Link modules and Satellite links :param modules: Module object list :type modules: alignak.objects.module.Modules :return: None """ logger.debug("Linkify %s with %s", self, modules) self.linkify_s_by_module(modules)
python
def linkify(self, modules): """Link modules and Satellite links :param modules: Module object list :type modules: alignak.objects.module.Modules :return: None """ logger.debug("Linkify %s with %s", self, modules) self.linkify_s_by_module(modules)
Link modules and Satellite links :param modules: Module object list :type modules: alignak.objects.module.Modules :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/satellitelink.py#L1005-L1013
Alignak-monitoring/alignak
alignak/notification.py
Notification.get_return_from
def get_return_from(self, notif): """Setter of exit_status and execution_time attributes :param notif: notification to get data from :type notif: alignak.notification.Notification :return: None """ self.exit_status = notif.exit_status self.execution_time = notif....
python
def get_return_from(self, notif): """Setter of exit_status and execution_time attributes :param notif: notification to get data from :type notif: alignak.notification.Notification :return: None """ self.exit_status = notif.exit_status self.execution_time = notif....
Setter of exit_status and execution_time attributes :param notif: notification to get data from :type notif: alignak.notification.Notification :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/notification.py#L164-L172
Alignak-monitoring/alignak
alignak/notification.py
Notification.get_initial_status_brok
def get_initial_status_brok(self): """Get a initial status brok :return: brok with wanted data :rtype: alignak.brok.Brok """ data = {'uuid': self.uuid} self.fill_data_brok_from(data, 'full_status') return Brok({'type': 'notification_raise', 'data': data})
python
def get_initial_status_brok(self): """Get a initial status brok :return: brok with wanted data :rtype: alignak.brok.Brok """ data = {'uuid': self.uuid} self.fill_data_brok_from(data, 'full_status') return Brok({'type': 'notification_raise', 'data': data})
Get a initial status brok :return: brok with wanted data :rtype: alignak.brok.Brok
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/notification.py#L191-L199
Alignak-monitoring/alignak
alignak/notification.py
Notification.serialize
def serialize(self): """This function serialize into a simple dict object. It is used when transferring data to other daemons over the network (http) Here we directly return all attributes :return: json representation of a Timeperiod :rtype: dict """ res = super...
python
def serialize(self): """This function serialize into a simple dict object. It is used when transferring data to other daemons over the network (http) Here we directly return all attributes :return: json representation of a Timeperiod :rtype: dict """ res = super...
This function serialize into a simple dict object. It is used when transferring data to other daemons over the network (http) Here we directly return all attributes :return: json representation of a Timeperiod :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/notification.py#L201-L216
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.add
def add(self, elt): """Generic function to add objects to the daemon internal lists. Manage Broks, External commands and Messages (from modules queues) :param elt: object to add :type elt: alignak.AlignakObject :return: None """ if isinstance(elt, Brok): ...
python
def add(self, elt): """Generic function to add objects to the daemon internal lists. Manage Broks, External commands and Messages (from modules queues) :param elt: object to add :type elt: alignak.AlignakObject :return: None """ if isinstance(elt, Brok): ...
Generic function to add objects to the daemon internal lists. Manage Broks, External commands and Messages (from modules queues) :param elt: object to add :type elt: alignak.AlignakObject :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L131-L186
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.manage_brok
def manage_brok(self, brok): """Get a brok. We put brok data to the modules :param brok: object with data :type brok: object :return: None """ # Unserialize the brok before consuming it brok.prepare() for module in self.modules_manager.get_intern...
python
def manage_brok(self, brok): """Get a brok. We put brok data to the modules :param brok: object with data :type brok: object :return: None """ # Unserialize the brok before consuming it brok.prepare() for module in self.modules_manager.get_intern...
Get a brok. We put brok data to the modules :param brok: object with data :type brok: object :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L189-L209
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.get_internal_broks
def get_internal_broks(self): """Get all broks from self.broks_internal_raised and append them to our broks to manage :return: None """ statsmgr.gauge('get-new-broks-count.broker', len(self.internal_broks)) # Add the broks to our global list self.external_broks.e...
python
def get_internal_broks(self): """Get all broks from self.broks_internal_raised and append them to our broks to manage :return: None """ statsmgr.gauge('get-new-broks-count.broker', len(self.internal_broks)) # Add the broks to our global list self.external_broks.e...
Get all broks from self.broks_internal_raised and append them to our broks to manage :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L211-L220
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.get_arbiter_broks
def get_arbiter_broks(self): """Get the broks from the arbiters, but as the arbiter_broks list can be push by arbiter without Global lock, we must protect this with a lock TODO: really? check this arbiter behavior! :return: None """ with self.arbiter_broks_lock:...
python
def get_arbiter_broks(self): """Get the broks from the arbiters, but as the arbiter_broks list can be push by arbiter without Global lock, we must protect this with a lock TODO: really? check this arbiter behavior! :return: None """ with self.arbiter_broks_lock:...
Get the broks from the arbiters, but as the arbiter_broks list can be push by arbiter without Global lock, we must protect this with a lock TODO: really? check this arbiter behavior! :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L222-L235
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.get_new_broks
def get_new_broks(self): """Get new broks from our satellites :return: None """ for satellites in [self.schedulers, self.pollers, self.reactionners, self.receivers]: for satellite_link in list(satellites.values()): logger.debug("Getting broks from %s", satell...
python
def get_new_broks(self): """Get new broks from our satellites :return: None """ for satellites in [self.schedulers, self.pollers, self.reactionners, self.receivers]: for satellite_link in list(satellites.values()): logger.debug("Getting broks from %s", satell...
Get new broks from our satellites :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L237-L264
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.setup_new_conf
def setup_new_conf(self): # pylint: disable=too-many-branches, too-many-locals """Broker custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a broker daemon: - get and configure its pollers, reactionners and rece...
python
def setup_new_conf(self): # pylint: disable=too-many-branches, too-many-locals """Broker custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a broker daemon: - get and configure its pollers, reactionners and rece...
Broker custom setup_new_conf method This function calls the base satellite treatment and manages the configuration needed for a broker daemon: - get and configure its pollers, reactionners and receivers relation - configure the modules :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L277-L382
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.clean_previous_run
def clean_previous_run(self): """Clean all (when we received new conf) :return: None """ # Execute the base class treatment... super(Broker, self).clean_previous_run() # Clean all satellites relations self.pollers.clear() self.reactionners.clear() ...
python
def clean_previous_run(self): """Clean all (when we received new conf) :return: None """ # Execute the base class treatment... super(Broker, self).clean_previous_run() # Clean all satellites relations self.pollers.clear() self.reactionners.clear() ...
Clean all (when we received new conf) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L384-L402
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.do_loop_turn
def do_loop_turn(self): # pylint: disable=too-many-branches """Loop used to: * get initial status broks * check if modules are alive, if not restart them * get broks from ourself, the arbiters and our satellites * add broks to the queue of each external module ...
python
def do_loop_turn(self): # pylint: disable=too-many-branches """Loop used to: * get initial status broks * check if modules are alive, if not restart them * get broks from ourself, the arbiters and our satellites * add broks to the queue of each external module ...
Loop used to: * get initial status broks * check if modules are alive, if not restart them * get broks from ourself, the arbiters and our satellites * add broks to the queue of each external module * manage broks with each internal module If the internal broks mana...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L408-L514
Alignak-monitoring/alignak
alignak/daemons/brokerdaemon.py
Broker.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(Broker, self).get_daemon_stats(details=details) res.update({'name': self.name, 't...
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(Broker, self).get_daemon_stats(details=details) res.update({'name': self.name, 't...
Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/daemons/brokerdaemon.py#L516-L535
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.add_group_members
def add_group_members(self, members): """Add a new group member to the groups list :param members: member name :type members: str :return: None """ if not isinstance(members, list): members = [members] if not getattr(self, 'group_members', None): ...
python
def add_group_members(self, members): """Add a new group member to the groups list :param members: member name :type members: str :return: None """ if not isinstance(members, list): members = [members] if not getattr(self, 'group_members', None): ...
Add a new group member to the groups list :param members: member name :type members: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L221-L234
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.prepare_satellites
def prepare_satellites(self, satellites): """Update the following attributes of a realm:: * nb_*satellite type*s * self.potential_*satellite type*s (satellite types are scheduler, reactionner, poller, broker and receiver) :param satellites: dict of SatelliteLink objects ...
python
def prepare_satellites(self, satellites): """Update the following attributes of a realm:: * nb_*satellite type*s * self.potential_*satellite type*s (satellite types are scheduler, reactionner, poller, broker and receiver) :param satellites: dict of SatelliteLink objects ...
Update the following attributes of a realm:: * nb_*satellite type*s * self.potential_*satellite type*s (satellite types are scheduler, reactionner, poller, broker and receiver) :param satellites: dict of SatelliteLink objects :type satellites: dict :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L236-L272
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_realms_by_explosion
def get_realms_by_explosion(self, realms): """Get all members of this realm including members of sub-realms on multi-levels :param realms: realms list, used to look for a specific one :type realms: alignak.objects.realm.Realms :return: list of members and add realm to realm_members attr...
python
def get_realms_by_explosion(self, realms): """Get all members of this realm including members of sub-realms on multi-levels :param realms: realms list, used to look for a specific one :type realms: alignak.objects.realm.Realms :return: list of members and add realm to realm_members attr...
Get all members of this realm including members of sub-realms on multi-levels :param realms: realms list, used to look for a specific one :type realms: alignak.objects.realm.Realms :return: list of members and add realm to realm_members attribute :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L274-L306
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.set_level
def set_level(self, level, realms): """Set the realm level in the realms hierarchy :return: None """ self.level = level if not self.level: logger.info("- %s", self.get_name()) else: logger.info(" %s %s", '+' * self.level, self.get_name()) ...
python
def set_level(self, level, realms): """Set the realm level in the realms hierarchy :return: None """ self.level = level if not self.level: logger.info("- %s", self.get_name()) else: logger.info(" %s %s", '+' * self.level, self.get_name()) ...
Set the realm level in the realms hierarchy :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L308-L335
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_all_subs_satellites_by_type
def get_all_subs_satellites_by_type(self, sat_type, realms): """Get all satellites of the wanted type in this realm recursively :param sat_type: satellite type wanted (scheduler, poller ..) :type sat_type: :param realms: all realms :type realms: list of realm object :ret...
python
def get_all_subs_satellites_by_type(self, sat_type, realms): """Get all satellites of the wanted type in this realm recursively :param sat_type: satellite type wanted (scheduler, poller ..) :type sat_type: :param realms: all realms :type realms: list of realm object :ret...
Get all satellites of the wanted type in this realm recursively :param sat_type: satellite type wanted (scheduler, poller ..) :type sat_type: :param realms: all realms :type realms: list of realm object :return: list of satellite in this realm :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L337-L350
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_satellites_by_type
def get_satellites_by_type(self, s_type): """Generic function to access one of the satellite attribute ie : self.pollers, self.reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.*type*s :rtype: list """ if hasattr(self,...
python
def get_satellites_by_type(self, s_type): """Generic function to access one of the satellite attribute ie : self.pollers, self.reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.*type*s :rtype: list """ if hasattr(self,...
Generic function to access one of the satellite attribute ie : self.pollers, self.reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.*type*s :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L352-L366
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_potential_satellites_by_type
def get_potential_satellites_by_type(self, satellites, s_type): """Generic function to access one of the potential satellite attribute ie : self.potential_pollers, self.potential_reactionners ... :param satellites: list of SatelliteLink objects :type satellites: SatelliteLink list ...
python
def get_potential_satellites_by_type(self, satellites, s_type): """Generic function to access one of the potential satellite attribute ie : self.potential_pollers, self.potential_reactionners ... :param satellites: list of SatelliteLink objects :type satellites: SatelliteLink list ...
Generic function to access one of the potential satellite attribute ie : self.potential_pollers, self.potential_reactionners ... :param satellites: list of SatelliteLink objects :type satellites: SatelliteLink list :param s_type: satellite type wanted :type s_type: str :...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L368-L398
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_nb_of_must_have_satellites
def get_nb_of_must_have_satellites(self, s_type): """Generic function to access one of the number satellite attribute ie : self.nb_pollers, self.nb_reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.nb_*type*s :rtype: int """ ...
python
def get_nb_of_must_have_satellites(self, s_type): """Generic function to access one of the number satellite attribute ie : self.nb_pollers, self.nb_reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.nb_*type*s :rtype: int """ ...
Generic function to access one of the number satellite attribute ie : self.nb_pollers, self.nb_reactionners ... :param s_type: satellite type wanted :type s_type: str :return: self.nb_*type*s :rtype: int
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L400-L413
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_links_for_a_broker
def get_links_for_a_broker(self, pollers, reactionners, receivers, realms, manage_sub_realms=False): """Get a configuration dictionary with pollers, reactionners and receivers links for a broker :param pollers: pollers :type pollers: :param reactio...
python
def get_links_for_a_broker(self, pollers, reactionners, receivers, realms, manage_sub_realms=False): """Get a configuration dictionary with pollers, reactionners and receivers links for a broker :param pollers: pollers :type pollers: :param reactio...
Get a configuration dictionary with pollers, reactionners and receivers links for a broker :param pollers: pollers :type pollers: :param reactionners: reactionners :type reactionners: :param receivers: receivers :type receivers: :param realms: realms ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L415-L472
Alignak-monitoring/alignak
alignak/objects/realm.py
Realm.get_links_for_a_scheduler
def get_links_for_a_scheduler(self, pollers, reactionners, brokers): """Get a configuration dictionary with pollers, reactionners and brokers links for a scheduler :return: dict containing pollers, reactionners and brokers links (key is satellite id) :rtype: dict """ # ...
python
def get_links_for_a_scheduler(self, pollers, reactionners, brokers): """Get a configuration dictionary with pollers, reactionners and brokers links for a scheduler :return: dict containing pollers, reactionners and brokers links (key is satellite id) :rtype: dict """ # ...
Get a configuration dictionary with pollers, reactionners and brokers links for a scheduler :return: dict containing pollers, reactionners and brokers links (key is satellite id) :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L474-L519
Alignak-monitoring/alignak
alignak/objects/realm.py
Realms.linkify
def linkify(self): """The realms linkify is done during the default realms/satellites initialization in the Config class. This functione only finishes the process by setting the realm level property according to the realm position in the hierarchy. All ` level` 0 realms are mai...
python
def linkify(self): """The realms linkify is done during the default realms/satellites initialization in the Config class. This functione only finishes the process by setting the realm level property according to the realm position in the hierarchy. All ` level` 0 realms are mai...
The realms linkify is done during the default realms/satellites initialization in the Config class. This functione only finishes the process by setting the realm level property according to the realm position in the hierarchy. All ` level` 0 realms are main realms that have their own h...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L540-L563
Alignak-monitoring/alignak
alignak/objects/realm.py
Realms.explode
def explode(self): """Explode realms with each realm_members and higher_realms to get all the realms sub realms. :return: None """ # Manage higher realms where defined for realm in [tmp_realm for tmp_realm in self if tmp_realm.higher_realms]: for parent in re...
python
def explode(self): """Explode realms with each realm_members and higher_realms to get all the realms sub realms. :return: None """ # Manage higher realms where defined for realm in [tmp_realm for tmp_realm in self if tmp_realm.higher_realms]: for parent in re...
Explode realms with each realm_members and higher_realms to get all the realms sub realms. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L565-L587
Alignak-monitoring/alignak
alignak/objects/realm.py
Realms.get_default
def get_default(self, check=False): """Get the default realm :param check: check correctness if True :type check: bool :return: Default realm of Alignak configuration :rtype: alignak.objects.realm.Realm | None """ found = [] for realm in sorted(self, key=...
python
def get_default(self, check=False): """Get the default realm :param check: check correctness if True :type check: bool :return: Default realm of Alignak configuration :rtype: alignak.objects.realm.Realm | None """ found = [] for realm in sorted(self, key=...
Get the default realm :param check: check correctness if True :type check: bool :return: Default realm of Alignak configuration :rtype: alignak.objects.realm.Realm | None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/realm.py#L589-L637
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.reload_configuration
def reload_configuration(self): """Ask to the arbiter to reload the monitored configuration **Note** tha the arbiter will not reload its main configuration file (eg. alignak.ini) but it will reload the monitored objects from the Nagios legacy files or from the Alignak backend! ...
python
def reload_configuration(self): """Ask to the arbiter to reload the monitored configuration **Note** tha the arbiter will not reload its main configuration file (eg. alignak.ini) but it will reload the monitored objects from the Nagios legacy files or from the Alignak backend! ...
Ask to the arbiter to reload the monitored configuration **Note** tha the arbiter will not reload its main configuration file (eg. alignak.ini) but it will reload the monitored objects from the Nagios legacy files or from the Alignak backend! In case of any error, this function returns...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L52-L79
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.backend_notification
def backend_notification(self, event=None, parameters=None): """The Alignak backend raises an event to the Alignak arbiter ----- Possible events are: - creation, for a realm or an host creation - deletion, for a realm or an host deletion Calls the reload configuration fu...
python
def backend_notification(self, event=None, parameters=None): """The Alignak backend raises an event to the Alignak arbiter ----- Possible events are: - creation, for a realm or an host creation - deletion, for a realm or an host deletion Calls the reload configuration fu...
The Alignak backend raises an event to the Alignak arbiter ----- Possible events are: - creation, for a realm or an host creation - deletion, for a realm or an host deletion Calls the reload configuration function if event is creation or deletion Else, nothing for the m...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L84-L133
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.command
def command(self, command=None, timestamp=None, element=None, host=None, service=None, user=None, parameters=None): # pylint: disable=too-many-branches """ Request to execute an external command Allowed parameters are: `command`: mandatory parameter containing the whole ...
python
def command(self, command=None, timestamp=None, element=None, host=None, service=None, user=None, parameters=None): # pylint: disable=too-many-branches """ Request to execute an external command Allowed parameters are: `command`: mandatory parameter containing the whole ...
Request to execute an external command Allowed parameters are: `command`: mandatory parameter containing the whole command line or only the command name `timestamp`: optional parameter containing the timestamp. If not present, the current timestamp is added in the command line ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L138-L224
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.monitoring_problems
def monitoring_problems(self): """Get Alignak detailed monitoring status This will return an object containing the properties of the `identity`, plus a `problems` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data wer...
python
def monitoring_problems(self): """Get Alignak detailed monitoring status This will return an object containing the properties of the `identity`, plus a `problems` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data wer...
Get Alignak detailed monitoring status This will return an object containing the properties of the `identity`, plus a `problems` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data were fetched - problems, which is an ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L234-L295
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.livesynthesis
def livesynthesis(self): """Get Alignak live synthesis This will return an object containing the properties of the `identity`, plus a `livesynthesis` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data were fet...
python
def livesynthesis(self): """Get Alignak live synthesis This will return an object containing the properties of the `identity`, plus a `livesynthesis` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data were fet...
Get Alignak live synthesis This will return an object containing the properties of the `identity`, plus a `livesynthesis` object which contains 2 properties for each known scheduler: - _freshness, which is the timestamp when the provided data were fetched - livesynthesis, which ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L299-L392
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.object
def object(self, o_type, o_name=None): """Get a monitored object from the arbiter. Indeed, the arbiter requires the object from its schedulers. It will iterate in its schedulers list until a matching object is found. Else it will return a Json structure containing _status and _message p...
python
def object(self, o_type, o_name=None): """Get a monitored object from the arbiter. Indeed, the arbiter requires the object from its schedulers. It will iterate in its schedulers list until a matching object is found. Else it will return a Json structure containing _status and _message p...
Get a monitored object from the arbiter. Indeed, the arbiter requires the object from its schedulers. It will iterate in its schedulers list until a matching object is found. Else it will return a Json structure containing _status and _message properties. When found, the result is a se...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L397-L468
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.dump
def dump(self, o_name=None, details=False, raw=False): """Dump an host (all hosts) from the arbiter. The arbiter will get the host (all hosts) information from all its schedulers. This gets the main host information from the scheduler. If details is set, then some more information are ...
python
def dump(self, o_name=None, details=False, raw=False): """Dump an host (all hosts) from the arbiter. The arbiter will get the host (all hosts) information from all its schedulers. This gets the main host information from the scheduler. If details is set, then some more information are ...
Dump an host (all hosts) from the arbiter. The arbiter will get the host (all hosts) information from all its schedulers. This gets the main host information from the scheduler. If details is set, then some more information are provided. This will not get all the host known attributes but only...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L473-L582
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.status
def status(self, details=False): """Get the overall alignak status Returns a list of the satellites as in: { services: [ { livestate: { perf_data: "", timestamp: 1532106561, s...
python
def status(self, details=False): """Get the overall alignak status Returns a list of the satellites as in: { services: [ { livestate: { perf_data: "", timestamp: 1532106561, s...
Get the overall alignak status Returns a list of the satellites as in: { services: [ { livestate: { perf_data: "", timestamp: 1532106561, state: "ok", long_out...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L586-L660
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.events_log
def events_log(self, details=False, count=0, timestamp=0): """Get the most recent Alignak events If count is specifies it is the maximum number of events to return. If timestamp is specified, events older than this timestamp will not be returned The arbiter maintains a list of the mos...
python
def events_log(self, details=False, count=0, timestamp=0): """Get the most recent Alignak events If count is specifies it is the maximum number of events to return. If timestamp is specified, events older than this timestamp will not be returned The arbiter maintains a list of the mos...
Get the most recent Alignak events If count is specifies it is the maximum number of events to return. If timestamp is specified, events older than this timestamp will not be returned The arbiter maintains a list of the most recent Alignak events. This endpoint provides this list. ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L664-L760
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.satellites_list
def satellites_list(self, daemon_type=''): """Get the arbiter satellite names sorted by type Returns a list of the satellites as in: { reactionner: [ "reactionner-master" ], broker: [ "broker-master" ], ...
python
def satellites_list(self, daemon_type=''): """Get the arbiter satellite names sorted by type Returns a list of the satellites as in: { reactionner: [ "reactionner-master" ], broker: [ "broker-master" ], ...
Get the arbiter satellite names sorted by type Returns a list of the satellites as in: { reactionner: [ "reactionner-master" ], broker: [ "broker-master" ], arbiter: [ "arbiter-master" ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L764-L816
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.realms
def realms(self, details=False): """Return the realms / satellites configuration Returns an object containing the hierarchical realms configuration with the main information about each realm: { All: { satellites: { pollers: [ ...
python
def realms(self, details=False): """Return the realms / satellites configuration Returns an object containing the hierarchical realms configuration with the main information about each realm: { All: { satellites: { pollers: [ ...
Return the realms / satellites configuration Returns an object containing the hierarchical realms configuration with the main information about each realm: { All: { satellites: { pollers: [ "poller-master" ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L820-L955
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.satellites_configuration
def satellites_configuration(self): """Return all the configuration data of satellites :return: dict containing satellites data Output looks like this :: {'arbiter' : [{'property1':'value1' ..}, {'property2', 'value11' ..}, ..], 'scheduler': [..], 'poller': [..], ...
python
def satellites_configuration(self): """Return all the configuration data of satellites :return: dict containing satellites data Output looks like this :: {'arbiter' : [{'property1':'value1' ..}, {'property2', 'value11' ..}, ..], 'scheduler': [..], 'poller': [..], ...
Return all the configuration data of satellites :return: dict containing satellites data Output looks like this :: {'arbiter' : [{'property1':'value1' ..}, {'property2', 'value11' ..}, ..], 'scheduler': [..], 'poller': [..], 'reactionner': [..], 'receiver': [..]...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1098-L1139
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.external_commands
def external_commands(self): """Get the external commands from the daemon Use a lock for this function to protect :return: serialized external command list :rtype: str """ res = [] with self.app.external_commands_lock: for cmd in self.app.get_externa...
python
def external_commands(self): """Get the external commands from the daemon Use a lock for this function to protect :return: serialized external command list :rtype: str """ res = [] with self.app.external_commands_lock: for cmd in self.app.get_externa...
Get the external commands from the daemon Use a lock for this function to protect :return: serialized external command list :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1143-L1155
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.search
def search(self): # pylint: disable=no-self-use """ Request available queries Posted data: {u'target': u''} Return the list of available target queries :return: See upper comment :rtype: list """ logger.debug("Grafana search... %s", cherrypy.request.me...
python
def search(self): # pylint: disable=no-self-use """ Request available queries Posted data: {u'target': u''} Return the list of available target queries :return: See upper comment :rtype: list """ logger.debug("Grafana search... %s", cherrypy.request.me...
Request available queries Posted data: {u'target': u''} Return the list of available target queries :return: See upper comment :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1169-L1192
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.query
def query(self): """ Request object passed to datasource.query function: { 'timezone': 'browser', 'panelId': 38, 'range': { 'from': '2018-08-29T02:38:09.633Z', 'to': '2018-08-29T03:38:09.633Z', 'raw': {'from': '...
python
def query(self): """ Request object passed to datasource.query function: { 'timezone': 'browser', 'panelId': 38, 'range': { 'from': '2018-08-29T02:38:09.633Z', 'to': '2018-08-29T03:38:09.633Z', 'raw': {'from': '...
Request object passed to datasource.query function: { 'timezone': 'browser', 'panelId': 38, 'range': { 'from': '2018-08-29T02:38:09.633Z', 'to': '2018-08-29T03:38:09.633Z', 'raw': {'from': 'now-1h', 'to': 'now'} }, ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1197-L1380
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface._build_host_livestate
def _build_host_livestate(self, host_name, livestate): # pylint: disable=no-self-use, too-many-locals """Build and notify the external command for an host livestate PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host_name: the concerned host name :pa...
python
def _build_host_livestate(self, host_name, livestate): # pylint: disable=no-self-use, too-many-locals """Build and notify the external command for an host livestate PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host_name: the concerned host name :pa...
Build and notify the external command for an host livestate PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host_name: the concerned host name :param livestate: livestate dictionary :return: external command line
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1390-L1428
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface._build_service_livestate
def _build_service_livestate(self, host_name, service_name, livestate): # pylint: disable=no-self-use, too-many-locals """Build and notify the external command for a service livestate PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> Create an...
python
def _build_service_livestate(self, host_name, service_name, livestate): # pylint: disable=no-self-use, too-many-locals """Build and notify the external command for a service livestate PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> Create an...
Build and notify the external command for a service livestate PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> Create and post a logcheckresult to the backend for the livestate :param host_name: the concerned host name :param service_name: t...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1430-L1474
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface.host
def host(self): # pylint: disable=too-many-branches """Get a passive checks for an host and its services This function builds the external commands corresponding to the host and services provided information :param host_name: host name :param data: dictionary of the hos...
python
def host(self): # pylint: disable=too-many-branches """Get a passive checks for an host and its services This function builds the external commands corresponding to the host and services provided information :param host_name: host name :param data: dictionary of the hos...
Get a passive checks for an host and its services This function builds the external commands corresponding to the host and services provided information :param host_name: host name :param data: dictionary of the host properties to be modified :return: command line
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1479-L1616
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface._wait_new_conf
def _wait_new_conf(self): """Ask the daemon to drop its configuration and wait for a new one This overrides the default method from GenericInterface :return: None """ with self.app.conf_lock: logger.warning("My master Arbiter wants me to wait for a new configuration...
python
def _wait_new_conf(self): """Ask the daemon to drop its configuration and wait for a new one This overrides the default method from GenericInterface :return: None """ with self.app.conf_lock: logger.warning("My master Arbiter wants me to wait for a new configuration...
Ask the daemon to drop its configuration and wait for a new one This overrides the default method from GenericInterface :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1629-L1638
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface._push_configuration
def _push_configuration(self, pushed_configuration=None): """Send a new configuration to the daemon This overrides the default method from GenericInterface Used by the master arbiter to send its configuration to a spare arbiter This function is not intended for external use. It is qui...
python
def _push_configuration(self, pushed_configuration=None): """Send a new configuration to the daemon This overrides the default method from GenericInterface Used by the master arbiter to send its configuration to a spare arbiter This function is not intended for external use. It is qui...
Send a new configuration to the daemon This overrides the default method from GenericInterface Used by the master arbiter to send its configuration to a spare arbiter This function is not intended for external use. It is quite complex to build a configuration for a daemon and it is th...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1643-L1659
Alignak-monitoring/alignak
alignak/http/arbiter_interface.py
ArbiterInterface._do_not_run
def _do_not_run(self): """The master arbiter tells to its spare arbiters to not run. A master arbiter will ignore this request and it will return an object containing some properties: '_status': 'ERR' because of the error `_message`: some more explanations about the error ...
python
def _do_not_run(self): """The master arbiter tells to its spare arbiters to not run. A master arbiter will ignore this request and it will return an object containing some properties: '_status': 'ERR' because of the error `_message`: some more explanations about the error ...
The master arbiter tells to its spare arbiters to not run. A master arbiter will ignore this request and it will return an object containing some properties: '_status': 'ERR' because of the error `_message`: some more explanations about the error :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/arbiter_interface.py#L1663-L1684
Alignak-monitoring/alignak
alignak/objects/commandcallitem.py
CommandCallItems.linkify_one_command_with_commands
def linkify_one_command_with_commands(self, commands, prop): """ Link a command to a property (check_command for example) :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :param default: ...
python
def linkify_one_command_with_commands(self, commands, prop): """ Link a command to a property (check_command for example) :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :param default: ...
Link a command to a property (check_command for example) :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :param default: default command to use if the property is not defined :type default: str ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/commandcallitem.py#L35-L53
Alignak-monitoring/alignak
alignak/objects/commandcallitem.py
CommandCallItems.linkify_command_list_with_commands
def linkify_command_list_with_commands(self, commands, prop): """ Link a command list (commands with , between) in real CommandCalls :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :retu...
python
def linkify_command_list_with_commands(self, commands, prop): """ Link a command list (commands with , between) in real CommandCalls :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :retu...
Link a command list (commands with , between) in real CommandCalls :param commands: commands object :type commands: alignak.objects.command.Commands :param prop: property name :type prop: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/commandcallitem.py#L55-L76
Alignak-monitoring/alignak
alignak/objects/commandcallitem.py
CommandCallItems.create_commandcall
def create_commandcall(prop, commands, command): """ Create CommandCall object with command :param prop: property :type prop: str :param commands: all commands :type commands: alignak.objects.command.Commands :param command: a command object :type command...
python
def create_commandcall(prop, commands, command): """ Create CommandCall object with command :param prop: property :type prop: str :param commands: all commands :type commands: alignak.objects.command.Commands :param command: a command object :type command...
Create CommandCall object with command :param prop: property :type prop: str :param commands: all commands :type commands: alignak.objects.command.Commands :param command: a command object :type command: str :return: a commandCall object :rtype: alignak.o...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/commandcallitem.py#L79-L105
Alignak-monitoring/alignak
alignak/http/broker_interface.py
BrokerInterface._push_broks
def _push_broks(self): """Push the provided broks objects to the broker daemon Only used on a Broker daemon by the Arbiter :param: broks :type: list :return: None """ data = cherrypy.request.json with self.app.arbiter_broks_lock: logger.debug...
python
def _push_broks(self): """Push the provided broks objects to the broker daemon Only used on a Broker daemon by the Arbiter :param: broks :type: list :return: None """ data = cherrypy.request.json with self.app.arbiter_broks_lock: logger.debug...
Push the provided broks objects to the broker daemon Only used on a Broker daemon by the Arbiter :param: broks :type: list :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/broker_interface.py#L44-L56
Alignak-monitoring/alignak
alignak/objects/config.py
Config.clean_params
def clean_params(self, params): """Convert a list of parameters (key=value) into a dict This function is used to transform Nagios (or ini) like formated parameters (key=value) to a dictionary. :param params: parameters list :type params: list :return: dict with key and ...
python
def clean_params(self, params): """Convert a list of parameters (key=value) into a dict This function is used to transform Nagios (or ini) like formated parameters (key=value) to a dictionary. :param params: parameters list :type params: list :return: dict with key and ...
Convert a list of parameters (key=value) into a dict This function is used to transform Nagios (or ini) like formated parameters (key=value) to a dictionary. :param params: parameters list :type params: list :return: dict with key and value. Log error if malformed :rtyp...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L976-L998
Alignak-monitoring/alignak
alignak/objects/config.py
Config.load_params
def load_params(self, params): """Load parameters from main configuration file :param params: parameters list (converted right at the beginning) :type params: :return: None """ logger.debug("Alignak parameters:") for key, value in sorted(self.clean_params(params)...
python
def load_params(self, params): """Load parameters from main configuration file :param params: parameters list (converted right at the beginning) :type params: :return: None """ logger.debug("Alignak parameters:") for key, value in sorted(self.clean_params(params)...
Load parameters from main configuration file :param params: parameters list (converted right at the beginning) :type params: :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1000-L1050
Alignak-monitoring/alignak
alignak/objects/config.py
Config._cut_line
def _cut_line(line): """Split the line on whitespaces and remove empty chunks :param line: the line to split :type line: str :return: list of strings :rtype: list """ # punct = '"#$%&\'()*+/<=>?@[\\]^`{|}~' if re.search("([\t\n\r]+|[\x0b\x0c ]{3,})+", lin...
python
def _cut_line(line): """Split the line on whitespaces and remove empty chunks :param line: the line to split :type line: str :return: list of strings :rtype: list """ # punct = '"#$%&\'()*+/<=>?@[\\]^`{|}~' if re.search("([\t\n\r]+|[\x0b\x0c ]{3,})+", lin...
Split the line on whitespaces and remove empty chunks :param line: the line to split :type line: str :return: list of strings :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1053-L1067
Alignak-monitoring/alignak
alignak/objects/config.py
Config.read_legacy_cfg_files
def read_legacy_cfg_files(self, cfg_files, alignak_env_files=None): # pylint: disable=too-many-nested-blocks,too-many-statements # pylint: disable=too-many-branches, too-many-locals """Read and parse the Nagios legacy configuration files and store their content into a StringIO object whi...
python
def read_legacy_cfg_files(self, cfg_files, alignak_env_files=None): # pylint: disable=too-many-nested-blocks,too-many-statements # pylint: disable=too-many-branches, too-many-locals """Read and parse the Nagios legacy configuration files and store their content into a StringIO object whi...
Read and parse the Nagios legacy configuration files and store their content into a StringIO object which content will be returned as the function result :param cfg_files: list of file to read :type cfg_files: list :param alignak_env_files: name of the alignak environment file ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1069-L1232
Alignak-monitoring/alignak
alignak/objects/config.py
Config.read_config_buf
def read_config_buf(self, cfg_buffer): # pylint: disable=too-many-locals, too-many-branches """The legacy configuration buffer (previously returned by Config.read_config()) If the buffer is empty, it will return an empty dictionary else it will return a dictionary containing dictionary ...
python
def read_config_buf(self, cfg_buffer): # pylint: disable=too-many-locals, too-many-branches """The legacy configuration buffer (previously returned by Config.read_config()) If the buffer is empty, it will return an empty dictionary else it will return a dictionary containing dictionary ...
The legacy configuration buffer (previously returned by Config.read_config()) If the buffer is empty, it will return an empty dictionary else it will return a dictionary containing dictionary items tha tmay be used to create Alignak objects :param cfg_buffer: buffer containing all data...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1234-L1371
Alignak-monitoring/alignak
alignak/objects/config.py
Config.add_self_defined_objects
def add_self_defined_objects(raw_objects): """Add self defined command objects for internal processing ; bp_rule, _internal_host_up, _echo, _internal_host_check, _interna_service_check :param raw_objects: Raw config objects dict :type raw_objects: dict :return: raw_objects with ...
python
def add_self_defined_objects(raw_objects): """Add self defined command objects for internal processing ; bp_rule, _internal_host_up, _echo, _internal_host_check, _interna_service_check :param raw_objects: Raw config objects dict :type raw_objects: dict :return: raw_objects with ...
Add self defined command objects for internal processing ; bp_rule, _internal_host_up, _echo, _internal_host_check, _interna_service_check :param raw_objects: Raw config objects dict :type raw_objects: dict :return: raw_objects with some more commands :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1374-L1415
Alignak-monitoring/alignak
alignak/objects/config.py
Config.early_create_objects
def early_create_objects(self, raw_objects): """Create the objects needed for the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None """ types_creations = self.__class__.types_creations ...
python
def early_create_objects(self, raw_objects): """Create the objects needed for the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None """ types_creations = self.__class__.types_creations ...
Create the objects needed for the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1417-L1431
Alignak-monitoring/alignak
alignak/objects/config.py
Config.create_objects
def create_objects(self, raw_objects): """Create all the objects got after the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None """ types_creations = self.__class__.types_creations ...
python
def create_objects(self, raw_objects): """Create all the objects got after the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None """ types_creations = self.__class__.types_creations ...
Create all the objects got after the post configuration file initialization :param raw_objects: dict with all object with str values :type raw_objects: dict :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1433-L1452
Alignak-monitoring/alignak
alignak/objects/config.py
Config.create_objects_for_type
def create_objects_for_type(self, raw_objects, o_type): """Generic function to create objects regarding the o_type This function create real Alignak objects from the raw data got from the configuration. :param raw_objects: Raw objects :type raw_objects: dict :param o_type: the ...
python
def create_objects_for_type(self, raw_objects, o_type): """Generic function to create objects regarding the o_type This function create real Alignak objects from the raw data got from the configuration. :param raw_objects: Raw objects :type raw_objects: dict :param o_type: the ...
Generic function to create objects regarding the o_type This function create real Alignak objects from the raw data got from the configuration. :param raw_objects: Raw objects :type raw_objects: dict :param o_type: the object type we want to create :type o_type: object ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1454-L1491
Alignak-monitoring/alignak
alignak/objects/config.py
Config.early_arbiter_linking
def early_arbiter_linking(self, arbiter_name, params): """ Prepare the arbiter for early operations :param arbiter_name: default arbiter name if no arbiter exist in the configuration :type arbiter_name: str :return: None """ if not self.arbiters: params.upda...
python
def early_arbiter_linking(self, arbiter_name, params): """ Prepare the arbiter for early operations :param arbiter_name: default arbiter name if no arbiter exist in the configuration :type arbiter_name: str :return: None """ if not self.arbiters: params.upda...
Prepare the arbiter for early operations :param arbiter_name: default arbiter name if no arbiter exist in the configuration :type arbiter_name: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1493-L1518
Alignak-monitoring/alignak
alignak/objects/config.py
Config.linkify_one_command_with_commands
def linkify_one_command_with_commands(self, commands, prop): """ Link a command :param commands: object commands :type commands: object :param prop: property name :type prop: str :return: None """ if not hasattr(self, prop): return ...
python
def linkify_one_command_with_commands(self, commands, prop): """ Link a command :param commands: object commands :type commands: object :param prop: property name :type prop: str :return: None """ if not hasattr(self, prop): return ...
Link a command :param commands: object commands :type commands: object :param prop: property name :type prop: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1520-L1545
Alignak-monitoring/alignak
alignak/objects/config.py
Config.linkify
def linkify(self): """ Make 'links' between elements, like a host got a services list with all its services in it :return: None """ self.services.optimize_service_search(self.hosts) # First linkify myself like for some global commands self.linkify_one_command_w...
python
def linkify(self): """ Make 'links' between elements, like a host got a services list with all its services in it :return: None """ self.services.optimize_service_search(self.hosts) # First linkify myself like for some global commands self.linkify_one_command_w...
Make 'links' between elements, like a host got a services list with all its services in it :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1547-L1635
Alignak-monitoring/alignak
alignak/objects/config.py
Config.clean
def clean(self): """Wrapper for calling the clean method of services attribute :return: None """ logger.debug("Cleaning configuration objects before configuration sending:") types_creations = self.__class__.types_creations for o_type in types_creations: (_, _...
python
def clean(self): """Wrapper for calling the clean method of services attribute :return: None """ logger.debug("Cleaning configuration objects before configuration sending:") types_creations = self.__class__.types_creations for o_type in types_creations: (_, _...
Wrapper for calling the clean method of services attribute :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1637-L1648
Alignak-monitoring/alignak
alignak/objects/config.py
Config.warn_about_unmanaged_parameters
def warn_about_unmanaged_parameters(self): """used to raise warning if the user got parameter that we do not manage from now :return: None """ properties = self.__class__.properties unmanaged = [] for prop, entry in list(properties.items()): if not en...
python
def warn_about_unmanaged_parameters(self): """used to raise warning if the user got parameter that we do not manage from now :return: None """ properties = self.__class__.properties unmanaged = [] for prop, entry in list(properties.items()): if not en...
used to raise warning if the user got parameter that we do not manage from now :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1650-L1674
Alignak-monitoring/alignak
alignak/objects/config.py
Config.explode
def explode(self): """Use to fill groups values on hosts and create new services (for host group ones) :return: None """ # first elements, after groups self.contacts.explode(self.contactgroups, self.notificationways) self.contactgroups.explode() self.hos...
python
def explode(self): """Use to fill groups values on hosts and create new services (for host group ones) :return: None """ # first elements, after groups self.contacts.explode(self.contactgroups, self.notificationways) self.contactgroups.explode() self.hos...
Use to fill groups values on hosts and create new services (for host group ones) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1683-L1713
Alignak-monitoring/alignak
alignak/objects/config.py
Config.apply_dependencies
def apply_dependencies(self): """Creates dependencies links between elements. :return: None """ self.hosts.apply_dependencies() self.services.apply_dependencies(self.hosts)
python
def apply_dependencies(self): """Creates dependencies links between elements. :return: None """ self.hosts.apply_dependencies() self.services.apply_dependencies(self.hosts)
Creates dependencies links between elements. :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1715-L1721
Alignak-monitoring/alignak
alignak/objects/config.py
Config.apply_inheritance
def apply_inheritance(self): """Apply inheritance over templates Template can be used in the following objects:: * hosts * contacts * services * servicedependencies * hostdependencies * timeperiods * hostsextinfo * servicesextinfo ...
python
def apply_inheritance(self): """Apply inheritance over templates Template can be used in the following objects:: * hosts * contacts * services * servicedependencies * hostdependencies * timeperiods * hostsextinfo * servicesextinfo ...
Apply inheritance over templates Template can be used in the following objects:: * hosts * contacts * services * servicedependencies * hostdependencies * timeperiods * hostsextinfo * servicesextinfo * serviceescalations * hostescal...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1723-L1757
Alignak-monitoring/alignak
alignak/objects/config.py
Config.fill_default_configuration
def fill_default_configuration(self): """Fill objects properties with default value if necessary :return: None """ logger.debug("Filling the unset properties with their default value:") types_creations = self.__class__.types_creations for o_type in types_creations: ...
python
def fill_default_configuration(self): """Fill objects properties with default value if necessary :return: None """ logger.debug("Filling the unset properties with their default value:") types_creations = self.__class__.types_creations for o_type in types_creations: ...
Fill objects properties with default value if necessary :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1767-L1810
Alignak-monitoring/alignak
alignak/objects/config.py
Config.fill_default_realm
def fill_default_realm(self): """Check if a realm is defined, if not Create a new one (default) and tag everyone that do not have a realm prop to be put in this realm :return: None """ if not getattr(self, 'realms', None): # Create a default realm so all host...
python
def fill_default_realm(self): """Check if a realm is defined, if not Create a new one (default) and tag everyone that do not have a realm prop to be put in this realm :return: None """ if not getattr(self, 'realms', None): # Create a default realm so all host...
Check if a realm is defined, if not Create a new one (default) and tag everyone that do not have a realm prop to be put in this realm :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1812-L1828
Alignak-monitoring/alignak
alignak/objects/config.py
Config.log_daemons_list
def log_daemons_list(self): """Log Alignak daemons list :return: """ daemons = [self.arbiters, self.schedulers, self.pollers, self.brokers, self.reactionners, self.receivers] for daemons_list in daemons: if not daemons_list: logger....
python
def log_daemons_list(self): """Log Alignak daemons list :return: """ daemons = [self.arbiters, self.schedulers, self.pollers, self.brokers, self.reactionners, self.receivers] for daemons_list in daemons: if not daemons_list: logger....
Log Alignak daemons list :return:
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1830-L1842
Alignak-monitoring/alignak
alignak/objects/config.py
Config.fill_default_satellites
def fill_default_satellites(self, alignak_launched=False): # pylint: disable=too-many-branches, too-many-locals, too-many-statements """If a required satellite is missing in the configuration, we create a new satellite on localhost with some default values :param alignak_launched: creat...
python
def fill_default_satellites(self, alignak_launched=False): # pylint: disable=too-many-branches, too-many-locals, too-many-statements """If a required satellite is missing in the configuration, we create a new satellite on localhost with some default values :param alignak_launched: creat...
If a required satellite is missing in the configuration, we create a new satellite on localhost with some default values :param alignak_launched: created daemons are to be launched or not :type alignak_launched: bool :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L1844-L2081
Alignak-monitoring/alignak
alignak/objects/config.py
Config.got_broker_module_type_defined
def got_broker_module_type_defined(self, module_type): """Check if a module type is defined in one of the brokers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool """ for broker_link i...
python
def got_broker_module_type_defined(self, module_type): """Check if a module type is defined in one of the brokers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool """ for broker_link i...
Check if a module type is defined in one of the brokers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2083-L2095
Alignak-monitoring/alignak
alignak/objects/config.py
Config.got_scheduler_module_type_defined
def got_scheduler_module_type_defined(self, module_type): """Check if a module type is defined in one of the schedulers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool TODO: Factorize it with...
python
def got_scheduler_module_type_defined(self, module_type): """Check if a module type is defined in one of the schedulers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool TODO: Factorize it with...
Check if a module type is defined in one of the schedulers :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool TODO: Factorize it with got_broker_module_type_defined
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2097-L2110
Alignak-monitoring/alignak
alignak/objects/config.py
Config.got_arbiter_module_type_defined
def got_arbiter_module_type_defined(self, module_type): """Check if a module type is defined in one of the arbiters Also check the module name :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool ...
python
def got_arbiter_module_type_defined(self, module_type): """Check if a module type is defined in one of the arbiters Also check the module name :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool ...
Check if a module type is defined in one of the arbiters Also check the module name :param module_type: module type to search for :type module_type: str :return: True if mod_type is found else False :rtype: bool TODO: Factorize it with got_broker_module_type_defined:
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2112-L2134
Alignak-monitoring/alignak
alignak/objects/config.py
Config.create_business_rules
def create_business_rules(self): """Create business rules for hosts and services :return: None """ self.hosts.create_business_rules(self.hosts, self.services, self.hostgroups, self.servicegroups, self.macr...
python
def create_business_rules(self): """Create business rules for hosts and services :return: None """ self.hosts.create_business_rules(self.hosts, self.services, self.hostgroups, self.servicegroups, self.macr...
Create business rules for hosts and services :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2136-L2146
Alignak-monitoring/alignak
alignak/objects/config.py
Config.create_business_rules_dependencies
def create_business_rules_dependencies(self): """Create business rules dependencies for hosts and services :return: None """ for item in itertools.chain(self.hosts, self.services): if not item.got_business_rule: continue bp_items = item.business...
python
def create_business_rules_dependencies(self): """Create business rules dependencies for hosts and services :return: None """ for item in itertools.chain(self.hosts, self.services): if not item.got_business_rule: continue bp_items = item.business...
Create business rules dependencies for hosts and services :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2148-L2175
Alignak-monitoring/alignak
alignak/objects/config.py
Config.hack_old_nagios_parameters
def hack_old_nagios_parameters(self): # pylint: disable=too-many-branches """ Check if modules exist for some of the Nagios legacy parameters. If no module of the required type is present, it alerts the user that the parameters will be ignored and the functions will be disabled, else it...
python
def hack_old_nagios_parameters(self): # pylint: disable=too-many-branches """ Check if modules exist for some of the Nagios legacy parameters. If no module of the required type is present, it alerts the user that the parameters will be ignored and the functions will be disabled, else it...
Check if modules exist for some of the Nagios legacy parameters. If no module of the required type is present, it alerts the user that the parameters will be ignored and the functions will be disabled, else it encourages the user to set the correct parameters in the installed modules. ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2177-L2289
Alignak-monitoring/alignak
alignak/objects/config.py
Config.propagate_timezone_option
def propagate_timezone_option(self): """Set our timezone value and give it too to unset satellites :return: None """ if self.use_timezone: # first apply myself os.environ['TZ'] = self.use_timezone time.tzset() tab = [self.schedulers, self...
python
def propagate_timezone_option(self): """Set our timezone value and give it too to unset satellites :return: None """ if self.use_timezone: # first apply myself os.environ['TZ'] = self.use_timezone time.tzset() tab = [self.schedulers, self...
Set our timezone value and give it too to unset satellites :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2291-L2305
Alignak-monitoring/alignak
alignak/objects/config.py
Config.linkify_templates
def linkify_templates(self): """ Like for normal object, we link templates with each others :return: None """ self.hosts.linkify_templates() self.contacts.linkify_templates() self.services.linkify_templates() self.servicedependencies.linkify_templates() s...
python
def linkify_templates(self): """ Like for normal object, we link templates with each others :return: None """ self.hosts.linkify_templates() self.contacts.linkify_templates() self.services.linkify_templates() self.servicedependencies.linkify_templates() s...
Like for normal object, we link templates with each others :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2307-L2323
Alignak-monitoring/alignak
alignak/objects/config.py
Config.check_error_on_hard_unmanaged_parameters
def check_error_on_hard_unmanaged_parameters(self): """Some parameters are just not managed like O*HP commands and regexp capabilities :return: True if we encounter an error, otherwise False :rtype: bool """ valid = True if self.use_regexp_matching: msg = "u...
python
def check_error_on_hard_unmanaged_parameters(self): """Some parameters are just not managed like O*HP commands and regexp capabilities :return: True if we encounter an error, otherwise False :rtype: bool """ valid = True if self.use_regexp_matching: msg = "u...
Some parameters are just not managed like O*HP commands and regexp capabilities :return: True if we encounter an error, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2325-L2372
Alignak-monitoring/alignak
alignak/objects/config.py
Config.is_correct
def is_correct(self): # pylint: disable=too-many-branches, too-many-statements, too-many-locals """Check if all elements got a good configuration :return: True if the configuration is correct else False :rtype: bool """ logger.info('Running pre-flight check on configuration dat...
python
def is_correct(self): # pylint: disable=too-many-branches, too-many-statements, too-many-locals """Check if all elements got a good configuration :return: True if the configuration is correct else False :rtype: bool """ logger.info('Running pre-flight check on configuration dat...
Check if all elements got a good configuration :return: True if the configuration is correct else False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2374-L2554
Alignak-monitoring/alignak
alignak/objects/config.py
Config.explode_global_conf
def explode_global_conf(self): """Explode parameters like cached_service_check_horizon in the Service class in a cached_check_horizon manner, o*hp commands etc :return: None """ for cls, _, strclss, _, _ in list(self.types_creations.values()): logger.debug("Applying ...
python
def explode_global_conf(self): """Explode parameters like cached_service_check_horizon in the Service class in a cached_check_horizon manner, o*hp commands etc :return: None """ for cls, _, strclss, _, _ in list(self.types_creations.values()): logger.debug("Applying ...
Explode parameters like cached_service_check_horizon in the Service class in a cached_check_horizon manner, o*hp commands etc :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2556-L2564
Alignak-monitoring/alignak
alignak/objects/config.py
Config.remove_templates
def remove_templates(self): """Clean useless elements like templates because they are not needed anymore :return: None """ self.hosts.remove_templates() self.contacts.remove_templates() self.services.remove_templates() self.servicedependencies.remove_templates() ...
python
def remove_templates(self): """Clean useless elements like templates because they are not needed anymore :return: None """ self.hosts.remove_templates() self.contacts.remove_templates() self.services.remove_templates() self.servicedependencies.remove_templates() ...
Clean useless elements like templates because they are not needed anymore :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2566-L2576
Alignak-monitoring/alignak
alignak/objects/config.py
Config.show_errors
def show_errors(self): """ Loop over configuration warnings and log them as INFO log Loop over configuration errors and log them as INFO log Note that the warnings and errors are logged on the fly during the configuration parsing. It is not necessary to log as WARNING and ERROR ...
python
def show_errors(self): """ Loop over configuration warnings and log them as INFO log Loop over configuration errors and log them as INFO log Note that the warnings and errors are logged on the fly during the configuration parsing. It is not necessary to log as WARNING and ERROR ...
Loop over configuration warnings and log them as INFO log Loop over configuration errors and log them as INFO log Note that the warnings and errors are logged on the fly during the configuration parsing. It is not necessary to log as WARNING and ERROR in this function which is used as a sum-up ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2578-L2596
Alignak-monitoring/alignak
alignak/objects/config.py
Config.create_packs
def create_packs(self): # pylint: disable=too-many-statements,too-many-locals,too-many-branches, unused-argument """Create packs of hosts and services (all dependencies are resolved) It create a graph. All hosts are connected to their parents, and hosts without parent are connected to ho...
python
def create_packs(self): # pylint: disable=too-many-statements,too-many-locals,too-many-branches, unused-argument """Create packs of hosts and services (all dependencies are resolved) It create a graph. All hosts are connected to their parents, and hosts without parent are connected to ho...
Create packs of hosts and services (all dependencies are resolved) It create a graph. All hosts are connected to their parents, and hosts without parent are connected to host 'root'. services are linked to their host. Dependencies between hosts/services are managed. REF: doc/pack-creatio...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2598-L2855
Alignak-monitoring/alignak
alignak/objects/config.py
Config.cut_into_parts
def cut_into_parts(self): # pylint: disable=too-many-branches, too-many-locals, too-many-statements """Cut conf into part for scheduler dispatch. Basically it provides a set of host/services for each scheduler that have no dependencies between them :return: None """ ...
python
def cut_into_parts(self): # pylint: disable=too-many-branches, too-many-locals, too-many-statements """Cut conf into part for scheduler dispatch. Basically it provides a set of host/services for each scheduler that have no dependencies between them :return: None """ ...
Cut conf into part for scheduler dispatch. Basically it provides a set of host/services for each scheduler that have no dependencies between them :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/config.py#L2857-L3040