forked from capensis/canopsis
-
Notifications
You must be signed in to change notification settings - Fork 0
Event specification
David Delassus edited this page Dec 6, 2013
·
5 revisions
Vhost: canopsis
Routing key: <connector>.<connector_name>.<event_type>.<source_type>.<component>[.<resource>]
Exchange: canopsis.events
Exchange Options: type: "topic", durable: true, auto_delete: false
Content Type: "application/json"
{
'_id': (reserved) MongoDB
'event_id': (reserved) Original in alerts exchange
'connector': Connector type (gelf, nagios, snmp, ...),
'connector_name': Connector name (nagios1, nagios2 ...),
'event_type': Event type (check, log, trap, ...),
'source_type': Source type ('component' or 'resource'),
'component': Component name,
'resource': Ressource name,
'timestamp': UNIX seconds timestamp (UTC),
'state': State (0 (Ok), 1 (Warning), 2 (Critical), 3 (Unknown)),
'state_type': State type (O (Soft), 1 (Hard)),
'scheduled': (optional) True if this is a scheduled event
'last_state_change': (reserved) Last timestamp after state change,
'previous_state': (reserved) Previous state (after change),
'output': Event message,
'long_output': Event long message,
'tags': Event Tags (default: []),
'display_name': The name to display (customization purpose)
}
'perf_data': Performance data ("Nagios format":http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201)
or
'perf_data_array': Array of performance data with metric's type ('GAUGE', 'DERIVE', 'COUNTER', 'ABSOLUTE'), Ex:
[
{'metric': 'shortterm', 'value': 0.25, 'unit': None, 'min': None, 'max': None, 'warn': None, 'crit': None, 'type': 'GAUGE' },
{'metric': 'midterm', 'value': 0.16, 'unit': None, 'min': None, 'max': None, 'warn': None, 'crit': None, 'type': 'GAUGE' },
{'metric': 'longterm', 'value': 0.12, 'unit': None, 'min': None, 'max': None, 'warn': None, 'crit': None, 'type': 'GAUGE' }
]
- check: Result of control
- comment: Result's Comment
- trap: SNMP Trap
- log: Log
- user: User input
- selector: Selector result
- sla: Sla result
- eue: EUE result
'connector': 'nagios'
'event_type': 'check', 'ack', 'notification', 'downtime'
'check_type': ,
'current_attempt': ,
'max_attempts': ,
'execution_time': ,
'latency': ,
'command_name': ,
'address': ,
'connector': 'gelf'
'event_type': 'log'
'level': Log level
'facility': Log facility
'connector': 'snmp'
'event_type': 'trap'
'snmp_severity':
'snmp_state':
'snmp_oid':
'address':
'connector': 'shinken'
'event_type': 'check', 'ack', 'notification', 'downtime'
'connector': 'cucumber'
'component': nom_application
'event_type': eue
'connector_name': nom_robot
'source_type': resource
Pour la pile eue, trois types de messages seront publiés:
- Concernant la feature
- Concernant le scenario
- Concernant la step
En fonction du type message le nom de la ressource sera:
- Pour la feature :
'resource': nom_feature
- Pour le scenario:
'resource': nom_feature.nom_scenario.localization.OS.browser
- Pour la step :
'resource': nom_feature.nom_scenario.nom_step.localization.OS.browser
'type_message' : ( feature, scenario, step)
'description': description globale (propre a la fonctionnalité)
'media_bin' : contenu binaire du fichier encode en base64
'media_type': mime type
'media_name': nom_media
'child': routing_key_feature
'cntxt_env' : (prod / test)
'cntxt_os': type de l'os
'cntxt_browser': nom navigateur,
'cntxt_localization': localisation du robot qui joue le scenario
'media_bin': contenu binaire du fichier encode en base64
'media_type': mime type
'media_name': nom_media
'child': 'routing_key_scenario'
'media_bin': contenu_binaire du fichier encode en base64
'media_type': mime type
'media_name': nom_media
'event_type': 'calendar'
'connector': Nom de la source
'ressource': UID de l'évènement
'start': timestamp du début de l'évènement
'end': timestamp de la fin de l'évènement
'all_day' : (True/False)
'output' : Titre de l'évènement