Page 2 of 2

Re: Nagios command line

Posted: Wed Mar 05, 2014 10:35 am
by tmcdonald
http://old.nagios.org/developerinfo/ext ... ndlist.php

I think that's what you are looking for.

Re: Nagios command line

Posted: Mon Mar 10, 2014 3:34 am
by reincarne
Yes and now. Because these commands that you provided me, can be executed from Linux only, I need it to be executed from Windows machine.
But, this site might help me as well, because on the top of each command it gives the command ID (which I have), the only problem is that I'm getting permissions error.
The funniest thing is that I'm able to disable a specific host, but cannot disable hostgroup. And I'm using admin user :)
I will try to test it this week.

Re: Nagios command line

Posted: Mon Mar 10, 2014 9:43 am
by tmcdonald
You should be able to do this from a PowerShell script.

And can you post your /usr/local/nagios/etc/nagios.cfg file for us?

Re: Nagios command line

Posted: Wed Mar 12, 2014 4:03 am
by reincarne
tmcdonald wrote:You should be able to do this from a PowerShell script.

And can you post your /usr/local/nagios/etc/nagios.cfg file for us?
The problem is with the part I marked below in the command:

curl -d "cmd_typ=63&cmd_mod=2&hostgroup=SOME NAME&btnSubmit=Commit" "http://HOSTNAME/nagios/cgi-bin/cmd.cgi" -u "USER"

The CMD type I can take from the website you provided, but the rest I'm using a different command which shows instructions for each of the CMD types.
Anyways, I figured out how to use it, you can close this topic :)

Thanks.