monitoring hundreds of network switches

D G Teed donald.teed at gmail.com
Sat Nov 28 05:12:43 CET 2009


On Fri, Nov 27, 2009 at 4:28 PM, Marc Powell <marc at ena.com> wrote:

>
> Different problem. If you're just wanting to ping them, the only purpose of
> the hostgroup would just be to group them for display in the GUI. You do
> need them in a hostgroup for that. They should be in a hostgroup anyway
> though, it's just better in the long-run.
>

As mentioned, a script can generate such config files.  But would they
work?  Has anyone tried listing
400+ hosts in a hostgroup?


> You'll first need to create a hostgroup{} definition to contain all the
> switches. -
> http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#hostgroup
>
> define hostgroup{
>        hostgroup_name switches
>        alias All Your Switches Are Belong To Us
> }
>
> There are at least 3 ways to associate your switches with this hostgroup. I
> purposely avoided using a 'members' directive with a wildcard because you
> may one day monitor more than just these switches... I also didn't list out
> each switch in the members line either. You could do it, but it gets messy
> to manage by hand. A third way, and most flexible, is below.
>
> Next, you'll need to create a host{} definition for each of your switches.
> Your script-fu powers should come in handy here (i.e. a long one-liner awk
> should do it). Besides the usual required parameters, be sure to set the
> 'hostgroups' parameter to 'switches' to include it in the group above --
> http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#host
>
> define host{
>        host_name       cool_switch
>        alias           Freezer Switch
>        address         192.168.1.2
>        hostgroups      switches
>        check_command   check_fping ;(or whatever it's called)
>        check_period    24x7 ; (or whatever your schedule is)
>        check_interval  5 ; (or whatever your schedule is)
>        retry_interval  1 ; (or whatever your schedule is)
>        other required parameters   ...
> }
>
>
I'm liking that the hosts don't need to be listed in a hostgroup but can be
configured
as in your example. That is much more workable.

It looks like this will meet our needs nicely and I will be automating the
generation
of the configs for this part of our nagios set up.

Thanks for your help everyone...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091128/9bf3db2b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
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