Icinga 2¶
The Icinga 2 Collector subscribes to the Icinga 2 API event streams, generates Tornado Events from the Icinga 2 Events, and publishes them on the Tornado Engine TCP address.
The Icinga 2 Collector executable is built on actix.
On startup, it connects to an existing Icinga 2 Server API and subscribes to user defined Event Streams.
The streams in /neteye/shared/tornado_icinga2_collector/conf/streams/
are
to be configured as JSON files.
More than one stream subscription can be defined. For each stream, you must provide two values in order to successfully create a subscription:
stream: the stream configuration composed of:
types: An array of Icinga 2 Event types;
queue: A unique queue name used by Icinga 2 to identify the stream;
filter: An optional Event Stream filter. Additional information about the filter can be found in the official documentation.
collector_config: The transformation logic that converts an Icinga 2 Event into a Tornado Event.
For all Icinga 2 events
{
"stream": {
"types": ["CheckResult",
"StateChange",
"Notification",
"AcknowledgementSet",
"AcknowledgementCleared",
"CommentAdded",
"CommentRemoved",
"DowntimeAdded",
"DowntimeRemoved",
"DowntimeStarted",
"DowntimeTriggered"],
"queue": "icinga2_AllEvents_all"
},
"collector_config": {
"event_type": "icinga2_AllEvents_all",
"payload": {
"response": "${@}"
}
}
}
For check result events
{
"stream": {
"types": ["CheckResult"],
"queue": "icinga2_CheckResult_all"
},
"collector_config": {
"event_type": "icinga2_CheckResult_all",
"payload": {
"response": "${@}"
}
}
}
For notification events
{
"stream": {
"types": ["Notification"],
"queue": "icinga2_Notification_all"
},
"collector_config": {
"event_type": "icinga2_Notification_all",
"payload": {
"response": "${@}"
}
}
}
For statechange events
{
"stream": {
"types": ["StateChange"],
"queue": "icinga2_StateChange_all"
},
"collector_config": {
"event_type": "icinga2_StateChange_all",
"payload": {
"response": "${@}"
}
}
}
Note
Based on the Icinga 2 Event Streams documentation, multiple HTTP clients can use the same queue name as long as they use the same event types and filter.