To recreate, here's the Help curl commands simply lumped together for 4 services:
Code: Select all
curl -sS -XDELETE "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1&host_name=testapihost&service_description=PING&applyconfig=1"
curl -sS -XPOST "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1" -d "host_name=testapihost&service_description=PING&check_command=check_ping\!3000,80%\!5000,100%&check_interval=5&retry_interval=5&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1"
curl -sS -XDELETE "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1&host_name=testapihost&service_description=PING2&applyconfig=1"
curl -sS -XPOST "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1" -d "host_name=testapihost&service_description=PING2&check_command=check_ping\!3000,80%\!5000,100%&check_interval=5&retry_interval=5&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1"
curl -sS -XDELETE "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1&host_name=testapihost&service_description=PING3&applyconfig=1"
curl -sS -XPOST "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1" -d "host_name=testapihost&service_description=PING3&check_command=check_ping\!3000,80%\!5000,100%&check_interval=5&retry_interval=5&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1"
curl -sS -XDELETE "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1&host_name=testapihost&service_description=PING4&applyconfig=1"
curl -sS -XPOST "https://nagios.domain.name/nagiosxi/api/v1/config/service?apiKey=<redacted>&pretty=1" -d "host_name=testapihost&service_description=PING4&check_command=check_ping\!3000,80%\!5000,100%&check_interval=5&retry_interval=5&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7&applyconfig=1"Note that this also happens if I defer applying the config until the end of all processing.
Finally, we are running Nagios XI 5.4.11.