Page 1 of 1

How to add a new service on a host in command line

Posted: Thu Dec 06, 2012 11:49 am
by srikanth.kallu
Hi,

On my AIX server i have a new file system and want to add that to nagios alerts i know i run the monitoring wizard once again with that file system.

Is there any way to do it through the command line.

Thanks.

Re: How to add a new service on a host in command line

Posted: Thu Dec 06, 2012 11:58 am
by sreinhardt
You should be able to do this a couple of different ways.

Run the wizard again, which should overwrite current checks with themselves and add the additional check that you want.

Add a single check to the host or other object through Core Config Manager, without overwriting any other checks. You can also do this by copying a current check that exists for the machine and altering it to your new needs. Be sure to check and apply configuration and handle any errors that may occur. This would be the suggested route to use.

Create and modify a configuration within the static directory, so that it will not get overwritten by nagios. This is would not be an ideal solution based on what was mentioned.

Also, if you just wish to test a plugin or command before adding it to the nagios configs, you can execute them from the plugins directory with your expected variables and directly view the results without effecting nagios as it is now.

Re: How to add a new service on a host in command line

Posted: Thu Dec 06, 2012 12:37 pm
by mguthrie
If you're comfortable with scripting, this is another solution for this as well.
http://library.nagios.com/library/produ ... -nagios-xi