Icinga2 输入插件
此插件使用 Icinga2 远程 API 收集服务和主机状态信息。
引入于: Telegraf v1.8.0 标签: network, server, system 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Gather Icinga2 status
[[inputs.icinga2]]
## Required Icinga2 server address
# server = "https://: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 = trueMetrics
icinga2_hosts- 标签 (tags)
check_command- 检查命令的短名称display_name- 主机的名称state- 状态: UP/DOWNsource- icinga2 主机port- icinga2 端口scheme- icinga2 协议 (http/https)server- check_command 正在运行的服务器
- 字段 (fields)
name(string)state_code(int)
- 标签 (tags)
icinga2_services- 标签 (tags)
check_command- 检查命令的短名称display_name- 服务的名称state- 状态: OK/WARNING/CRITICAL/UNKNOWN (用于服务)source- icinga2 主机port- icinga2 端口scheme- icinga2 协议 (http/https)server- check_command 正在运行的服务器
- 字段 (fields)
name(string)state_code(int)
- 标签 (tags)
icinga2_status- component
ApiListener- 标签 (tags)
component名称
- 字段 (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)
component名称
- 字段 (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)
component名称
- 字段 (fields)
mysql_queries_1minmysql_queries_5minsmysql_queries_15minsmysql_queries_ratemysql_query_queue_item_ratemysql_query_queue_items
- 标签 (tags)
IdoPgsqlConnection- 标签 (tags)
component名称
- 字段 (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 status示例输出
icinga2_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此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。