Downtime

Downtime

class Downtime(id_unique, name, description, activate, hosts=None, services=None, service_groups=None, host_groups=None)

This class represents a recurrent downtime

Parameters
  • id_unique (int) – ID of the downtime

  • name (str) – Name of the downtime

  • description (str) – Description of the downtime

  • activate (bool) – Is the downtime activated?

  • hosts (list of str) – Optional: Hosts the downtime should apply to

  • services (list of str) – Optional: Services the downtime should apply to

  • service_groups (list of str) – Optional: Service groups the downtime should apply to

  • host_groups (list of str) – Optional: Host groups the downtime should apply to

DowntimeType

class DowntimeType

This class represents the available types of recurrent downtimes

HOST = 'host'
HOST_GROUP = 'hg'
SERVICE = 'service'
SERVICE_GROUP = 'sg'

DowntimeParam

class DowntimeParam

This class represents the available parameter for a recurrent downtime

DESCRIPTION = 'description'
NAME = 'name'

DowntimePeriod

class DowntimePeriod(position, start_time, end_time, fixed, duration, day_of_week, day_of_month, month_cycle)

This class represents a period of a recurrent downtime

Parameters
  • position (int) – Position of the period

  • start_time (str) – Start time of the downtime. Format hh:mm:ss

  • end_time (str) – End time of the downtime. Format hh:mm:ss

  • fixed (bool) – Is the downtime fixed or flexible? Fixed = True, Flexible = False

  • duration (int) – Duration of the downtime in seconds

  • day_of_week (list of int) – Days of the week the period should apply

  • day_of_month (list of int) – Days of the month the period should apply

  • month_cycle (str) – First or last