Nagios command line

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios command line

Post by tmcdonald »

http://old.nagios.org/developerinfo/ext ... ndlist.php

I think that's what you are looking for.
Former Nagios employee
reincarne
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Re: Nagios command line

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios command line

Post 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?
Former Nagios employee
reincarne
Posts: 146
Joined: Wed Jun 26, 2013 4:39 am

Re: Nagios command line

Post 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.
Locked