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/external_command.py
ExternalCommandManager.enable_svc_notifications
def enable_svc_notifications(self, service): """Enable notifications for a service Format of the line that triggers function call:: ENABLE_SVC_NOTIFICATIONS;<host_name>;<service_description> :param service: service to edit :type service: alignak.objects.service.Service ...
python
def enable_svc_notifications(self, service): """Enable notifications for a service Format of the line that triggers function call:: ENABLE_SVC_NOTIFICATIONS;<host_name>;<service_description> :param service: service to edit :type service: alignak.objects.service.Service ...
Enable notifications for a service Format of the line that triggers function call:: ENABLE_SVC_NOTIFICATIONS;<host_name>;<service_description> :param service: service to edit :type service: alignak.objects.service.Service :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3062-L3076
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.process_host_check_result
def process_host_check_result(self, host, status_code, plugin_output): """Process host check result Format of the line that triggers function call:: PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host: host to process check to :type host: alignak.obj...
python
def process_host_check_result(self, host, status_code, plugin_output): """Process host check result Format of the line that triggers function call:: PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host: host to process check to :type host: alignak.obj...
Process host check result Format of the line that triggers function call:: PROCESS_HOST_CHECK_RESULT;<host_name>;<status_code>;<plugin_output> :param host: host to process check to :type host: alignak.objects.host.Host :param status_code: exit code of plugin :type statu...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3097-L3165
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.process_host_output
def process_host_output(self, host, plugin_output): """Process host output Format of the line that triggers function call:: PROCESS_HOST_OUTPUT;<host_name>;<plugin_output> :param host: host to process check to :type host: alignak.objects.host.Host :param plugin_output: ...
python
def process_host_output(self, host, plugin_output): """Process host output Format of the line that triggers function call:: PROCESS_HOST_OUTPUT;<host_name>;<plugin_output> :param host: host to process check to :type host: alignak.objects.host.Host :param plugin_output: ...
Process host output Format of the line that triggers function call:: PROCESS_HOST_OUTPUT;<host_name>;<plugin_output> :param host: host to process check to :type host: alignak.objects.host.Host :param plugin_output: plugin output :type plugin_output: str :return:...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3167-L3179
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.process_service_check_result
def process_service_check_result(self, service, return_code, plugin_output): """Process service check result Format of the line that triggers function call:: PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> :param service: service to process ...
python
def process_service_check_result(self, service, return_code, plugin_output): """Process service check result Format of the line that triggers function call:: PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> :param service: service to process ...
Process service check result Format of the line that triggers function call:: PROCESS_SERVICE_CHECK_RESULT;<host_name>;<service_description>;<return_code>;<plugin_output> :param service: service to process check to :type service: alignak.objects.service.Service :param return_co...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3181-L3256
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.process_service_output
def process_service_output(self, service, plugin_output): """Process service output Format of the line that triggers function call:: PROCESS_SERVICE_OUTPUT;<host_name>;<service_description>;<plugin_output> :param service: service to process check to :type service: alignak.objec...
python
def process_service_output(self, service, plugin_output): """Process service output Format of the line that triggers function call:: PROCESS_SERVICE_OUTPUT;<host_name>;<service_description>;<plugin_output> :param service: service to process check to :type service: alignak.objec...
Process service output Format of the line that triggers function call:: PROCESS_SERVICE_OUTPUT;<host_name>;<service_description>;<plugin_output> :param service: service to process check to :type service: alignak.objects.service.Service :param plugin_output: plugin output ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3258-L3270
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.restart_program
def restart_program(self): """Restart Alignak Format of the line that triggers function call:: RESTART_PROGRAM :return: None """ restart_cmd = self.commands.find_by_name('restart-alignak') if not restart_cmd: logger.error("Cannot restart Alignak : mi...
python
def restart_program(self): """Restart Alignak Format of the line that triggers function call:: RESTART_PROGRAM :return: None """ restart_cmd = self.commands.find_by_name('restart-alignak') if not restart_cmd: logger.error("Cannot restart Alignak : mi...
Restart Alignak Format of the line that triggers function call:: RESTART_PROGRAM :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3313-L3344
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.reload_config
def reload_config(self): """Reload Alignak configuration Format of the line that triggers function call:: RELOAD_CONFIG :return: None """ reload_cmd = self.commands.find_by_name('reload-alignak') if not reload_cmd: logger.error("Cannot restart Aligna...
python
def reload_config(self): """Reload Alignak configuration Format of the line that triggers function call:: RELOAD_CONFIG :return: None """ reload_cmd = self.commands.find_by_name('reload-alignak') if not reload_cmd: logger.error("Cannot restart Aligna...
Reload Alignak configuration Format of the line that triggers function call:: RELOAD_CONFIG :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3346-L3378
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_and_propagate_host_downtime
def schedule_and_propagate_host_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """DOES NOTHING (Should create host downtime and start it?) Format of the line that triggers function call:: SCHEDULE_AND_PROPAG...
python
def schedule_and_propagate_host_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """DOES NOTHING (Should create host downtime and start it?) Format of the line that triggers function call:: SCHEDULE_AND_PROPAG...
DOES NOTHING (Should create host downtime and start it?) Format of the line that triggers function call:: SCHEDULE_AND_PROPAGATE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>; <fixed>;<trigger_id>;<duration>;<author>;<comment> :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3395-L3410
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_contact_downtime
def schedule_contact_downtime(self, contact, start_time, end_time, author, comment): """Schedule contact downtime Format of the line that triggers function call:: SCHEDULE_CONTACT_DOWNTIME;<contact_name>;<start_time>;<end_time>;<author>;<comment> :param contact: contact to put in downt...
python
def schedule_contact_downtime(self, contact, start_time, end_time, author, comment): """Schedule contact downtime Format of the line that triggers function call:: SCHEDULE_CONTACT_DOWNTIME;<contact_name>;<start_time>;<end_time>;<author>;<comment> :param contact: contact to put in downt...
Schedule contact downtime Format of the line that triggers function call:: SCHEDULE_CONTACT_DOWNTIME;<contact_name>;<start_time>;<end_time>;<author>;<comment> :param contact: contact to put in downtime :type contact: alignak.objects.contact.Contact :param start_time: downtime s...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3430-L3452
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_forced_host_check
def schedule_forced_host_check(self, host, check_time): """Schedule a forced check on a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check...
python
def schedule_forced_host_check(self, host, check_time): """Schedule a forced check on a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check...
Schedule a forced check on a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check :type check_time: int :return:...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3454-L3470
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_forced_host_svc_checks
def schedule_forced_host_svc_checks(self, host, check_time): """Schedule a forced check on all services of a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host...
python
def schedule_forced_host_svc_checks(self, host, check_time): """Schedule a forced check on all services of a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host...
Schedule a forced check on all services of a host Format of the line that triggers function call:: SCHEDULE_FORCED_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check :type check_time:...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3472-L3487
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_forced_svc_check
def schedule_forced_svc_check(self, service, check_time): """Schedule a forced check on a service Format of the line that triggers function call:: SCHEDULE_FORCED_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.ob...
python
def schedule_forced_svc_check(self, service, check_time): """Schedule a forced check on a service Format of the line that triggers function call:: SCHEDULE_FORCED_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.ob...
Schedule a forced check on a service Format of the line that triggers function call:: SCHEDULE_FORCED_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.object.service.Service :param check_time: time to check ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3489-L3505
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_hostgroup_host_downtime
def schedule_hostgroup_host_downtime(self, hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a downtime for each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGROUP_HOST_DOWNTI...
python
def schedule_hostgroup_host_downtime(self, hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a downtime for each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGROUP_HOST_DOWNTI...
Schedule a downtime for each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGROUP_HOST_DOWNTIME;<hostgroup_name>;<start_time>;<end_time>; <fixed>;<trigger_id>;<duration>;<author>;<comment> :param hostgroup: hostgroup to schedule :type hostgrou...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3507-L3537
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_hostgroup_svc_downtime
def schedule_hostgroup_svc_downtime(self, hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a downtime for each service of each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGRO...
python
def schedule_hostgroup_svc_downtime(self, hostgroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a downtime for each service of each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGRO...
Schedule a downtime for each service of each host of a hostgroup Format of the line that triggers function call:: SCHEDULE_HOSTGROUP_SVC_DOWNTIME;;<hostgroup_name>;<start_time>;<end_time>;<fixed>; <trigger_id>;<duration>;<author>;<comment> :param hostgroup: hostgroup to schedule ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3539-L3571
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_host_check
def schedule_host_check(self, host, check_time): """Schedule a check on a host Format of the line that triggers function call:: SCHEDULE_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check ...
python
def schedule_host_check(self, host, check_time): """Schedule a check on a host Format of the line that triggers function call:: SCHEDULE_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check ...
Schedule a check on a host Format of the line that triggers function call:: SCHEDULE_HOST_CHECK;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check :type check_time: :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3573-L3589
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_host_downtime
def schedule_host_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a host downtime Format of the line that triggers function call:: SCHEDULE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>;<fixed>; <tr...
python
def schedule_host_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a host downtime Format of the line that triggers function call:: SCHEDULE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>;<fixed>; <tr...
Schedule a host downtime Format of the line that triggers function call:: SCHEDULE_HOST_DOWNTIME;<host_name>;<start_time>;<end_time>;<fixed>; <trigger_id>;<duration>;<author>;<comment> :param host: host to schedule downtime :type host: alignak.object.host.Host :param st...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3591-L3628
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_host_svc_checks
def schedule_host_svc_checks(self, host, check_time): """Schedule a check on all services of a host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param ...
python
def schedule_host_svc_checks(self, host, check_time): """Schedule a check on all services of a host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param ...
Schedule a check on all services of a host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_CHECKS;<host_name>;<check_time> :param host: host to check :type host: alignak.object.host.Host :param check_time: time to check :type check_time: :retu...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3630-L3645
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_host_svc_downtime
def schedule_host_svc_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime for each service of an host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_DOWNTIME;<host_name>;<...
python
def schedule_host_svc_downtime(self, host, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime for each service of an host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_DOWNTIME;<host_name>;<...
Schedule a service downtime for each service of an host Format of the line that triggers function call:: SCHEDULE_HOST_SVC_DOWNTIME;<host_name>;<start_time>;<end_time>; <fixed>;<trigger_id>;<duration>;<author>;<comment> :param host: host to schedule downtime :type host: alignak...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3647-L3675
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_servicegroup_host_downtime
def schedule_servicegroup_host_downtime(self, servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a host downtime for each host of services in a servicegroup Format of the line that triggers function call:: S...
python
def schedule_servicegroup_host_downtime(self, servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a host downtime for each host of services in a servicegroup Format of the line that triggers function call:: S...
Schedule a host downtime for each host of services in a servicegroup Format of the line that triggers function call:: SCHEDULE_SERVICEGROUP_HOST_DOWNTIME;<servicegroup_name>;<start_time>;<end_time>;<fixed>; <trigger_id>;<duration>;<author>;<comment> :param servicegroup: servicegroup to...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3677-L3705
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_servicegroup_svc_downtime
def schedule_servicegroup_svc_downtime(self, servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime for each service of a servicegroup Format of the line that triggers function call:: SCHEDULE_...
python
def schedule_servicegroup_svc_downtime(self, servicegroup, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime for each service of a servicegroup Format of the line that triggers function call:: SCHEDULE_...
Schedule a service downtime for each service of a servicegroup Format of the line that triggers function call:: SCHEDULE_SERVICEGROUP_SVC_DOWNTIME;<servicegroup_name>;<start_time>;<end_time>; <fixed>;<trigger_id>;<duration>;<author>;<comment> :param servicegroup: servicegroup to schedu...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3707-L3735
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_svc_check
def schedule_svc_check(self, service, check_time): """Schedule a check on a service Format of the line that triggers function call:: SCHEDULE_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.object.service.Service ...
python
def schedule_svc_check(self, service, check_time): """Schedule a check on a service Format of the line that triggers function call:: SCHEDULE_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.object.service.Service ...
Schedule a check on a service Format of the line that triggers function call:: SCHEDULE_SVC_CHECK;<host_name>;<service_description>;<check_time> :param service: service to check :type service: alignak.object.service.Service :param check_time: time to check :type check_t...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3737-L3753
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.schedule_svc_downtime
def schedule_svc_downtime(self, service, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime Format of the line that triggers function call:: SCHEDULE_SVC_DOWNTIME;<host_name>;<service_description><start_time>;<end_ti...
python
def schedule_svc_downtime(self, service, start_time, end_time, fixed, trigger_id, duration, author, comment): """Schedule a service downtime Format of the line that triggers function call:: SCHEDULE_SVC_DOWNTIME;<host_name>;<service_description><start_time>;<end_ti...
Schedule a service downtime Format of the line that triggers function call:: SCHEDULE_SVC_DOWNTIME;<host_name>;<service_description><start_time>;<end_time>; <fixed>;<trigger_id>;<duration>;<author>;<comment> :param service: service to check :type service: alignak.object.service...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3755-L3791
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.send_custom_host_notification
def send_custom_host_notification(self, host, options, author, comment): """DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_HOST_NOTIFICATION;<host_name>;<options>;<author>;<comment> :param host: host to send notif for ...
python
def send_custom_host_notification(self, host, options, author, comment): """DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_HOST_NOTIFICATION;<host_name>;<options>;<author>;<comment> :param host: host to send notif for ...
DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_HOST_NOTIFICATION;<host_name>;<options>;<author>;<comment> :param host: host to send notif for :type host: alignak.object.host.Host :param options: notification options...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3793-L3814
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.send_custom_svc_notification
def send_custom_svc_notification(self, service, options, author, comment): """DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_SVC_NOTIFICATION;<host_name>;<service_description>;<options>;<author>;<comment>> :param service: s...
python
def send_custom_svc_notification(self, service, options, author, comment): """DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_SVC_NOTIFICATION;<host_name>;<service_description>;<options>;<author>;<comment>> :param service: s...
DOES NOTHING (Should send a custom notification) Format of the line that triggers function call:: SEND_CUSTOM_SVC_NOTIFICATION;<host_name>;<service_description>;<options>;<author>;<comment>> :param service: service to send notif for :type service: alignak.object.service.Service ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3816-L3837
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.start_accepting_passive_host_checks
def start_accepting_passive_host_checks(self): """Enable passive host check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_HOST_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if...
python
def start_accepting_passive_host_checks(self): """Enable passive host check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_HOST_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if...
Enable passive host check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_HOST_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3892-L3905
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.start_accepting_passive_svc_checks
def start_accepting_passive_svc_checks(self): """Enable passive service check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_SVC_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters i...
python
def start_accepting_passive_svc_checks(self): """Enable passive service check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_SVC_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters i...
Enable passive service check submission (globally) Format of the line that triggers function call:: START_ACCEPTING_PASSIVE_SVC_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3907-L3920
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.start_executing_host_checks
def start_executing_host_checks(self): """Enable host check execution (globally) Format of the line that triggers function call:: START_EXECUTING_HOST_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if not self.my_conf.execute...
python
def start_executing_host_checks(self): """Enable host check execution (globally) Format of the line that triggers function call:: START_EXECUTING_HOST_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if not self.my_conf.execute...
Enable host check execution (globally) Format of the line that triggers function call:: START_EXECUTING_HOST_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3922-L3935
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.start_executing_svc_checks
def start_executing_svc_checks(self): """Enable service check execution (globally) Format of the line that triggers function call:: START_EXECUTING_SVC_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if not self.my_conf.execut...
python
def start_executing_svc_checks(self): """Enable service check execution (globally) Format of the line that triggers function call:: START_EXECUTING_SVC_CHECKS :return: None """ # todo: #783 create a dedicated brok for global parameters if not self.my_conf.execut...
Enable service check execution (globally) Format of the line that triggers function call:: START_EXECUTING_SVC_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3937-L3950
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.stop_accepting_passive_host_checks
def stop_accepting_passive_host_checks(self): """Disable passive host check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_HOST_CHECKS :return: None """ if self.my_conf.accept_passive_host_checks: self.my_conf.m...
python
def stop_accepting_passive_host_checks(self): """Disable passive host check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_HOST_CHECKS :return: None """ if self.my_conf.accept_passive_host_checks: self.my_conf.m...
Disable passive host check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_HOST_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3952-L3964
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.stop_accepting_passive_svc_checks
def stop_accepting_passive_svc_checks(self): """Disable passive service check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_SVC_CHECKS :return: None """ if self.my_conf.accept_passive_service_checks: self.my_co...
python
def stop_accepting_passive_svc_checks(self): """Disable passive service check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_SVC_CHECKS :return: None """ if self.my_conf.accept_passive_service_checks: self.my_co...
Disable passive service check submission (globally) Format of the line that triggers function call:: STOP_ACCEPTING_PASSIVE_SVC_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3966-L3978
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.stop_executing_host_checks
def stop_executing_host_checks(self): """Disable host check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_HOST_CHECKS :return: None """ if self.my_conf.execute_host_checks: self.my_conf.modified_attributes |= DICT_MODAT...
python
def stop_executing_host_checks(self): """Disable host check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_HOST_CHECKS :return: None """ if self.my_conf.execute_host_checks: self.my_conf.modified_attributes |= DICT_MODAT...
Disable host check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_HOST_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3980-L3992
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.stop_executing_svc_checks
def stop_executing_svc_checks(self): """Disable service check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_SVC_CHECKS :return: None """ if self.my_conf.execute_service_checks: self.my_conf.modified_attributes |= DICT_M...
python
def stop_executing_svc_checks(self): """Disable service check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_SVC_CHECKS :return: None """ if self.my_conf.execute_service_checks: self.my_conf.modified_attributes |= DICT_M...
Disable service check execution (globally) Format of the line that triggers function call:: STOP_EXECUTING_SVC_CHECKS :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L3994-L4006
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.launch_svc_event_handler
def launch_svc_event_handler(self, service): """Launch event handler for a service Format of the line that triggers function call:: LAUNCH_SVC_EVENT_HANDLER;<host_name>;<service_description> :param service: service to execute the event handler :type service: alignak.objects.ser...
python
def launch_svc_event_handler(self, service): """Launch event handler for a service Format of the line that triggers function call:: LAUNCH_SVC_EVENT_HANDLER;<host_name>;<service_description> :param service: service to execute the event handler :type service: alignak.objects.ser...
Launch event handler for a service Format of the line that triggers function call:: LAUNCH_SVC_EVENT_HANDLER;<host_name>;<service_description> :param service: service to execute the event handler :type service: alignak.objects.service.Service :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L4008-L4019
Alignak-monitoring/alignak
alignak/external_command.py
ExternalCommandManager.launch_host_event_handler
def launch_host_event_handler(self, host): """Launch event handler for a service Format of the line that triggers function call:: LAUNCH_HOST_EVENT_HANDLER;<host_name> :param host: host to execute the event handler :type host: alignak.objects.host.Host :return: None ...
python
def launch_host_event_handler(self, host): """Launch event handler for a service Format of the line that triggers function call:: LAUNCH_HOST_EVENT_HANDLER;<host_name> :param host: host to execute the event handler :type host: alignak.objects.host.Host :return: None ...
Launch event handler for a service Format of the line that triggers function call:: LAUNCH_HOST_EVENT_HANDLER;<host_name> :param host: host to execute the event handler :type host: alignak.objects.host.Host :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/external_command.py#L4021-L4032
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependency.get_name
def get_name(self): """Get name based on dependent_host_name and host_name attributes Each attribute is substituted by 'unknown' if attribute does not exist :return: dependent_host_name/host_name :rtype: str """ dependent_host_name = 'unknown' if getattr(self, 'd...
python
def get_name(self): """Get name based on dependent_host_name and host_name attributes Each attribute is substituted by 'unknown' if attribute does not exist :return: dependent_host_name/host_name :rtype: str """ dependent_host_name = 'unknown' if getattr(self, 'd...
Get name based on dependent_host_name and host_name attributes Each attribute is substituted by 'unknown' if attribute does not exist :return: dependent_host_name/host_name :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L110-L125
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.explode
def explode(self, hostgroups): # pylint: disable=too-many-locals """Explode all host dependency for each member of hostgroups Each member of dependent hostgroup or hostgroup in dependency have to get a copy of host dependencies (quite complex to parse) :param hostgroups: used t...
python
def explode(self, hostgroups): # pylint: disable=too-many-locals """Explode all host dependency for each member of hostgroups Each member of dependent hostgroup or hostgroup in dependency have to get a copy of host dependencies (quite complex to parse) :param hostgroups: used t...
Explode all host dependency for each member of hostgroups Each member of dependent hostgroup or hostgroup in dependency have to get a copy of host dependencies (quite complex to parse) :param hostgroups: used to look for hostgroup :type hostgroups: alignak.objects.hostgroup.Hostgroups ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L144-L206
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.linkify
def linkify(self, hosts, timeperiods): """Create link between objects:: * hostdependency -> host * hostdependency -> timeperiods :param hosts: hosts to link :type hosts: alignak.objects.host.Hosts :param timeperiods: timeperiods to link :type timeperiods: alig...
python
def linkify(self, hosts, timeperiods): """Create link between objects:: * hostdependency -> host * hostdependency -> timeperiods :param hosts: hosts to link :type hosts: alignak.objects.host.Hosts :param timeperiods: timeperiods to link :type timeperiods: alig...
Create link between objects:: * hostdependency -> host * hostdependency -> timeperiods :param hosts: hosts to link :type hosts: alignak.objects.host.Hosts :param timeperiods: timeperiods to link :type timeperiods: alignak.objects.timeperiod.Timeperiods :return...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L208-L222
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.linkify_hd_by_h
def linkify_hd_by_h(self, hosts): """Replace dependent_host_name and host_name in host dependency by the real object :param hosts: host list, used to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None """ for hostdep in self: ...
python
def linkify_hd_by_h(self, hosts): """Replace dependent_host_name and host_name in host dependency by the real object :param hosts: host list, used to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None """ for hostdep in self: ...
Replace dependent_host_name and host_name in host dependency by the real object :param hosts: host list, used to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L224-L251
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.linkify_hd_by_tp
def linkify_hd_by_tp(self, timeperiods): """Replace dependency_period by a real object in host dependency :param timeperiods: list of timeperiod, used to look for a specific one :type timeperiods: alignak.objects.timeperiod.Timeperiods :return: None """ for hostdep in se...
python
def linkify_hd_by_tp(self, timeperiods): """Replace dependency_period by a real object in host dependency :param timeperiods: list of timeperiod, used to look for a specific one :type timeperiods: alignak.objects.timeperiod.Timeperiods :return: None """ for hostdep in se...
Replace dependency_period by a real object in host dependency :param timeperiods: list of timeperiod, used to look for a specific one :type timeperiods: alignak.objects.timeperiod.Timeperiods :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L253-L269
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.linkify_h_by_hd
def linkify_h_by_hd(self, hosts): """Add dependency in host objects :param hosts: hosts list :type hosts: alignak.objects.host.Hosts :return: None """ for hostdep in self: # Only used for debugging purpose when loops are detected setattr(hostdep, ...
python
def linkify_h_by_hd(self, hosts): """Add dependency in host objects :param hosts: hosts list :type hosts: alignak.objects.host.Hosts :return: None """ for hostdep in self: # Only used for debugging purpose when loops are detected setattr(hostdep, ...
Add dependency in host objects :param hosts: hosts list :type hosts: alignak.objects.host.Hosts :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L271-L304
Alignak-monitoring/alignak
alignak/objects/hostdependency.py
Hostdependencies.is_correct
def is_correct(self): """Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = True # Inter...
python
def is_correct(self): """Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool """ state = True # Inter...
Check if this object configuration is correct :: * Check our own specific properties * Call our parent class is_correct checker :return: True if the configuration is correct, otherwise False :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostdependency.py#L306-L336
Alignak-monitoring/alignak
alignak/objects/hostextinfo.py
HostsExtInfo.merge
def merge(self, hosts): """Merge extended host information into services :param hosts: hosts list, to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None """ for extinfo in self: host_name = extinfo.get_name() host = host...
python
def merge(self, hosts): """Merge extended host information into services :param hosts: hosts list, to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None """ for extinfo in self: host_name = extinfo.get_name() host = host...
Merge extended host information into services :param hosts: hosts list, to look for a specific one :type hosts: alignak.objects.host.Hosts :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostextinfo.py#L121-L133
Alignak-monitoring/alignak
alignak/objects/hostextinfo.py
HostsExtInfo.merge_extinfo
def merge_extinfo(host, extinfo): """Merge extended host information into a host :param host: the host to edit :type host: alignak.objects.host.Host :param extinfo: the external info we get data from :type extinfo: alignak.objects.hostextinfo.HostExtInfo :return: None ...
python
def merge_extinfo(host, extinfo): """Merge extended host information into a host :param host: the host to edit :type host: alignak.objects.host.Host :param extinfo: the external info we get data from :type extinfo: alignak.objects.hostextinfo.HostExtInfo :return: None ...
Merge extended host information into a host :param host: the host to edit :type host: alignak.objects.host.Host :param extinfo: the external info we get data from :type extinfo: alignak.objects.hostextinfo.HostExtInfo :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostextinfo.py#L136-L151
Alignak-monitoring/alignak
alignak/http/client.py
HTTPClient.set_proxy
def set_proxy(self, proxy): # pragma: no cover, not with unit tests """Set HTTP proxy :param proxy: proxy url :type proxy: str :return: None """ if proxy: logger.debug('PROXY SETTING PROXY %s', proxy) self._requests_con.proxies = { ...
python
def set_proxy(self, proxy): # pragma: no cover, not with unit tests """Set HTTP proxy :param proxy: proxy url :type proxy: str :return: None """ if proxy: logger.debug('PROXY SETTING PROXY %s', proxy) self._requests_con.proxies = { ...
Set HTTP proxy :param proxy: proxy url :type proxy: str :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/client.py#L176-L188
Alignak-monitoring/alignak
alignak/http/client.py
HTTPClient.post
def post(self, path, args, wait=False): """POST an HTTP request to a daemon :param path: path to do the request :type path: str :param args: args to add in the request :type args: dict :param wait: True for a long timeout :type wait: bool :return: Content...
python
def post(self, path, args, wait=False): """POST an HTTP request to a daemon :param path: path to do the request :type path: str :param args: args to add in the request :type args: dict :param wait: True for a long timeout :type wait: bool :return: Content...
POST an HTTP request to a daemon :param path: path to do the request :type path: str :param args: args to add in the request :type args: dict :param wait: True for a long timeout :type wait: bool :return: Content of the HTTP response if server returned 200 ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/client.py#L219-L247
Alignak-monitoring/alignak
alignak/http/client.py
HTTPClient.put
def put(self, path, args, wait=False): # pragma: no cover, looks never used! # todo: remove this because it looks never used anywhere... """PUT and HTTP request to a daemon :param path: path to do the request :type path: str :param args: data to send in the request :typ...
python
def put(self, path, args, wait=False): # pragma: no cover, looks never used! # todo: remove this because it looks never used anywhere... """PUT and HTTP request to a daemon :param path: path to do the request :type path: str :param args: data to send in the request :typ...
PUT and HTTP request to a daemon :param path: path to do the request :type path: str :param args: data to send in the request :type args: :return: Content of the HTTP response if server returned 200 :rtype: str
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/http/client.py#L249-L274
Alignak-monitoring/alignak
alignak/objects/hostescalation.py
Hostescalations.explode
def explode(self, escalations): """Create instance of Escalation for each HostEscalation object :param escalations: list of escalation, used to add new ones :type escalations: alignak.objects.escalation.Escalations :return: None """ # Now we explode all escalations (host...
python
def explode(self, escalations): """Create instance of Escalation for each HostEscalation object :param escalations: list of escalation, used to add new ones :type escalations: alignak.objects.escalation.Escalations :return: None """ # Now we explode all escalations (host...
Create instance of Escalation for each HostEscalation object :param escalations: list of escalation, used to add new ones :type escalations: alignak.objects.escalation.Escalations :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/objects/hostescalation.py#L109-L128
Alignak-monitoring/alignak
alignak/acknowledge.py
Acknowledge.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 Acknowledge :rtype: dict """ return {'u...
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 Acknowledge :rtype: dict """ return {'u...
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 Acknowledge :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/acknowledge.py#L94-L104
Alignak-monitoring/alignak
alignak/stats.py
Stats.register
def register(self, name, _type, statsd_host='localhost', statsd_port=8125, statsd_prefix='alignak', statsd_enabled=False, broks_enabled=False): """Init instance with real values :param name: daemon name :type name: str :param _type: daemon type :type _type: ...
python
def register(self, name, _type, statsd_host='localhost', statsd_port=8125, statsd_prefix='alignak', statsd_enabled=False, broks_enabled=False): """Init instance with real values :param name: daemon name :type name: str :param _type: daemon type :type _type: ...
Init instance with real values :param name: daemon name :type name: str :param _type: daemon type :type _type: :param statsd_host: host to post data :type statsd_host: str :param statsd_port: port to post data :type statsd_port: int :param statsd_...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L166-L222
Alignak-monitoring/alignak
alignak/stats.py
Stats.load_statsd
def load_statsd(self): """Create socket connection to statsd host Note that because of the UDP protocol used by StatsD, if no server is listening the socket connection will be accepted anyway :) :return: True if socket got created else False and an exception log is raised """ ...
python
def load_statsd(self): """Create socket connection to statsd host Note that because of the UDP protocol used by StatsD, if no server is listening the socket connection will be accepted anyway :) :return: True if socket got created else False and an exception log is raised """ ...
Create socket connection to statsd host Note that because of the UDP protocol used by StatsD, if no server is listening the socket connection will be accepted anyway :) :return: True if socket got created else False and an exception log is raised
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L224-L255
Alignak-monitoring/alignak
alignak/stats.py
Stats.connect
def connect(self, name, _type, host='localhost', port=2004, prefix='alignak', enabled=False, broks_enabled=False): """Init instance with real values for a graphite/carbon connection :param name: daemon name :type name: str :param _type: daemon type :type _type: ...
python
def connect(self, name, _type, host='localhost', port=2004, prefix='alignak', enabled=False, broks_enabled=False): """Init instance with real values for a graphite/carbon connection :param name: daemon name :type name: str :param _type: daemon type :type _type: ...
Init instance with real values for a graphite/carbon connection :param name: daemon name :type name: str :param _type: daemon type :type _type: :param host: host to post data :type host: str :param port: port to post data :type port: int :param pr...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L257-L306
Alignak-monitoring/alignak
alignak/stats.py
Stats.flush
def flush(self, log=False): """Send inner stored metrics to the defined Graphite Returns False if the sending failed with a warning log if log parameter is set :return: bool """ if not self.my_metrics: logger.debug("Flushing - no metrics to send") return...
python
def flush(self, log=False): """Send inner stored metrics to the defined Graphite Returns False if the sending failed with a warning log if log parameter is set :return: bool """ if not self.my_metrics: logger.debug("Flushing - no metrics to send") return...
Send inner stored metrics to the defined Graphite Returns False if the sending failed with a warning log if log parameter is set :return: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L308-L362
Alignak-monitoring/alignak
alignak/stats.py
Stats.send_to_graphite
def send_to_graphite(self, metric, value, timestamp=None): """ Inner store a new metric and flush to Graphite if the flush threshold is reached. If no timestamp is provided, get the current time for the metric timestam. :param metric: metric name in dotted format :type metric: ...
python
def send_to_graphite(self, metric, value, timestamp=None): """ Inner store a new metric and flush to Graphite if the flush threshold is reached. If no timestamp is provided, get the current time for the metric timestam. :param metric: metric name in dotted format :type metric: ...
Inner store a new metric and flush to Graphite if the flush threshold is reached. If no timestamp is provided, get the current time for the metric timestam. :param metric: metric name in dotted format :type metric: str :param value: :type value: float :param timestamp: ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L364-L388
Alignak-monitoring/alignak
alignak/stats.py
Stats.counter
def counter(self, key, value, timestamp=None): """Set a counter value If the inner key does not exist is is created :param key: counter to update :type key: str :param value: counter value :type value: float :return: An alignak_stat brok if broks are enabled els...
python
def counter(self, key, value, timestamp=None): """Set a counter value If the inner key does not exist is is created :param key: counter to update :type key: str :param value: counter value :type value: float :return: An alignak_stat brok if broks are enabled els...
Set a counter value If the inner key does not exist is is created :param key: counter to update :type key: str :param value: counter value :type value: float :return: An alignak_stat brok if broks are enabled else None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/stats.py#L467-L536
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.get_managed_configurations
def get_managed_configurations(self): """Get the configurations managed by this satellite The configurations managed by a satellite is a list of the configuration attached to the schedulers related to the satellites. A broker linked to several schedulers will return the list of the conf...
python
def get_managed_configurations(self): """Get the configurations managed by this satellite The configurations managed by a satellite is a list of the configuration attached to the schedulers related to the satellites. A broker linked to several schedulers will return the list of the conf...
Get the configurations managed by this satellite The configurations managed by a satellite is a list of the configuration attached to the schedulers related to the satellites. A broker linked to several schedulers will return the list of the configuration parts of its scheduler links. ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L132-L151
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.get_scheduler_from_hostname
def get_scheduler_from_hostname(self, host_name): """Get scheduler linked to the given host_name :param host_name: host_name we want the scheduler from :type host_name: str :return: scheduler with id corresponding to the mapping table :rtype: dict """ scheduler_u...
python
def get_scheduler_from_hostname(self, host_name): """Get scheduler linked to the given host_name :param host_name: host_name we want the scheduler from :type host_name: str :return: scheduler with id corresponding to the mapping table :rtype: dict """ scheduler_u...
Get scheduler linked to the given host_name :param host_name: host_name we want the scheduler from :type host_name: str :return: scheduler with id corresponding to the mapping table :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L153-L162
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.get_external_commands
def get_external_commands(self): """Get the external commands :return: External commands list :rtype: list """ res = self.external_commands logger.debug("Get and clear external commands list: %s", res) self.external_commands = [] return res
python
def get_external_commands(self): """Get the external commands :return: External commands list :rtype: list """ res = self.external_commands logger.debug("Get and clear external commands list: %s", res) self.external_commands = [] return res
Get the external commands :return: External commands list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L164-L173
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.get_results_from_passive
def get_results_from_passive(self, scheduler_instance_id): """Get executed actions results from a passive satellite for a specific scheduler :param scheduler_instance_id: scheduler id :type scheduler_instance_id: int :return: Results list :rtype: list """ # Do I ...
python
def get_results_from_passive(self, scheduler_instance_id): """Get executed actions results from a passive satellite for a specific scheduler :param scheduler_instance_id: scheduler id :type scheduler_instance_id: int :return: Results list :rtype: list """ # Do I ...
Get executed actions results from a passive satellite for a specific scheduler :param scheduler_instance_id: scheduler id :type scheduler_instance_id: int :return: Results list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L175-L203
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.clean_previous_run
def clean_previous_run(self): """Clean variables from previous configuration, such as schedulers, broks and external commands :return: None """ # Clean all lists self.arbiters.clear() self.schedulers.clear() with self.external_commands_lock: s...
python
def clean_previous_run(self): """Clean variables from previous configuration, such as schedulers, broks and external commands :return: None """ # Clean all lists self.arbiters.clear() self.schedulers.clear() with self.external_commands_lock: s...
Clean variables from previous configuration, such as schedulers, broks and external commands :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L205-L215
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.setup_new_conf
def setup_new_conf(self): # pylint: disable=too-many-locals, too-many-branches """Setup the new configuration received from Arbiter This function is the generic treatment needed for every Alignak daemon when it receivss a new configuration from the Arbiter: - save the new config...
python
def setup_new_conf(self): # pylint: disable=too-many-locals, too-many-branches """Setup the new configuration received from Arbiter This function is the generic treatment needed for every Alignak daemon when it receivss a new configuration from the Arbiter: - save the new config...
Setup the new configuration received from Arbiter This function is the generic treatment needed for every Alignak daemon when it receivss a new configuration from the Arbiter: - save the new configuration - dump the main configuration elements - get its own configuration (self_c...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L221-L350
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.get_events
def get_events(self): """Get event list from satellite :return: A copy of the events list :rtype: list """ res = copy.copy(self.events) del self.events[:] return res
python
def get_events(self): """Get event list from satellite :return: A copy of the events list :rtype: list """ res = copy.copy(self.events) del self.events[:] return res
Get event list from satellite :return: A copy of the events list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L352-L360
Alignak-monitoring/alignak
alignak/satellite.py
BaseSatellite.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 daemon one res = super(BaseSatellite, self).get_daemon_stats(details=details) counters = res['counters'] ...
python
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # call the daemon one res = super(BaseSatellite, self).get_daemon_stats(details=details) counters = res['counters'] ...
Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L362-L376
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.manage_action_return
def manage_action_return(self, action): """Manage action return from Workers We just put them into the corresponding sched and we clean unused properties like my_scheduler :param action: the action to manage :type action: alignak.action.Action :return: None """ ...
python
def manage_action_return(self, action): """Manage action return from Workers We just put them into the corresponding sched and we clean unused properties like my_scheduler :param action: the action to manage :type action: alignak.action.Action :return: None """ ...
Manage action return from Workers We just put them into the corresponding sched and we clean unused properties like my_scheduler :param action: the action to manage :type action: alignak.action.Action :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L462-L502
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.push_results
def push_results(self): """Push the checks/actions results to our schedulers :return: None """ # For all schedulers, we check for wait_homerun # and we send back results for scheduler_link_uuid in self.schedulers: scheduler_link = self.schedulers[scheduler_li...
python
def push_results(self): """Push the checks/actions results to our schedulers :return: None """ # For all schedulers, we check for wait_homerun # and we send back results for scheduler_link_uuid in self.schedulers: scheduler_link = self.schedulers[scheduler_li...
Push the checks/actions results to our schedulers :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L504-L538
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.create_and_launch_worker
def create_and_launch_worker(self, module_name='fork'): """Create and launch a new worker, and put it into self.workers It can be mortal or not :param module_name: the module name related to the worker default is "fork" for no module Inde...
python
def create_and_launch_worker(self, module_name='fork'): """Create and launch a new worker, and put it into self.workers It can be mortal or not :param module_name: the module name related to the worker default is "fork" for no module Inde...
Create and launch a new worker, and put it into self.workers It can be mortal or not :param module_name: the module name related to the worker default is "fork" for no module Indeed, it is actually the module 'python_name' :type module_na...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L540-L589
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.do_stop_workers
def do_stop_workers(self): """Stop all workers :return: None """ logger.info("Stopping all workers (%d)", len(self.workers)) for worker in list(self.workers.values()): try: logger.info(" - stopping '%s'", worker.get_id()) worker.termin...
python
def do_stop_workers(self): """Stop all workers :return: None """ logger.info("Stopping all workers (%d)", len(self.workers)) for worker in list(self.workers.values()): try: logger.info(" - stopping '%s'", worker.get_id()) worker.termin...
Stop all workers :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L591-L607
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.get_broks
def get_broks(self): """Get brok list from satellite :return: A copy of the broks list :rtype: list """ res = copy.copy(self.broks) del self.broks[:] return res
python
def get_broks(self): """Get brok list from satellite :return: A copy of the broks list :rtype: list """ res = copy.copy(self.broks) del self.broks[:] return res
Get brok list from satellite :return: A copy of the broks list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L644-L652
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.check_and_del_zombie_workers
def check_and_del_zombie_workers(self): # pragma: no cover, not with unit tests... # pylint: disable= not-callable """Check if worker are fine and kill them if not. Dispatch the actions in the worker to another one TODO: see if unit tests would allow to check this code? :retur...
python
def check_and_del_zombie_workers(self): # pragma: no cover, not with unit tests... # pylint: disable= not-callable """Check if worker are fine and kill them if not. Dispatch the actions in the worker to another one TODO: see if unit tests would allow to check this code? :retur...
Check if worker are fine and kill them if not. Dispatch the actions in the worker to another one TODO: see if unit tests would allow to check this code? :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L654-L699
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.adjust_worker_number_by_load
def adjust_worker_number_by_load(self): """Try to create the minimum workers specified in the configuration :return: None """ if self.interrupted: logger.debug("Trying to adjust worker number. Ignoring because we are stopping.") return to_del = [] ...
python
def adjust_worker_number_by_load(self): """Try to create the minimum workers specified in the configuration :return: None """ if self.interrupted: logger.debug("Trying to adjust worker number. Ignoring because we are stopping.") return to_del = [] ...
Try to create the minimum workers specified in the configuration :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L701-L731
Alignak-monitoring/alignak
alignak/satellite.py
Satellite._get_queue_for_the_action
def _get_queue_for_the_action(self, action): """Find action queue for the action depending on the module. The id is found with action modulo on action id :param a: the action that need action queue to be assigned :type action: object :return: worker id and queue. (0, None) if no...
python
def _get_queue_for_the_action(self, action): """Find action queue for the action depending on the module. The id is found with action modulo on action id :param a: the action that need action queue to be assigned :type action: object :return: worker id and queue. (0, None) if no...
Find action queue for the action depending on the module. The id is found with action modulo on action id :param a: the action that need action queue to be assigned :type action: object :return: worker id and queue. (0, None) if no queue for the module_type :rtype: tuple
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L734-L757
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.add_actions
def add_actions(self, actions_list, scheduler_instance_id): """Add a list of actions to the satellite queues :param actions_list: Actions list to add :type actions_list: list :param scheduler_instance_id: sheduler link to assign the actions to :type scheduler_instance_id: Schedu...
python
def add_actions(self, actions_list, scheduler_instance_id): """Add a list of actions to the satellite queues :param actions_list: Actions list to add :type actions_list: list :param scheduler_instance_id: sheduler link to assign the actions to :type scheduler_instance_id: Schedu...
Add a list of actions to the satellite queues :param actions_list: Actions list to add :type actions_list: list :param scheduler_instance_id: sheduler link to assign the actions to :type scheduler_instance_id: SchedulerLink :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L759-L802
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.assign_to_a_queue
def assign_to_a_queue(self, action): """Take an action and put it to a worker actions queue :param action: action to put :type action: alignak.action.Action :return: None """ (worker_id, queue) = self._get_queue_for_the_action(action) if not worker_id: ...
python
def assign_to_a_queue(self, action): """Take an action and put it to a worker actions queue :param action: action to put :type action: alignak.action.Action :return: None """ (worker_id, queue) = self._get_queue_for_the_action(action) if not worker_id: ...
Take an action and put it to a worker actions queue :param action: action to put :type action: alignak.action.Action :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L804-L822
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.get_new_actions
def get_new_actions(self): """ Wrapper function for do_get_new_actions For stats purpose :return: None TODO: Use a decorator for timing this function """ try: _t0 = time.time() self.do_get_new_actions() statsmgr.timer('actions.got.time...
python
def get_new_actions(self): """ Wrapper function for do_get_new_actions For stats purpose :return: None TODO: Use a decorator for timing this function """ try: _t0 = time.time() self.do_get_new_actions() statsmgr.timer('actions.got.time...
Wrapper function for do_get_new_actions For stats purpose :return: None TODO: Use a decorator for timing this function
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L824-L836
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.do_get_new_actions
def do_get_new_actions(self): """Get new actions from schedulers Create a Message and put into the module queue REF: doc/alignak-action-queues.png (1) :return: None """ # Here are the differences between a poller and a reactionner: # Poller will only do checks, ...
python
def do_get_new_actions(self): """Get new actions from schedulers Create a Message and put into the module queue REF: doc/alignak-action-queues.png (1) :return: None """ # Here are the differences between a poller and a reactionner: # Poller will only do checks, ...
Get new actions from schedulers Create a Message and put into the module queue REF: doc/alignak-action-queues.png (1) :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L838-L874
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.clean_previous_run
def clean_previous_run(self): """Clean variables from previous configuration, such as schedulers, broks and external commands :return: None """ # Execute the base class treatment... super(Satellite, self).clean_previous_run() # Clean my lists del self.br...
python
def clean_previous_run(self): """Clean variables from previous configuration, such as schedulers, broks and external commands :return: None """ # Execute the base class treatment... super(Satellite, self).clean_previous_run() # Clean my lists del self.br...
Clean variables from previous configuration, such as schedulers, broks and external commands :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L876-L887
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.do_loop_turn
def do_loop_turn(self): # pylint: disable=too-many-branches """Satellite main loop:: * Check and delete zombies actions / modules * Get returns from queues * Adjust worker number * Get new actions :return: None """ # Try to see if one of my module is de...
python
def do_loop_turn(self): # pylint: disable=too-many-branches """Satellite main loop:: * Check and delete zombies actions / modules * Get returns from queues * Adjust worker number * Get new actions :return: None """ # Try to see if one of my module is de...
Satellite main loop:: * Check and delete zombies actions / modules * Get returns from queues * Adjust worker number * Get new actions :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L889-L1017
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.setup_new_conf
def setup_new_conf(self): # pylint: disable=too-many-branches """Setup the new configuration received from Arbiter This function calls the base satellite treatment and manages the configuration needed for a simple satellite daemon that executes some actions (eg. poller or reactionner): ...
python
def setup_new_conf(self): # pylint: disable=too-many-branches """Setup the new configuration received from Arbiter This function calls the base satellite treatment and manages the configuration needed for a simple satellite daemon that executes some actions (eg. poller or reactionner): ...
Setup the new configuration received from Arbiter This function calls the base satellite treatment and manages the configuration needed for a simple satellite daemon that executes some actions (eg. poller or reactionner): - configure the passive mode - configure the workers - co...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L1030-L1083
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.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 daemon one res = super(Satellite, self).get_daemon_stats(details=details) counters = res['counters'] ...
python
def get_daemon_stats(self, details=False): """Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict """ # call the daemon one res = super(Satellite, self).get_daemon_stats(details=details) counters = res['counters'] ...
Increase the stats provided by the Daemon base class :return: stats dictionary :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L1085-L1106
Alignak-monitoring/alignak
alignak/satellite.py
Satellite.main
def main(self): """Main satellite function. Do init and then mainloop :return: None """ try: # Start the daemon mode if not self.do_daemon_init_and_start(): self.exit_on_error(message="Daemon initialization error", exit_code=3) self.d...
python
def main(self): """Main satellite function. Do init and then mainloop :return: None """ try: # Start the daemon mode if not self.do_daemon_init_and_start(): self.exit_on_error(message="Daemon initialization error", exit_code=3) self.d...
Main satellite function. Do init and then mainloop :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/satellite.py#L1108-L1136
Alignak-monitoring/alignak
alignak/contactdowntime.py
ContactDowntime.check_activation
def check_activation(self, contacts): """Enter or exit downtime if necessary :return: None """ now = time.time() was_is_in_effect = self.is_in_effect self.is_in_effect = (self.start_time <= now <= self.end_time) # Raise a log entry when we get in the downtime ...
python
def check_activation(self, contacts): """Enter or exit downtime if necessary :return: None """ now = time.time() was_is_in_effect = self.is_in_effect self.is_in_effect = (self.start_time <= now <= self.end_time) # Raise a log entry when we get in the downtime ...
Enter or exit downtime if necessary :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/contactdowntime.py#L90-L105
Alignak-monitoring/alignak
alignak/contactdowntime.py
ContactDowntime.exit
def exit(self, contacts): """Wrapper to call raise_exit_downtime_log_entry for ref (host/service) set can_be_deleted to True :return: None """ contact = contacts[self.ref] contact.raise_exit_downtime_log_entry() self.can_be_deleted = True
python
def exit(self, contacts): """Wrapper to call raise_exit_downtime_log_entry for ref (host/service) set can_be_deleted to True :return: None """ contact = contacts[self.ref] contact.raise_exit_downtime_log_entry() self.can_be_deleted = True
Wrapper to call raise_exit_downtime_log_entry for ref (host/service) set can_be_deleted to True :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/contactdowntime.py#L123-L131
Alignak-monitoring/alignak
alignak/contactdowntime.py
ContactDowntime.cancel
def cancel(self, contacts): """Wrapper to call raise_cancel_downtime_log_entry for ref (host/service) set can_be_deleted to True set is_in_effect to False :return: None """ self.is_in_effect = False contact = contacts[self.ref] contact.raise_cancel_downti...
python
def cancel(self, contacts): """Wrapper to call raise_cancel_downtime_log_entry for ref (host/service) set can_be_deleted to True set is_in_effect to False :return: None """ self.is_in_effect = False contact = contacts[self.ref] contact.raise_cancel_downti...
Wrapper to call raise_cancel_downtime_log_entry for ref (host/service) set can_be_deleted to True set is_in_effect to False :return: None
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/contactdowntime.py#L133-L143
Alignak-monitoring/alignak
alignak/util.py
split_semicolon
def split_semicolon(line, maxsplit=None): r"""Split a line on semicolons characters but not on the escaped semicolons :param line: line to split :type line: str :param maxsplit: maximal number of split (if None, no limit) :type maxsplit: None | int :return: split line :rtype: list >>> ...
python
def split_semicolon(line, maxsplit=None): r"""Split a line on semicolons characters but not on the escaped semicolons :param line: line to split :type line: str :param maxsplit: maximal number of split (if None, no limit) :type maxsplit: None | int :return: split line :rtype: list >>> ...
r"""Split a line on semicolons characters but not on the escaped semicolons :param line: line to split :type line: str :param maxsplit: maximal number of split (if None, no limit) :type maxsplit: None | int :return: split line :rtype: list >>> split_semicolon('a,b;c;;g') ['a,b', 'c', '...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L110-L165
Alignak-monitoring/alignak
alignak/util.py
jsonify_r
def jsonify_r(obj): # pragma: no cover, not for unit tests... # pylint: disable=too-many-branches """Convert an object into json (recursively on attribute) :param obj: obj to jsonify :type obj: object :return: json representation of obj :rtype: dict """ res = {} cls = obj.__class__...
python
def jsonify_r(obj): # pragma: no cover, not for unit tests... # pylint: disable=too-many-branches """Convert an object into json (recursively on attribute) :param obj: obj to jsonify :type obj: object :return: json representation of obj :rtype: dict """ res = {} cls = obj.__class__...
Convert an object into json (recursively on attribute) :param obj: obj to jsonify :type obj: object :return: json representation of obj :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L168-L226
Alignak-monitoring/alignak
alignak/util.py
format_t_into_dhms_format
def format_t_into_dhms_format(timestamp): """ Convert an amount of second into day, hour, min and sec :param timestamp: seconds :type timestamp: int :return: 'Ad Bh Cm Ds' :rtype: str >>> format_t_into_dhms_format(456189) '5d 6h 43m 9s' >>> format_t_into_dhms_format(3600) '0d 1h 0...
python
def format_t_into_dhms_format(timestamp): """ Convert an amount of second into day, hour, min and sec :param timestamp: seconds :type timestamp: int :return: 'Ad Bh Cm Ds' :rtype: str >>> format_t_into_dhms_format(456189) '5d 6h 43m 9s' >>> format_t_into_dhms_format(3600) '0d 1h 0...
Convert an amount of second into day, hour, min and sec :param timestamp: seconds :type timestamp: int :return: 'Ad Bh Cm Ds' :rtype: str >>> format_t_into_dhms_format(456189) '5d 6h 43m 9s' >>> format_t_into_dhms_format(3600) '0d 1h 0m 0s'
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L230-L248
Alignak-monitoring/alignak
alignak/util.py
merge_periods
def merge_periods(data): """ Merge periods to have better continous periods. Like 350-450, 400-600 => 350-600 :param data: list of periods :type data: list :return: better continous periods :rtype: list """ # sort by start date newdata = sorted(data, key=lambda drange: drange[0]...
python
def merge_periods(data): """ Merge periods to have better continous periods. Like 350-450, 400-600 => 350-600 :param data: list of periods :type data: list :return: better continous periods :rtype: list """ # sort by start date newdata = sorted(data, key=lambda drange: drange[0]...
Merge periods to have better continous periods. Like 350-450, 400-600 => 350-600 :param data: list of periods :type data: list :return: better continous periods :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L251-L289
Alignak-monitoring/alignak
alignak/util.py
to_split
def to_split(val, split_on_comma=True): """Try to split a string with comma separator. If val is already a list return it If we don't have to split just return [val] If split gives only [''] empty it :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool...
python
def to_split(val, split_on_comma=True): """Try to split a string with comma separator. If val is already a list return it If we don't have to split just return [val] If split gives only [''] empty it :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool...
Try to split a string with comma separator. If val is already a list return it If we don't have to split just return [val] If split gives only [''] empty it :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool :return: split value on comma :rtype: ...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L329-L361
Alignak-monitoring/alignak
alignak/util.py
list_split
def list_split(val, split_on_comma=True): """Try to split each member of a list with comma separator. If we don't have to split just return val :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool :return: list with members split on comma :rtype: list ...
python
def list_split(val, split_on_comma=True): """Try to split each member of a list with comma separator. If we don't have to split just return val :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool :return: list with members split on comma :rtype: list ...
Try to split each member of a list with comma separator. If we don't have to split just return val :param val: value to split :type val: :param split_on_comma: :type split_on_comma: bool :return: list with members split on comma :rtype: list >>> list_split(['a,b,c'], False) ['a,b,c...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L364-L393
Alignak-monitoring/alignak
alignak/util.py
to_best_int_float
def to_best_int_float(val): """Get best type for value between int and float :param val: value :type val: :return: int(float(val)) if int(float(val)) == float(val), else float(val) :rtype: int | float >>> to_best_int_float("20.1") 20.1 >>> to_best_int_float("20.0") 20 >>> to_...
python
def to_best_int_float(val): """Get best type for value between int and float :param val: value :type val: :return: int(float(val)) if int(float(val)) == float(val), else float(val) :rtype: int | float >>> to_best_int_float("20.1") 20.1 >>> to_best_int_float("20.0") 20 >>> to_...
Get best type for value between int and float :param val: value :type val: :return: int(float(val)) if int(float(val)) == float(val), else float(val) :rtype: int | float >>> to_best_int_float("20.1") 20.1 >>> to_best_int_float("20.0") 20 >>> to_best_int_float("20") 20
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L396-L419
Alignak-monitoring/alignak
alignak/util.py
dict_to_serialized_dict
def dict_to_serialized_dict(ref, the_dict): """Serialize the list of elements to a dictionary Used for the retention store :param ref: Not used :type ref: :param the_dict: dictionary to convert :type the_dict: dict :return: dict of serialized :rtype: dict """ result = {} fo...
python
def dict_to_serialized_dict(ref, the_dict): """Serialize the list of elements to a dictionary Used for the retention store :param ref: Not used :type ref: :param the_dict: dictionary to convert :type the_dict: dict :return: dict of serialized :rtype: dict """ result = {} fo...
Serialize the list of elements to a dictionary Used for the retention store :param ref: Not used :type ref: :param the_dict: dictionary to convert :type the_dict: dict :return: dict of serialized :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L587-L604
Alignak-monitoring/alignak
alignak/util.py
list_to_serialized
def list_to_serialized(ref, the_list): """Serialize the list of elements Used for the retention store :param ref: Not used :type ref: :param the_list: dictionary to convert :type the_list: dict :return: dict of serialized :rtype: dict """ result = [] for elt in the_list: ...
python
def list_to_serialized(ref, the_list): """Serialize the list of elements Used for the retention store :param ref: Not used :type ref: :param the_list: dictionary to convert :type the_list: dict :return: dict of serialized :rtype: dict """ result = [] for elt in the_list: ...
Serialize the list of elements Used for the retention store :param ref: Not used :type ref: :param the_list: dictionary to convert :type the_list: dict :return: dict of serialized :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L607-L624
Alignak-monitoring/alignak
alignak/util.py
to_hostnames_list
def to_hostnames_list(ref, tab): # pragma: no cover, to be deprecated? """Convert Host list into a list of host_name :param ref: Not used :type ref: :param tab: Host list :type tab: list[alignak.objects.host.Host] :return: host_name list :rtype: list """ res = [] for host in t...
python
def to_hostnames_list(ref, tab): # pragma: no cover, to be deprecated? """Convert Host list into a list of host_name :param ref: Not used :type ref: :param tab: Host list :type tab: list[alignak.objects.host.Host] :return: host_name list :rtype: list """ res = [] for host in t...
Convert Host list into a list of host_name :param ref: Not used :type ref: :param tab: Host list :type tab: list[alignak.objects.host.Host] :return: host_name list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L642-L656
Alignak-monitoring/alignak
alignak/util.py
to_svc_hst_distinct_lists
def to_svc_hst_distinct_lists(ref, tab): # pragma: no cover, to be deprecated? """create a dict with 2 lists:: * services: all services of the tab * hosts: all hosts of the tab :param ref: Not used :type ref: :param tab: list of Host and Service :type tab: list :return: dict with host...
python
def to_svc_hst_distinct_lists(ref, tab): # pragma: no cover, to be deprecated? """create a dict with 2 lists:: * services: all services of the tab * hosts: all hosts of the tab :param ref: Not used :type ref: :param tab: list of Host and Service :type tab: list :return: dict with host...
create a dict with 2 lists:: * services: all services of the tab * hosts: all hosts of the tab :param ref: Not used :type ref: :param tab: list of Host and Service :type tab: list :return: dict with hosts and services names :rtype: dict
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L659-L680
Alignak-monitoring/alignak
alignak/util.py
master_then_spare
def master_then_spare(data): """Return the provided satellites list sorted as: - alive first, - then spare - then dead satellites. :param data: the SatelliteLink list :type data: list :return: sorted list :rtype: list """ master = [] spare = [] for sd...
python
def master_then_spare(data): """Return the provided satellites list sorted as: - alive first, - then spare - then dead satellites. :param data: the SatelliteLink list :type data: list :return: sorted list :rtype: list """ master = [] spare = [] for sd...
Return the provided satellites list sorted as: - alive first, - then spare - then dead satellites. :param data: the SatelliteLink list :type data: list :return: sorted list :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L713-L735
Alignak-monitoring/alignak
alignak/util.py
sort_by_number_values
def sort_by_number_values(x00, y00): # pragma: no cover, looks like not used! """Compare x00, y00 base on number of values :param x00: first elem to compare :type x00: list :param y00: second elem to compare :type y00: list :return: x00 > y00 (-1) if len(x00) > len(y00), x00 == y00 (0) if id e...
python
def sort_by_number_values(x00, y00): # pragma: no cover, looks like not used! """Compare x00, y00 base on number of values :param x00: first elem to compare :type x00: list :param y00: second elem to compare :type y00: list :return: x00 > y00 (-1) if len(x00) > len(y00), x00 == y00 (0) if id e...
Compare x00, y00 base on number of values :param x00: first elem to compare :type x00: list :param y00: second elem to compare :type y00: list :return: x00 > y00 (-1) if len(x00) > len(y00), x00 == y00 (0) if id equals, x00 < y00 (1) else :rtype: int
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L738-L753
Alignak-monitoring/alignak
alignak/util.py
average_percentile
def average_percentile(values): """ Get the average, min percentile (5%) and max percentile (95%) of a list of values. :param values: list of value to compute :type values: list :return: tuple containing average, min and max value :rtype: tuple """ if not values: return None...
python
def average_percentile(values): """ Get the average, min percentile (5%) and max percentile (95%) of a list of values. :param values: list of value to compute :type values: list :return: tuple containing average, min and max value :rtype: tuple """ if not values: return None...
Get the average, min percentile (5%) and max percentile (95%) of a list of values. :param values: list of value to compute :type values: list :return: tuple containing average, min and max value :rtype: tuple
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L757-L773
Alignak-monitoring/alignak
alignak/util.py
strip_and_uniq
def strip_and_uniq(tab): """Strip every element of a list and keep a list of ordered unique values :param tab: list to strip :type tab: list :return: stripped list with unique values :rtype: list """ _list = [] for elt in tab: val = elt.strip() if val and val not in _lis...
python
def strip_and_uniq(tab): """Strip every element of a list and keep a list of ordered unique values :param tab: list to strip :type tab: list :return: stripped list with unique values :rtype: list """ _list = [] for elt in tab: val = elt.strip() if val and val not in _lis...
Strip every element of a list and keep a list of ordered unique values :param tab: list to strip :type tab: list :return: stripped list with unique values :rtype: list
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L777-L790
Alignak-monitoring/alignak
alignak/util.py
expand_ranges
def expand_ranges(value): """ :param str value: The value to be "expanded". :return: A generator to yield the different resulting values from expanding the eventual ranges present in the input value. >>> tuple(expand_ranges("Item [1-3] - Bla")) ('Item 1 - Bla', 'Item 2 - Bla', 'Item 3 ...
python
def expand_ranges(value): """ :param str value: The value to be "expanded". :return: A generator to yield the different resulting values from expanding the eventual ranges present in the input value. >>> tuple(expand_ranges("Item [1-3] - Bla")) ('Item 1 - Bla', 'Item 2 - Bla', 'Item 3 ...
:param str value: The value to be "expanded". :return: A generator to yield the different resulting values from expanding the eventual ranges present in the input value. >>> tuple(expand_ranges("Item [1-3] - Bla")) ('Item 1 - Bla', 'Item 2 - Bla', 'Item 3 - Bla') >>> tuple(expand_ranges("X...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L829-L856
Alignak-monitoring/alignak
alignak/util.py
generate_key_value_sequences
def generate_key_value_sequences(entry, default_value): """Parse a key value config entry (used in duplicate foreach) If we have a key that look like [X-Y] we will expand it into Y-X+1 keys :param str entry: The config line to be parsed. :param str default_value: The default value to be used when none...
python
def generate_key_value_sequences(entry, default_value): """Parse a key value config entry (used in duplicate foreach) If we have a key that look like [X-Y] we will expand it into Y-X+1 keys :param str entry: The config line to be parsed. :param str default_value: The default value to be used when none...
Parse a key value config entry (used in duplicate foreach) If we have a key that look like [X-Y] we will expand it into Y-X+1 keys :param str entry: The config line to be parsed. :param str default_value: The default value to be used when none is available. :return: a generator yielding dicts with 'KE...
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L859-L898
Alignak-monitoring/alignak
alignak/util.py
filter_host_by_name
def filter_host_by_name(name): """Filter for host Filter on name :param name: name to filter :type name: str :return: Filter :rtype: bool """ def inner_filter(items): """Inner filter for host. Accept if host_name == name""" host = items["host"] if host is None: ...
python
def filter_host_by_name(name): """Filter for host Filter on name :param name: name to filter :type name: str :return: Filter :rtype: bool """ def inner_filter(items): """Inner filter for host. Accept if host_name == name""" host = items["host"] if host is None: ...
Filter for host Filter on name :param name: name to filter :type name: str :return: Filter :rtype: bool
https://github.com/Alignak-monitoring/alignak/blob/f3c145207e83159b799d3714e4241399c7740a64/alignak/util.py#L938-L955