| description | Telegraf plugin for collecting metrics from Icinga2 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| menu |
|
||||||||
| tags |
|
||||||||
| introduced | v1.8.0 | ||||||||
| os_support | freebsd, linux, macos, solaris, windows |
This plugin gather services and hosts status information using the Icinga2 remote API.
Introduced in: Telegraf v1.8.0 Tags: network, server, system OS support: all
Plugins support additional global and plugin configuration settings for tasks such as modifying metrics, tags, and fields, creating aliases, and configuring plugin ordering. See CONFIGURATION.md for more details.
# Gather Icinga2 status
[[inputs.icinga2]]
## Required Icinga2 server address
# server = "https://localhost:5665"
## Collected Icinga2 objects ("services", "hosts")
## Specify at least one object to collect from /v1/objects endpoint.
# objects = ["services"]
## Collect metrics from /v1/status endpoint
## Choose from:
## "ApiListener", "CIB", "IdoMysqlConnection", "IdoPgsqlConnection"
# status = []
## Credentials for basic HTTP authentication
# username = "admin"
# password = "admin"
## Maximum time to receive response.
# response_timeout = "5s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = trueicinga2_hosts- tags
check_command- The short name of the check commanddisplay_name- The name of the hoststate- The state: UP/DOWNsource- The icinga2 hostport- The icinga2 portscheme- The icinga2 protocol (http/https)server- The server the check_command is running for
- fields
name(string)state_code(int)
- tags
icinga2_services- tags
check_command- The short name of the check commanddisplay_name- The name of the servicestate- The state: OK/WARNING/CRITICAL/UNKNOWN for servicessource- The icinga2 hostport- The icinga2 portscheme- The icinga2 protocol (http/https)server- The server the check_command is running for
- fields
name(string)state_code(int)
- tags
icinga2_status- component:
ApiListener- tags
componentname
- fields
api_num_conn_endpointsapi_num_endpointapi_num_http_clientsapi_num_json_rpc_anonymous_clientsapi_num_json_rpc_relay_queue_item_rateapi_num_json_rpc_relay_queue_itemsapi_num_json_rpc_sync_queue_item_rateapi_num_json_rpc_sync_queue_itemsapi_num_json_rpc_work_queue_item_rateapi_num_not_conn_endpoints
- tags
CIB- tags
componentname
- fields
active_host_checksactive_host_checks_15minactive_host_checks_1minactive_host_checks_5minactive_service_checksactive_service_checks_15minactive_service_checks_1minactive_service_checks_5minavg_execution_timeavg_latencycurrent_concurrent_checkscurrent_pending_callbacksmax_execution_timemax_latencymin_execution_timemin_latencynum_hosts_acknowledgednum_hosts_downnum_hosts_flappingnum_hosts_handlednum_hosts_in_downtimenum_hosts_pendingnum_hosts_problemnum_hosts_unreachablenum_hosts_upnum_services_acknowledgednum_services_criticalnum_services_flappingnum_services_handlednum_services_in_downtimenum_services_oknum_services_pendingnum_services_problemnum_services_unknownnum_services_unreachablenum_services_warningpassive_host_checkspassive_host_checks_15minpassive_host_checks_1minpassive_host_checks_5minpassive_service_checkspassive_service_checks_15minpassive_service_checks_1minpassive_service_checks_5minremote_check_queueuptime
- tags
IdoMysqlConnection- tags
componentname
- fields
mysql_queries_1minmysql_queries_5minsmysql_queries_15minsmysql_queries_ratemysql_query_queue_item_ratemysql_query_queue_items
- tags
IdoPgsqlConnection- tags
componentname
- fields
pgsql_queries_1minpgsql_queries_5minspgsql_queries_15minspgsql_queries_ratepgsql_query_queue_item_ratepgsql_query_queue_items
- tags
- component:
SELECT * FROM "icinga2_services" WHERE state_code = 0 AND time > now() - 24h // Service with OK status
SELECT * FROM "icinga2_services" WHERE state_code = 1 AND time > now() - 24h // Service with WARNING status
SELECT * FROM "icinga2_services" WHERE state_code = 2 AND time > now() - 24h // Service with CRITICAL status
SELECT * FROM "icinga2_services" WHERE state_code = 3 AND time > now() - 24h // Service with UNKNOWN statusicinga2_hosts,display_name=router-fr.eqx.fr,check_command=hostalive-custom,host=test-vm,source=localhost,port=5665,scheme=https,state=ok name="router-fr.eqx.fr",state=0 1492021603000000000