class Service(host_id, host_name, id_unique, description, check_command, check_command_arg, normal_check_interval, retry_check_interval, max_check_attempts, active_checks_enabled, passive_checks_enabled, activate)

This class represents a service

  • host_id (int) – ID of the host

  • host_name (str) – Name of the host

  • id_unique (int) – ID of the service

  • description (str) – Description of the service

  • check_command (str) – Check command

  • check_command_arg (list of str) – Check command argument

  • normal_check_interval (int) – Normal check interval

  • retry_check_interval (int) – Retry check interval

  • max_check_attempts (int) – Maximum check attempts

  • active_checks_enabled (int) – Are activate checks enabled?

  • passive_checks_enabled (int) – Are passive check enabled?

  • activate (int) – Is the service enabled?


class ServiceParam

This class represents the parameters of a service

ACTION_URL = 'action_url'

Action URL which is linked to the service (str)

ACTIVATE = 'activate'

Enable or disable a service (bool)

ACTIVATE_CHECKS_ENABLED = 'activate_checks_enabled'

Set True when active checks are enabled (bool)

CHECK_COMMAND = 'check_command'

Name of the check command (str)

CHECK_COMMAND_ARGUMENTS = 'check_command_arguments'

Check command arguments (list of str)

CHECK_FRESHNESS = 'check_freshness'

Set True if check freshness should be enabled (bool)

CHECK_PERIOD = 'check_period'

Name of the check period (str)

COMMENT = 'comment'

Comment of the service (str)

CONTACT_ADDITIVE_INHERITANCE = 'contact_additive_inheritance'

Set True if you want contact additive inheritance (bool)

CONTACT_GROUP_ADDITIVE_INHERITANCE = 'cg_additive_inheritance'

Set True if you want contact group additive inheritance (bool)

DESCRIPTION = 'description'

Description of the service (str)

EVENT_HANDLER = 'event_handler'

Name of the event handler command (str)

EVENT_HANDLER_ARGUMENTS = 'event_handler_arguments'

List of the event handler arguments (list of str)

EVENT_HANDLER_ENABLED = 'event_handler_enabled'

Set True if the event handler should be enabled (bool)

FIRST_NOTIFICATION_DELAY = 'first_notification_delay'

Delay after which the first notification should be sent, in minutes (int)

FLAP_DETECTION_ENABLED = 'flap_detection_enabled'

Set True if flap detection should be enabled (bool)

FRESHNESS_THRESHOLD = 'freshness_threshold'

Freshness threshold, in seconds (int)

ICON_IMAGE = 'icon_image'

Name of the icon which should be used (str)

ICON_IMAGE_ALT = 'icon_image_alt'

Alternative image (str)

IS_VOLATILE = 'is_volatile'

Set True when service is volatile (bool)

MAX_CHECK_ATTEMPTS = 'max_check_attempts'

Maximum number of attempt before a HARD state is declared (int)

NORMAL_CHECK_INTERVAL = 'normal_check_interval'

Time between the checks should be executed, in minutes (int)

NOTES = 'notes'

Notes regarding the service (str)

NOTIFICATIONS_ENABLED = 'notifications_enabled'

Set True if notification should be enabled (bool)

NOTIFICATION_INTERVAL = 'notification_interval'

Interval between the notifications should be sent, in minutes (int)

NOTIFICATION_OPTIONS = 'notification_options'

Status linked to the notifications (str)

NOTIFICATION_PERIOD = 'notification_period'

Name of the notification period (str)

OBSESS_OVER_SERVICE = 'obsess_over_service'

Set True when obsess over service should be enabled (bool)

PASSIVE_CHECKS_ENABLED = 'passive_checks_enabled'

Set True if passive checks are enabled (bool)

RECOVERY_NOTIFICATION_DELAY = 'recovery_notification_delay'

Delay after which the first recovery notification should be sent, in minutes (int)

RETAIN_NONSTATUS_INFORMATION = 'retain_nonstatus_information'

Set True when nonstatus information should bne retained (bool)

RETAIN_STATUS_INFORMATION = 'retain_status_information'

Set True when status information should be retained (bool)

RETRY_CHECK_INTERVAL = 'retry_check_interval'

Time after the next check should be executed, if the one before failed, in minutes (int)

SERVICE_NOTIFICATION_OPTIONS = 'service_notification_options'

Set the notification type (ServiceNotificationOption)

TEMPLATE = 'template'

Name of the service template (str)

URL = 'notes_url'

URL which is linked to the service (str)


class ServiceNotificationOption

This class represents a service notification option


Type None can only be selected separately

CRITICAL = ('c',)
FLAPPING = ('f',)
NONE = 'n'
RECOVERY = ('r',)
UNKNOWN = ('u',)
WARNING = ('w',)