I use check_mk which automatically does a host inventory and adds active interfaces to the configuration. Off topic: I have to say the check_mk in combination with mk_livestatus and multisite make Nagios a much better solution. I wonder if and when the Nagios team is going to adopt this solution and make it a part of Nagios Core.
/Rutger On Thursday, October 28, 2010, Jason Frisvold <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Greetings, > > We are planning on submitting an enhancement request to Nagios with > the > intention of having their professional services group code this for us. > We are interested in having our changes made available to the community > as well, so we wanted to get feedback from the community before we > submit the proposal. Any and all feedback is welcome. > > Thanks. > > > Nagios Enhancement Proposal > > Overview > > Currently, there are two primary ways to add individual physical ports > for a port-based device. Each method has both advantages and > disadvantages, but neither fully satisfies the needs of Lafayette and, > likely, other institutions. > > Service-based Ports > > The first method is to treat ports as a service of a host and add them > as service entries. The following configuration snippet demonstrates this : > > define host { > use cisco-switch-standard > host_name switch.lafayette.edu > address 192.168.0.100 > hostgroups cisco-switch-standard > parents router.lafayette.edu > } > > define service { > use service-standard > hosts switch.lafayette.edu > servicegroups cisco-switch-standard > service_description Switch Port Gi1/0/1 > check_command check_snmp_traffic!-N Gi1/0/1!-C $USER2$ > } > > In short, this configuration defines a host and then a service for that > host which is, essentially, an snmp check that monitors the traffic on a > specific port. > > Advantages > * Cleanly links a port to a switch > * Somewhat easy to add/remove specific hosts that need that port monitored > > Disadvantages > * Parent/child relationships are difficult, if not impossible, to define > * Making service changes for a single port requires creating a unique > new service > * Service descriptions can get a bit long when they need to have a > meaningful description associated with them > * Ports with associated addresses are more difficult to define > > > Host-based Ports > > Another method to accomplish this is to create a “fake” host entry for > each port and then assign services to those ports for monitoring. The > following configuration snippet demonstrates this : > > define host { > use cisco-switch-standard > host_name switch.lafayette.edu > address 192.168.0.100 > hostgroups cisco-switch-standard > parents router.lafayette.edu > } > > define host { > use cisco-switch-standard > host_name switch-g1-0-1.lafayette.edu > address 192.168.0.100 > hostgroups cisco-switch-standard > _PORT Gi1/0/1 > parents switch.lafayette.edu > } > > define service { > use service-standard > hosts switch.lafayette.edu > servicegroups cisco-switch-standard > service_description Port Traffic > check_command check_snmp_traffic!-N $_HOSTPORT$!-C $USER2$ > } > > This configuration defines two hosts, a switch and a port on that > switch, and then a service linked to the port. > > Advantages > * Parent/child relationships work as expected > * A single service entry can be used for many port entries > * Very easy to deal with address-assigned ports such as router interfaces > > Disadvantages > * Every port on every switch has to be defined > * Port host_name entries are often fake > * Port address entries are often duplicated > > > Proposed Solution > > host-port object > > define host { > use cisco-switch-standard > host_name switch.lafayette.edu > address 192.168.0.100 > hostgroups cisco-switch-standard > parents router.lafayette.edu > } > > define host_port { > use cisco-switch-standard > host switch.lafayette.edu > port_name Gi1/0/1 > } > > define service { > use service-standard > host switch.lafayette.edu > port_based true > servicegroups cisco-switch-standard > service_description Port Traffic > check_command check_snmp_traffic!-N $PORTNAME$!-C $USER2$ > } > > In this proposed configuration, a host is defined, as normal. A new > object, the host_port object, is defined with port-based information. > The host_port object imports information such as address and host_name > from the host but can override this information if needed. For > instance, a router interface may have an ip address and hostname. > Finally, a new tag, port_name, identifies the port name to use. When > displaying the host_port in the GUI, or identifying it in email/SMS, the > port_name should be appended to the host_name. A similar syntax could > be used for parent/child relationships as well. > > The service definition uses a new tag, port_based, to identify that this > service is for the ports of a host, not for the host itself. This > service should be applied to all ports. port_name can be used in a > manner similar to host or hostgroups to restrict the service to specific > ports. > > Advantages > * Clearly links ports to hosts > * Parent/child relationships can be clearly defined > * A single service entry can be used for many port entries > * Very easy to deal with address-assigned ports such as router interfaces > > Disadvantages > * Every port has to be defined > * Concatenated host/port names can get a bit long > > - -- > - --------------------------- > Jason Frisvold > Network Engineer > [email protected] > - --------------------------- > "What I cannot create, I do not understand" > - Richard Feynman > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkzJk7EACgkQO80o6DJ8UvkfDACeLtvq+tm2W+Muz32SOopnqo4J > /6MAmgM5Gvmp26npPTOl2oY93NBh+hn0 > =u3pW > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Nagios-users mailing list > [email protected] > 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 > -- Rutger Blom Luzernvägen 14 227 38 LUND Sweden Tel. +46 763 46 99 44 www.rutgerblom.com about.me/rutgerblom ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Nagios-users mailing list [email protected] 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
