Integration with Elasticsearch¶
Icinga comes with a list of pre-configured modules to get started. These include the basic features for Icinga to function, like the api, checker, mainlog and notification. Furthermore we also ship some activated features, in specific the livestatus, influxdb and icingadb. As a special feature that will only be pre-configured, but not automatically enabled, we have the neteye_otlpmetricswriter.
NetEye OTLPMetrics Writer¶
The neteye_otlpmetricswriter feature comes pre-configured with the elastic-stack module and provides the recommended way to send Icinga 2 performance data to Elasticsearch through the NetEye OpenTelemetry pipeline.
This feature configures the upstream OTLP Metrics Writer so that metric payloads are forwarded to the NetEye Cross-Tenant OpenTelemetry Collector and then stored in Elasticsearch datastreams.
Once activated, the writer publishes check performance data to datastreams named in the format
metrics-generic.otel-<neteye_tenant>. These datastreams use the component template
metrics-otel@custom, which allows additional optimizations such as lifecycle management.
To enable the feature run the following commands on the node that owns icinga2-master:
master# icinga2-master feature enable neteye_otlpmetricswriter
master# systemctl restart icinga2-master
Note
You might want to disable the influxdb feature if you have enabled the neteye_datastreamwriter feature, as you are having the performance data duplicated otherwise, wasting disk space.
NetEye DatastreamWriter¶
Warning
The neteye_datastreamwriter feature is deprecated and will be removed in a future release. Use NetEye OTLPMetrics Writer instead.
The neteye_datastreamwriter feature comes pre-configured with the elastic-stack module and was used as an alternative data sink for the influxdb writer to send metric data to Elasticsearch. The feature ships the required Elasticsearch permissions and configures the writer with the appropriate client certificate credentials.
Once activated, the feature will write the performance data of all checks out to Elasticsearch Datastreams. Each Datastream has a name in the format metrics-icinga2.<check>-<neteye_tenant> which includes the component template metrics-icinga2@custom for further optimizations, such as setting a lifecycle policy.
The writer also allows you to further customize the behavior, like adding custom tags and labels or
filtering events out before sending them to Elasticsearch. To add additional information, please
take a look at the config file. /neteye/shared/icinga2/conf/icinga2/features-available/neteye_datastreamwriter.conf
Every available option that’s open to you is documented there until the feature with the official
documentation is released to the general public by Icinga2
To enable the feature run the following commands on the node that owns icinga2-master:
master# icinga2-master feature enable neteye_datastreamwriter
master# systemctl restart icinga2-master
Note
You might want to disable the influxdb feature if you have enabled the neteye_datastreamwriter feature, as you are having the performance data duplicated otherwise, wasting disk space.