Hi - I thought I'd quickly monitor the nagios server stats (load, io,etc) using the Monitor Remote Nagios Server config wizard.
All the commands that use an API are returning "Error: Could not parse JSON from http://nagios-server ()
I've tried it with a different admin user API key but no difference.
I tried running a curl command from the command line with one of the API keys and that returned the expected information.
So I know that the API works, just not the command used by the config wizard which is check_nagiosxiserver.php
I also created another host using the localhost details and it also returns the same error.
I'm running Nagios XI 2026R1 on Oracle Linux 9
Problem monitoring Nagios server stats from API
Re: Problem monitoring Nagios server stats from API
Hello @fkroeger,
When using the Nagios XI Server wizard, one must enter the full URL, including the full path. When testing, I was able to replicate your issue by not including the full path. In the URL input, I used http://<nagios-server> instead of http://<nagios-server>/nagiosxi and I saw the exact same errors. Double check if $ARG1$ in the service checks includes something like --url='http://<nagios-server>/nagiosxi/'.
Let me know if this fixes the error; otherwise I'll keep digging.
- Emmett
When using the Nagios XI Server wizard, one must enter the full URL, including the full path. When testing, I was able to replicate your issue by not including the full path. In the URL input, I used http://<nagios-server> instead of http://<nagios-server>/nagiosxi and I saw the exact same errors. Double check if $ARG1$ in the service checks includes something like --url='http://<nagios-server>/nagiosxi/'.
Let me know if this fixes the error; otherwise I'll keep digging.
- Emmett