You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a wrapper to run schedule downtime from the client-side. It used to work sometime back (scheduling downtime on nagios server) but at the moment it does not. The wrapper executes the command successfully from the client side as follows:
XXXXXX@XXXXXX:/$ sudo python nagios.py -host XXXXXXXX -D 61 -v Nagios server='NAGIOS_SERVER' found for datacenter='XXX' NAGIOS_HOST - Making HTTP POST request to url='http://NAGIOS_SERVER:NAGIOS_API_PORT/schedule_downtime' with payload='{'duration': 61, 'comment': None, 'host': 'XXXXXXXX', 'author': 'root', 'services_too': True}', headers='{'content-type': 'application/json'}', retries='Retry(total=3, connect=None, read=None, redirect=None)' CLIENT_HOST - Completed successfully HTTP POST call with return status='200' and resp length=77 bytes Nagios downtime_notification completed on host=XXXXXXXX for duration=61 seconds in time=0 secs
I did run it from command line and this is the output curl -d '{"host": "XXXXXXXX", "duration": 61}' -H 'Content-Type: application/json' http://NAGIOS_SERVER:NAGIOS_API_PORT/schedule_downtime {"content": "External commands not enabled on nagios-api.", "success": false}
May be I m missing something, can you please help figure what could be the issue
Appreciate your prompt reply soon
Thanks
The text was updated successfully, but these errors were encountered:
This error means you're not passing in the -c flag to point a Nagios external command file. Without this flag, the Nagios API service doesn't know how to submit commands to Nagios.
Hello Folks,
I have written a wrapper to run schedule downtime from the client-side. It used to work sometime back (scheduling downtime on nagios server) but at the moment it does not. The wrapper executes the command successfully from the client side as follows:
XXXXXX@XXXXXX:/$ sudo python nagios.py -host XXXXXXXX -D 61 -v Nagios server='NAGIOS_SERVER' found for datacenter='XXX' NAGIOS_HOST - Making HTTP POST request to url='http://NAGIOS_SERVER:NAGIOS_API_PORT/schedule_downtime' with payload='{'duration': 61, 'comment': None, 'host': 'XXXXXXXX', 'author': 'root', 'services_too': True}', headers='{'content-type': 'application/json'}', retries='Retry(total=3, connect=None, read=None, redirect=None)' CLIENT_HOST - Completed successfully HTTP POST call with return status='200' and resp length=77 bytes Nagios downtime_notification completed on host=XXXXXXXX for duration=61 seconds in time=0 secs
I did run it from command line and this is the output
curl -d '{"host": "XXXXXXXX", "duration": 61}' -H 'Content-Type: application/json' http://NAGIOS_SERVER:NAGIOS_API_PORT/schedule_downtime {"content": "External commands not enabled on nagios-api.", "success": false}
May be I m missing something, can you please help figure what could be the issue
Appreciate your prompt reply soon
Thanks
The text was updated successfully, but these errors were encountered: