We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[[inputs.icinga2]] ## Required Icinga2 server address (default: "https://localhost:5665") server = "https://localhost:5665" ## Required Icinga2 object type ("services" or "hosts, default "services") object_type = "services" ## Credentials for basic HTTP authentication username = "root" password = "abc123" ## 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 = true
telegraf-1.11.4-1.x86_64
CentOS Linux release 7.6.1810 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.6.1810 (Core) CentOS Linux release 7.6.1810 (Core) icinga2-bin-2.10.5-1.el7.icinga.x86_64 icinga2-common-2.10.5-1.el7.icinga.x86_64 icinga2-selinux-2.10.5-1.el7.icinga.x86_64 vim-icinga2-2.10.5-1.el7.icinga.x86_64 icinga2-ido-pgsql-2.10.5-1.el7.icinga.x86_64 icinga2-2.10.5-1.el7.icinga.x86_64
telegraf should scrape the correct state status and update the metrics
state is always ok even after refreshing the metrics page
Metrics
icinga2_services_state_code{check_command="check_app",display_name="check_app",host="localhost",name="check_app",port="5665",scheme="https",source="localhost",state="ok"} 0
Icinga2 API
{ "results": [{ "attrs": { "__name": "appserver.net!check_app", "acknowledgement": 0.0, "acknowledgement_expiry": 0.0, "action_url": "", "active": true, "check_attempt": 1.0, "check_command": "check_app", "check_interval": 300.0, "check_period": "", "check_timeout": null, "command_endpoint": "", "display_name": "check_app", "downtime_depth": 0.0, "enable_active_checks": true, "enable_event_handler": true, "enable_flapping": false, "enable_notifications": true, "enable_passive_checks": true, "enable_perfdata": true, "event_command": "", "flapping": false, "flapping_current": 0.0, "flapping_last_change": 0.0, "flapping_threshold": 0.0, "flapping_threshold_high": 30.0, "flapping_threshold_low": 25.0, "force_next_check": false, "force_next_notification": false, "groups": [], "ha_mode": 0.0, "host_name": "appserver", "icon_image": "", "icon_image_alt": "", "last_check": 1567093474.6973659992, "last_check_result": { "active": true, "check_source": "icinga2server", "command": ["/usr/local/nagios/libexec/check_nrpe", "-H", "appserver", "-c", "check_app"], "execution_end": 1567093474.6972908974, "execution_start": 1567093474.6051809788, "exit_status": 2.0, "output": "CRITICAL names", "performance_data": [], "schedule_end": 1567093474.6973659992, "schedule_start": 1567093474.0, "state": 2.0, "ttl": 0.0, "type": "CheckResult", "vars_after": { "attempt": 1.0, "reachable": true, "state": 2.0, "state_type": 1.0 }, "vars_before": { "attempt": 1.0, "reachable": true, "state": 2.0, "state_type": 1.0 } }, "last_hard_state": 2.0, "last_hard_state_change": 1566932503.3587920666, "last_reachable": true, "last_state": 2.0, "last_state_change": 1566932444.5251150131, "last_state_critical": 1567093474.6973869801, "last_state_ok": 0.0, "last_state_type": 1.0, "last_state_unknown": 0.0, "last_state_unreachable": 0.0, "last_state_warning": 0.0, "max_check_attempts": 3.0, "name": "check_app", "next_check": 1567093765.1474039555, "notes": "", "notes_url": "", "original_attributes": null, "package": "director", "paused": false, "retry_interval": 60.0, "severity": 136.0, "source_location": { "first_column": 1.0, "first_line": 73.0, "last_column": 36.0, "last_line": 73.0, "path": "/var/lib/icinga2/api/packages/director/dbd32fc1-9080-41eb-909b-514a56d190c8/zones.d/master/services.conf" }, "state": 2.0, "state_type": 1.0, "templates": ["check_app", "check_app"], "type": "Service", "vars": null, "version": 0.0, "volatile": false, "zone": "master" }, "joins": {}, "meta": {}, "name": "appserver!check_app", "type": "Service" }] }
The text was updated successfully, but these errors were encountered:
danielnelson
Successfully merging a pull request may close this issue.
Relevant telegraf.conf:
System info:
telegraf-1.11.4-1.x86_64
Steps to reproduce:
https://localhost:5665/v1/objects/services?filter=service.state!=ServiceOK
http://localhost:9126/metrics
Expected behavior:
telegraf should scrape the correct state status and update the metrics
Actual behavior:
state is always ok even after refreshing the metrics page
Additional info:
Metrics
Icinga2 API
The text was updated successfully, but these errors were encountered: