This repository was archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Message
Eiren Rain edited this page Jan 5, 2019
·
4 revisions
Message data contains single update of status of any entity - host or service.
| 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) |
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
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() |
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 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 can be one of the following:
intfloat-
percent- same asfloat, but displayed in percents string-
log- displayed as multi-line text log, appendable ifcumulativeis true -
message- displayed as text message for user that can be dismissed
Structure of data field of messages with message type serviceStatus:
| Field | Field Type | Required | Description |
|---|---|---|---|
| status | enum string | yes | Current service status |
status can be one of:
stoppedrunningerror
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 can be one of (from lowest to highest):
-
debug- disabled by default in dashboard -
notice- disabled by default in dashboard infowarningsevere-
fire- will pass all notification filters, service should be approved to send fire messages in host config or this priority will be reduced tosevere
level can be one of the following (from lowest to highest):
lownormalhigh