Skip to content

Using HTTP

Before starting

The first step is to open a SNOW Request providing these details:

  • which alarms you wish to send and if possible an example
  • the expected daily data volume and data rate
  • how you plan to access your alarms: Grafana, SNOW, HDFS, Kafka

We expect your data to be represented as a valid JSON object including the following fields:

  • (mandatory) timestamp: the timestamp of the alarm (check #1 below)
  • (mandatory) source: the name of your dataset/producer
  • (mandatory) alarm_name: the name of the alarm
  • (mandatory) entities: the entity being alarmed, such as hosts, services, etc
  • (mandatory) status: the alarm state, possible values: OK, WARNING, FAILURE (check #2 below)
  • (optional) metric: the name of the metric that generated the alarm
  • (optional) summary: a short summary of the alarm; if provided it is used as the email/ticket subject
  • (optional) description: a more verbose description of the alarm
  • (optional) correlation: the condition that was met to generate the alarm
  • (optional) troubleshooting: A link providing troubleshooting details
  • (optional) targets: An array with information about where to send the alarm, possible values: snow, email and sms e.g: ["snow"]
  • (optional) snow/service_element: the SNOW SE of the incident
  • (optional) snow/functional_element: the SNOW FE of the incident
  • (optional) snow/assignment_level: the SNOW assignment level of the incident (as an int)
  • (optional) snow/grouping: (deprecated, use hostgroup_grouping) if the incident should be grouped by hostgroup
  • (optional) snow/hostgroup_grouping: if the incident should be grouped by hostgroup
  • (optional) snow/auto_closing: if grouping is disabled, OK alerts automatically close tickets
  • (optional) snow/notification_type: the alarm type, possible values: app (default), hw, os
  • (optional) snow/watchlist: String representing a comma separated list of emails that will form the watchlist of the SNOW incident e.g: "email1,email2,..."
  • (optional) email/to: the recipient(s) of the email
  • (optional) email/cc: the address(es) to include as CC
  • (optional) email/bcc: the address(es) to include as BCC
  • (optional) email/reply_to: the email to reply to
  • (optional) email/send_ok: if enabled, emails will be sent upon receiving OK alarms; defaults to false
  • (optional) sms/to: the recipient of the text message in international format (restrained to CERN numbers, i.e. +4175411xxxx)
  • (optional) sms/send_ok: if enabled, text messages will be sent upon receiving OK alarms; defaults to false

Here there is an example body:

{
  "source": "<your producer>",
  "summary": "A very bad alarm cause I fired it",
  "description": "I had to put something here so it's clearer",
  "snow": {
    "service_element": "TargetSE",
    "functional_element": "TargetFE",
    "assignment_level": 2
  },
  "email": {
    "to": "email@cern.ch"    
  },
  "timestamp": 1606830359,
  "troubleshooting": "<some_url>",
  "targets": [
    "snow", "email"
  ],
  "status": "FAILURE",
  "entities": "hostname000.cern.ch",
  "alarm_name": "bad_alarm"
}

Please pay attention to the following:

  1. All timestamps must be in UTC milliseconds or seconds, without any subdecimal part
  2. FAILURE status can also be send with CRITICAL or ERROR and will be converted to FAILURE
  3. Use double quotes and not single quote (not valid in JSON)
  4. Anything that is considered metadata for the infrastructure will be promoted to the metadata field in the produced JSON, and the rest will be put inside data

Sending data

Send your alarms to the HTTP endpoint listening in http://monit-alarms.cern.ch:10011.

The alarm must be a JSON document with the fields above. When possible please send multiple documents in the same batch grouping them in a JSON array. Once the producer is ready, please let us know you are sending data so we enable your producer.