Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Message

Eiren Rain edited this page Jan 5, 2019 · 4 revisions

Message data contains single update of status of any entity - host or service.

General structure

Field Field Type Required Description
type enum string yes Type of message
timestamp long yes UNIX time in seconds when message was generated or event occurred
service string no For service-related messages contains host-generated host-unique ID of the service
data object yes Message data, depends on message type (see below)

Message types

Currently supported message types:

  • hostHealth - contains information about current host's health, load, status, etc
  • serviceInfo - contains semi-static information about one of the services running on the host
  • serviceStatus - contains information about current global service status
  • serviceUpdate - contains updates from one of the services running on the host

Message data structures

Host Health

Structure of data field of messages with message type hostHealth:

Field Field Type Required Description
mem object No Result of systeminformation.mem()
load object No Result of systeminformation.currentLoad()

Service Info

Structure of data field of messages with message type serviceInfo:

Field Field Type Required Description
name string yes Service name
fields array of objects yes Fields trackable for this service

Fields

fields contains of one or more fields for dashboard to display about this service. Each field has following structure:

Field Field Type Required Description
name string yes Internal (machine-readable) name of the field
description string yes Name of the field that will be displayed to user
type enum string yes Type of the field
cumulative boolean yes Indicates if feild's data should be accumulated for displaying, like graph or log

Type

type can be one of the following:

  • int
  • float
  • percent - same as float, but displayed in percents
  • string
  • log - displayed as multi-line text log, appendable if cumulative is true
  • message - displayed as text message for user that can be dismissed

Service Status

Structure of data field of messages with message type serviceStatus:

Field Field Type Required Description
status enum string yes Current service status

Status

status can be one of:

  • stopped
  • running
  • error

Service Update

Structure of data field of messages with message type serviceUpdate:

Field Field Type Required Description
name string yes Name of the field to update from fields registered in serviceInfo
value depends on type of the field yes Current value of the field
level enum string no Error level of the field (default is low)
priority enum string no For prioritized messages, messages with top priority will be displayed first

Priority

priority can be one of (from lowest to highest):

  • debug - disabled by default in dashboard
  • notice - disabled by default in dashboard
  • info
  • warning
  • severe
  • fire - will pass all notification filters, service should be approved to send fire messages in host config or this priority will be reduced to severe

Level

level can be one of the following (from lowest to highest):

  • low
  • normal
  • high