nagstat Class Reference

Helper class for nagios status. More...

Static Public Member Functions

static preprocess_orm_object (Object_Model $object)
 Processes an ORM object into the stdObject format expected by nagstat::process_macros, due to other repositories still depending on the signature of process_macros.
static process_macros ($string=false, $obj=false, $objtype=false)
 Process macros for host- or service objects.

Data Fields

const CMD_ENABLE_FLAP_DETECTION = 61
 The nagios code for the command to enable flap detection.
const CMD_DISABLE_FLAP_DETECTION = 62
 The nagios code for the command to disable flap detection.
const DISPLAY_HOSTS = 0
 FIXME: don't know, unused?
const DISPLAY_HOSTGROUPS = 1
 FIXME: don't know, unused?
const DISPLAY_SERVICEGROUPS = 2
 FIXME: don't know, unused?
const HOST_UP = 1
 Nagios host up code as a bit flag.
const HOST_DOWN = 2
 Nagios host down code as a bit flag.
const HOST_UNREACHABLE = 4
 Nagios host unreachable code as a bit flag.
const HOST_PENDING = 64
 Our arbitrary code for not-yet-checked hosts.
const HOST_PROBLEM = 6
 DOWN or UNREACHABLE.
const HOST_ALL = 71
 All of the above ORed together.
const SERVICE_DOWNTIME = 1
 service downtime
const HOST_DOWNTIME = 2
 host downtime
const ANY_DOWNTIME = 3
 host or service downtime
const HOST_SCHEDULED_DOWNTIME = 1
 Code for hosts in scheduled downtime, bit flag.
const HOST_NO_SCHEDULED_DOWNTIME = 2
 Code for hosts not in scheduled downtime, bit flag.
const HOST_STATE_ACKNOWLEDGED = 4
 Code for hosts in state acknowledged, bit flag.
const HOST_STATE_UNACKNOWLEDGED = 8
 Code for hosts not in state acknowledged, bit flag.
const HOST_CHECKS_DISABLED = 16
 Code for hosts with disabled checks, bit flag.
const HOST_CHECKS_ENABLED = 32
 Code for hosts with enabled checks, bit flag.
const HOST_EVENT_HANDLER_DISABLED = 64
 Code for hosts with no enabled event handler, bit flag.
const HOST_EVENT_HANDLER_ENABLED = 128
 Code for hosts with an enabled event handler, bit flag.
const HOST_FLAP_DETECTION_DISABLED = 256
 Code for hosts with disabled flap detection, bit flag.
const HOST_FLAP_DETECTION_ENABLED = 512
 Code for hosts with enabled flap detection, bit flag.
const HOST_IS_FLAPPING = 1024
 Code for hosts that are flapping, bit flag.
const HOST_IS_NOT_FLAPPING = 2048
 Code for hosts that are not flapping, bit flag.
const HOST_NOTIFICATIONS_DISABLED = 4096
 Code for hosts that has disabled notifications, bit flag.
const HOST_NOTIFICATIONS_ENABLED = 8192
 Code for hosts with enabled notifications, bit flag.
const HOST_PASSIVE_CHECKS_DISABLED = 16384
 Code for hosts with disabled passive checks, bit flag.
const HOST_PASSIVE_CHECKS_ENABLED = 32768
 Code for hosts with enabled passive checks, bit flag.
const HOST_PASSIVE_CHECK = 65536
 Code for hosts that were last checked by a passive check, bit flag.
const HOST_ACTIVE_CHECK = 131072
 Code for hosts that were last checked by an active check, bit flag.
const HOST_HARD_STATE = 262144
 Code for hosts in a hard state, bit flag.
const HOST_SOFT_STATE = 524288
 Code for hosts in a soft state, bit flag.
const SERVICE_OK = 1
 Nagios service ok code as a bit flag.
const SERVICE_WARNING = 2
 Nagios service warning code as a bit flag.
const SERVICE_CRITICAL = 4
 Nagios service critical code as a bit flag.
const SERVICE_UNKNOWN = 8
 Nagios service unknown code as a bit flag.
const SERVICE_PENDING = 64
 Our arbitrary code for not-yet-checked services.
const SERVICE_PROBLEM = 14
 WARNING or CRITICAL or UNKNOWN.
const SERVICE_ALL = 79
 All of the above, ORed together.
const SERVICE_SCHEDULED_DOWNTIME = 1
 Code for services in scheduled downtime, bit flag.
const SERVICE_NO_SCHEDULED_DOWNTIME = 2
 Code for services not in scheduled downtime, bit flag.
const SERVICE_STATE_ACKNOWLEDGED = 4
 Code for services in state acknowledged, bit flag.
const SERVICE_STATE_UNACKNOWLEDGED = 8
 Code for services not in state acknowledged, bit flag.
const SERVICE_CHECKS_DISABLED = 16
 Code for services with disabled checks, bit flag.
const SERVICE_CHECKS_ENABLED = 32
 Code for services with enabled checks, bit flag.
const SERVICE_EVENT_HANDLER_DISABLED = 64
 Code for services with no enabled event handler, bit flag.
const SERVICE_EVENT_HANDLER_ENABLED = 128
 Code for services with an enabled event handler, bit flag.
const SERVICE_FLAP_DETECTION_ENABLED = 256
 Code for services with enabled flap detection, bit flag FIXME: This is inverted from the host states.
const SERVICE_FLAP_DETECTION_DISABLED = 512
 Code for services with disabled flap detection, bit flag FIXME: This is inverted from the host states.
const SERVICE_IS_FLAPPING = 1024
 Code for services that are flapping, bit flag.
const SERVICE_IS_NOT_FLAPPING = 2048
 Code for services that are not flapping, bit flag.
const SERVICE_NOTIFICATIONS_DISABLED = 4096
 Code for services that has disabled notifications, bit flag.
const SERVICE_NOTIFICATIONS_ENABLED = 8192
 Code for services with enabled notifications, bit flag.
const SERVICE_PASSIVE_CHECKS_DISABLED = 16384
 Code for services with disabled passive checks, bit flag.
const SERVICE_PASSIVE_CHECKS_ENABLED = 32768
 Code for services with enabled passive checks, bit flag.
const SERVICE_PASSIVE_CHECK = 65536
 Code for services that were last checked by a passive check, bit flag.
const SERVICE_ACTIVE_CHECK = 131072
 Code for services that were last checked by an active check, bit flag.
const SERVICE_HARD_STATE = 262144
 Code for services in a hard state, bit flag.
const SERVICE_SOFT_STATE = 524288
 Code for services in a soft state, bit flag.
const STYLE_OVERVIEW = 0
 FIXME: don't know, unused?
const STYLE_DETAIL = 1
 FIXME: don't know, unused?
const STYLE_SUMMARY = 2
 FIXME: don't know, unused?
const STYLE_GRID = 3
 FIXME: don't know, unused?
const STYLE_HOST_DETAIL = 4
 FIXME: don't know, unused?
const HOST_CHECK_ACTIVE = 0
 Nagios performed the host check.
const HOST_CHECK_PASSIVE = 1
 the host check result was submitted by an external source
const SOFT_STATE = 0
 soft state
const HARD_STATE = 1
 hard state
const SORT_ASC = 'ASC'
 Code for when sorting ascending.
const SORT_DESC = 'DESC'
 Code for when sorting descending.
const CHECK_OPTION_NONE = 0
 Check was normal.
const CHECK_OPTION_FORCE_EXECUTION = 1
 Check was forced.
const CHECK_OPTION_FRESHNESS_CHECK = 2
 Check was a freshness check.
const CHECK_OPTION_ORPHAN_CHECK = 4
 Check was an orphan check.
const NOTIFICATION_ALL = 0
 all service and host notifications
const NOTIFICATION_SERVICE_ALL = 1
 all types of service notifications
const NOTIFICATION_HOST_ALL = 2
 all types of host notifications
const NOTIFICATION_SERVICE_RECOVERY = 0
 Service recovery notification.
const NOTIFICATION_SERVICE_WARNING = 1
 Service went warning notification.
const NOTIFICATION_SERVICE_UNKNOWN = 3
 Service went unknown notification.
const NOTIFICATION_SERVICE_CRITICAL = 2
 Service went critical notification.
const NOTIFICATION_HOST_RECOVERY = 0
 Host recovery notification.
const NOTIFICATION_HOST_DOWN = 1
 Host went down notification.
const NOTIFICATION_HOST_UNREACHABLE = 2
 Host went unreachable notification.
const NOTIFICATION_SERVICE_ACK = 2
 Service acknowledgement notification.
const NOTIFICATION_SERVICE_FLAP = 3
 Service flapping notification.
const NOTIFICATION_HOST_ACK = 2
 Host acknowledgement notification.
const NOTIFICATION_HOST_FLAP = 3
 Host flapping notification.
const FIND_HOST = 1
 FIXME: don't know, unused?
const FIND_CONTACT = 2
 FIXME: don't know, unused?
const FIND_SERVICE = 3
 FIXME: don't know, unused?
const MAX_QUERYNAME_LENGTH = 256
 FIXME: don't know, unused?
const HOST_NOTIFICATION = 0
 The notification was for a host.
const SERVICE_NOTIFICATION = 1
 The notification was for a service.

Detailed Description

Helper class for nagios status.


Member Function Documentation

static nagstat::preprocess_orm_object ( Object_Model object  )  [static]

Processes an ORM object into the stdObject format expected by nagstat::process_macros, due to other repositories still depending on the signature of process_macros.

Parameters:
$object Object_Model
Returns:
stdObject

If sequential, indexed, array we should not manipulate the property names.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 19 Dec 2018 for ninja by  doxygen 1.6.1