Check command runs on command line but not in Nagios
Posted: Wed Nov 28, 2018 4:34 pm
I am trying to run check_curl_http to check the status of my CouchBase servers. I am using the command line:
This runs on the command line on my Nagios server when run by Nagios user.
It also runs when I test it in the "Run Check Command" button in Nagios XI GUI.
But it gives an error when it runs automatically or when I force an immediate check using the GUI.
Critical String "status":"Ready","bucket":"cdr","index":"cdr_active_calls-2_401"$ not found!
I have never had a command work using "Run Check Command" and still not work when run automatically. The "Run Check Command" box runs your check exactly as the Nagios server will run it, or I thought it did anyway.
If anyone has suggestions or an answer for me, please let me know.
Thanks
Todd
Code: Select all
/usr/local/nagios/libexec/check_curl_http -U http://<couchbase>:8091/indexStatus -a 'user':'password' -F -G "\"status\":\"Ready\",\"bucket\":\"cdr\",\"index\":\"cdr_active_calls-2_401\""Code: Select all
[root@nagios-03]# su nagios
[nagios@nagios-03]$ /usr/local/nagios/libexec/check_curl_http -U http://<couchbase>:8091/indexStatus -a 'user':'password' -F -G "\"status\":\"Ready\",\"bucket\":\"cdr\",\"index\":\"cdr_active_calls-2_401\""
Page OK: HTTP Status Code 200 - 46126 bytes in 0.292478 seconds |time=0.293 size=46126But it gives an error when it runs automatically or when I force an immediate check using the GUI.
Critical String "status":"Ready","bucket":"cdr","index":"cdr_active_calls-2_401"$ not found!
I have never had a command work using "Run Check Command" and still not work when run automatically. The "Run Check Command" box runs your check exactly as the Nagios server will run it, or I thought it did anyway.
If anyone has suggestions or an answer for me, please let me know.
Thanks
Todd