z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Host not showing up using API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.

Host not showing up using API

Postby zipart » Sat Jan 28, 2023 7:43 pm

Hello,

I'm trying to add host through the API, the response message is correct but it doesn't seem to be created on NagiosXI

Version : 5.7.5

Step :

curl -XPOST "http://nagiosxiproduction/nagiosxi/api/v1/config/host?apikey=APIKEY&pretty=1" -d "host_name=testapihost&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&applyconfig=1"

response: "success": "Added testapihost to the system. Config applied, Nagios Core was restarted."

But when i search the host"testapihost" in nagiosXI, it doesn't exist, and the system wasnt restarted.

I've tested the same step on a NagiosXI lab without any configuration, version 5.9.2 and it worked.

Thanks in advance for your help.
zipart
 
Posts: 1
Joined: Sat Jan 28, 2023 7:31 pm

Re: Host not showing up using API

Postby sigmainformatique » Thu Feb 02, 2023 11:45 am

Hello
We have the same issue with the same version
sigmainformatique
 
Posts: 75
Joined: Mon Apr 23, 2018 8:11 am

Re: Host not showing up using API

Postby kg2857 » Thu Feb 02, 2023 11:55 am

Chances are the feature has problems in that version. The simple solution is to upgrade to the latest XI.
Think about searching the internet about your question. It will give you a million possibilities in the blink of an eye.
kg2857
 
Posts: 93
Joined: Thu Jan 26, 2023 8:47 pm


Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 26 guests