I need to set the schedule downtime for a specific nagios node from the command line using curl .. how to do this?
here is something that i'm already using to enable / disable service / host notification from the command line.
curl -d "some input here" url "user:pass"
Like I need to do what is needed for a simple schedule. Now the problem is that the downtime option has more options: start time, end time, comment, etc.
So how do I do this by curling from the command line?
curl -d " some key value pair(hostname,servicename" url "username:passowrd"
which will enable and disable the service / host notification from the command line. Therefore, I want to use curl in such a way as to provide downtime for a particular nagios server.
The above script does not work for it, because the nagios downtime revealed more parameters, and I tried to fill them in the script .. but it didn’t work. We need to provide start time, end time and comment value.
Plus I tried the curl parameter called --form and --form-string, with this script .. could not get through.
The crazy idea is that instead of going to the Nagios web interface, we want to do this from the command line (we have successfully completed the service / host service and notification).
I hope now I am absolutely clear.
TIA
Baskar
source
share