Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a curl script which will do the service/host notification disable/enable from the command line through curl.

But need to do that for scheduled downtime.

Can someone suggest me.

Okay it seems people failed to understand my requirement.Let's clarify few thing. I have script already with me.. which look like something like below:

curl -d " some key value pair(hostname,servicename" url "username:passowrd"

which will do the service/host notification on and off from the commandline. So I want use curl in this fashion to provide downtime for specific nagios server.

Above script is not working for it because downtime option of nagios taked more parameter and I tried to infuse those in the script..but it didn't work out that way.We need provide starttime,endtime and comment value too.

Plus I have tried curl's option called --form and --form-string with that script..not able to get through.

The besic idea is instead of going to the Nagios web interface, we want to done this thing from the command line(we have succeded for service/host service and notification).

Hope I am absolutely clear now.

share|improve this question

1 Answer 1

You can schedule a task through cron provided you use a Linux OS.

The man cron and man crontab will help you figure out how this work. (And many, many tutorial on the internet).

share|improve this answer
    
Mvy you grossly misunderstood my question..or might not have the knowledge to answer it.. –  unixbhaskar Jul 27 '11 at 14:23
    
My bad, I did not understand it that way indeed. –  M'vy Jul 27 '11 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.