Please tell me a sane way to comment out hosts/services

Jim Perrin jperrin at gmail.com
Sat Nov 12 02:01:15 CET 2005


On 11/11/05, prosolutions at gmx.net <prosolutions at gmx.net> wrote:
> >
> > On mine I put a # sign in front of the line and it remarks the line out.
>
>
> I know, its just that doing that 200+ times for all the lines gets
> tiresome...  There should be one straightforward way to say "I don't
> want this host (and all its associated services monitored) without
> having to put "#" in front of a zillion lines.  The 'register' paramater
> was tempting, but actually didn't have the desired effect, and seems to
> only work for hosts stanzas and not service ones.  Also, it says in the
> docs that to disable checks for hosts to leave the argument blank for
> 'check_command' but doing this causes an error.  Commenting it out it
> seems to still do ping checks.  Its just a bit frustrating.  I think
> there should be a clear way to tell this program "Look, I do NOT want
> you to monitor this host. Period."  Something that requires only
> changing one line.
>
> I guess as the other reply stated I can invest some time and set up a
> config generation system to help automate this...

While it may not be the ideal solution you want, you can do this if
you use per-machine configs inside a config directory. Simply rename
the file extension to something other than cfg, and nagios ignores it
when it parses the files. This works if you have each host and
associated services in a file inside the cfg_dir.



--
Jim Perrin
System Architect - UIT
Ft Gordon & US Army Signal Center


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list