TABLE OF CONTENTS

STATUS OF THIS DOCUMENT

This document is a draft specification of message structure used in Seismometer monitoring toolbox.

VOCABULARY

MESSAGE STRUCTURE

Basic Structure

This is description of a basic message structure. There are shorthands available and some of them may not conform to this description (event.state, for example). See Structure Shorthands section for details.

The field event.vset is a container for value instances. Value instance has a name (key in event.vset hash) and one or more properties: numeric value, unit of measurement, type of the value, thresholds (low and/or high) and default state to be assumed for this event if no thresholds are exceeded.

Every field in event.vset has a name matching /^[a-zA-Z0-9_]+$/, and the content of such event.vset.<value_name> is a hash with following fields:

Example Message

Below are some examples of messages, formatted in YAML (it's a little more readable this way than JSON).

Simple message with single value

v: 3
time: 1376261660
location:
  host: web01.example.net
event:
  name: uptime
  vset:
    value:
      value: 3205629.35

Simple message carrying state

v: 3
time: 1376261660
location:
  cluster: MongoDB
  environment: devel
event:
  name: availability
  state:
    value: not_running
    severity: error

Simple message with vset and state

v: 3
time: 1376261660
location:
  host: web01.example.net
  mountpoint: /srv/www
event:
  name: disk space
  state:
    value: ok
  vset:
    used:
      value: 8733824
      unit: kB
    free:
      value: 12237696
      unit: kB

Verbose message with state and vset (including thresholds)

v: 3
time: 1376261660
location:
  host: web01.example.net
  service: apache
  site: Espoo
event:
  name: http transfer
  comment: value in norm
  state:
    value: ok
    severity: expected
  threshold_kept: ok
  interval: 300
  vset:
    volume:
      value: 768
      unit: kB/s
      type: accumulative
      threshold_high:
        - {name: warning,  value: 7168,  severity: warning}
        - {name: critical, value: 14336, severity: error}
    requests:
      value: 1536
      unit: req/s
      type: accumulative

TODO/FIXME

ABANDONED ELEMENTS

Structure Shorthands

There were shorthands in version 1 of this specification. Their intention was to make easier producing messages by hand. As it turned out, they introduced bigger costs in processing than they were saving.

Expected/attention states list

In v2 and v1 schemas event state carried list of expected states. It was simplified down to a single severity enum.