5.6.x config/import api failure/formatting question...
Posted: Thu May 02, 2019 1:10 pm
Can anyone explain why importing the config below via the config/import API fails?
The same config imports without error using the CCM Import Config wizard.
The same config imports without error using the CCM Import Config wizard.
Code: Select all
curl -XPOST "http://rdcengnag02.rdc.l/nagiosxi/api/v1/config/import/?apikey=MYAPIKEYISREALLYREALLYLONG&pretty=1&overwrite=1" -d '
define host {
host_name XTEST rdctsthst05 172.16.0.5 dc-natest lnx-t
use a-x--xtest-integration-testing
display_name testhost.natest.l
address 172.16.0.5
hostgroups +ALL Servers - Windows,Test Servers [T ---tsthst--]
active_checks_enabled 0
passive_checks_enabled 1
contacts testing.contact
contact_groups x-blackhole-devnull-grp
notification_period 24x7
notification_options d,u,r,f,s,
notifications_enabled 1
stalking_options o,d,u,
_WORKER hostgroup_WORKERQ-RDC
register 1
} '
{
"error": "Import failed. Configuration passed may not be formatted properly."
}