This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
[dev.icinga.com #9240] invalid JSON for flapping threshold configuration #1553
Labels
Milestone
This issue has been migrated from Redmine: https://dev.icinga.com/issues/9240
Created by leo9641 on 2015-05-07 12:53:09 +00:00
Assignee: ricardo
Status: Resolved (closed on 2015-05-08 10:55:04 +00:00)
Target Version: 1.13.3
Last Update: 2015-05-08 10:55:04 +00:00 (in Redmine)
Hi!
I use threshold options:
define host{
use generic-router
host_name hk.gw-1
address hk.gw-1
hostgroups gw_adm
parents icinga
high_flap_threshold 35.0
low_flap_threshold 5.0
contact_groups gw_adm,all_adm
}
Export this configuration in JSON (/cgi-bin/config.cgi?type=hosts&item_name=hk.gw-1&jsonoutput)
{
cgi_json_version "1.11.0",
icinga_status {
status_data_age 0,
status_update_interval 10,
reading_status_data_ok true,
program_version "1.13.0",
icinga_pid 50460,
timezone "MSK",
date_format "euro",
program_start 1430387943,
total_running_time "7d 1h 1m 59s",
last_external_command_check 1430996460,
last_log_file_rotation 1430600400,
notifications_enabled true,
disable_notifications_expire_time 0,
service_checks_being_executed true,
passive_service_checks_being_accepted true,
host_checks_being_executed true,
passive_host_checks_being_accepted true,
obsessing_over_services false,
obsessing_over_hosts false,
check_service_freshness true,
check_host_freshness false,
event_handlers_enabled true,
flap_detection_enabled true,
performance_data_being_processed false
},
config {
hosts [
{
host_name "hk.gw-1",
alias "hk.gw-1",
host_display_name "hk.gw-1",
address "hk.gw-1",
address6 "hk.gw-1",
parent_hosts [
{
host_name "icinga"
}
],
max_check_attempts 5,
check_interval "0h 2m 0s",
retry_interval "0h 1m 0s",
host_check_command "check-host-alive-extadm",
check_period "24x7",
obsess_over true,
enable_active_checks true,
enable_passive_checks true,
check_freshness false,
freshness_threshold "auto-determined value",
default_contacts_default_groups [
{
contactgroup_name "all_adm"
},
{
contactgroup_name "gw_adm"
}
],
notification_interval "1h 0m 0s",
first_notification_delay "0h 0m 0s",
notification_options [
"Down",
"Recovery",
"Flapping"
],
notification_period "24x7",
event_handler null,
enable_event_handler true,
stalking_options [
],
enable_flap_detection true,
low_flap_threshold 5%,
high_flap_threshold 35%,
flap_detection_options [
"Up",
"Down",
"Unreachable"
],
process_performance_data true,
enable_failure_prediction true,
failure_prediction_options null,
notes null,
notes_url null,
action_url null,
2d_coords null,
3d_coords null,
statusmap_image "router.png",
vrml_image null,
icon_image null,
icon_image_alt null,
retention_options [
"Status Information",
"Non-Status Information"
]
}
]
}
}
Validation result from http://jsonlint.com/
Parse error on line 74:
...w_flap_threshold": 5%, "
-----------------------^
Expecting '}', ',', ']'
To quote a value into flap_threshold or remove sign % resolve this trouble.
Changesets
2015-05-07 19:51:37 +00:00 by ricardo ce25248
2015-05-08 10:53:57 +00:00 by ricardo e96037c
The text was updated successfully, but these errors were encountered: