<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Nagios-Switch-Ports-Monitoring</id>
	<title>Nagios-Switch-Ports-Monitoring - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tetrain.com/index.php?action=history&amp;feed=atom&amp;title=Nagios-Switch-Ports-Monitoring"/>
	<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Nagios-Switch-Ports-Monitoring&amp;action=history"/>
	<updated>2026-07-25T07:37:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tetrain.com/index.php?title=Nagios-Switch-Ports-Monitoring&amp;diff=1753&amp;oldid=prev</id>
		<title>Amit: Created page with &quot;Category: Sandhar Technologies  == &#039;&#039;&#039;Switch there pors Monitoring with Nagios &#039;&#039;&#039; ==   We Use Here linuxbox.cfg for every Server or device to add with tha nagios.   1: Ad...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tetrain.com/index.php?title=Nagios-Switch-Ports-Monitoring&amp;diff=1753&amp;oldid=prev"/>
		<updated>2014-12-22T10:37:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:Sandhar_Technologies&quot; title=&quot;Category:Sandhar Technologies&quot;&gt;Category: Sandhar Technologies&lt;/a&gt;  == &amp;#039;&amp;#039;&amp;#039;Switch there pors Monitoring with Nagios &amp;#039;&amp;#039;&amp;#039; ==   We Use Here linuxbox.cfg for every Server or device to add with tha nagios.   1: Ad...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category: Sandhar Technologies]]&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Switch there pors Monitoring with Nagios &amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
 We Use Here linuxbox.cfg for every Server or device to add with tha nagios. &lt;br /&gt;
&lt;br /&gt;
1: Add new hostgroup or check the already hostgroup for switches in templates.cfg&lt;br /&gt;
&lt;br /&gt;
 if Needed Defined as Below &lt;br /&gt;
&lt;br /&gt;
 define hostgroup{&lt;br /&gt;
 hostgroup_name  switches&lt;br /&gt;
 alias           Network Switches&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
2: Add a new host for the switch to be monitered in linuxbox.cfg&lt;br /&gt;
&lt;br /&gt;
 define host{&lt;br /&gt;
 use             generic-switch&lt;br /&gt;
 host_name       core-switch&lt;br /&gt;
 alias           Cisco Core Switch&lt;br /&gt;
 address         192.168.1.50&lt;br /&gt;
 hostgroups      switches&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
3: Add common services for all switches&lt;br /&gt;
&lt;br /&gt;
 # Service definition to ping the switch using check_ping&lt;br /&gt;
 define service{&lt;br /&gt;
 use                     generic-service&lt;br /&gt;
 hostgroup_name          switches&lt;br /&gt;
 service_description     PING&lt;br /&gt;
 check_command           check_ping!200.0,20%!600.0,60%&lt;br /&gt;
 normal_check_interval   5&lt;br /&gt;
 retry_check_interval    1&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 # Service definition to monitor switch uptime using check_snmp&lt;br /&gt;
 define service{&lt;br /&gt;
 use                     generic-service&lt;br /&gt;
 hostgroup_name          switches&lt;br /&gt;
 service_description     Uptime&lt;br /&gt;
 check_command           check_snmp!-C public -o sysUpTime.0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
4: Add service to monitor port bandwidth usage&lt;br /&gt;
&lt;br /&gt;
 define service{&lt;br /&gt;
 use			        generic-service&lt;br /&gt;
 host_name			core-switch&lt;br /&gt;
 service_description	Port 1 Bandwidth Usage&lt;br /&gt;
 check_command		check_local_mrtgtraf!/var/lib/mrtg/192.168.1.11_1.log!AVG!1000000,2000000!5000000,5000000!10&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
5: Add service to monitor an active switch port &lt;br /&gt;
 &lt;br /&gt;
 # Monitor status of port number 1 on the Cisco core switch&lt;br /&gt;
 define service{&lt;br /&gt;
 use                  generic-service&lt;br /&gt;
 host_name            core-switch&lt;br /&gt;
 service_description  Port 1 Link Status&lt;br /&gt;
 check_command        check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 # Monitor status of port number 5 on the Cisco core switch&lt;br /&gt;
 define service{&lt;br /&gt;
 use                  generic-service&lt;br /&gt;
 host_name            core-switch&lt;br /&gt;
 service_description  Port 5 Link Status&lt;br /&gt;
 check_command	       check_snmp!-C public -o ifOperStatus.5 -r 1 -m RFC1213-MIB&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
6: Add services to monitor multiple switch ports together&lt;br /&gt;
&lt;br /&gt;
 # Monitor ports 1 - 6 on the Cisco core switch.&lt;br /&gt;
 define service{&lt;br /&gt;
 use                   generic-service&lt;br /&gt;
 host_name             core-switch&lt;br /&gt;
 service_description   Ports 1-6 Link Status&lt;br /&gt;
 check_command         check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB, -o ifOperStatus.2 -r 1 -m RFC1213-MIB, -o ifOperStatus.3 -r 1 -m  RFC1213-MIB, -o ifOperStatus.4 -r 1 -m RFC1213-MIB, -o ifOperStatus.5 -r 1 -m RFC1213-MIB, -o ifOperStatus.6 -r 1 -m RFC1213-MIB&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
7: Validate configuration and restart nagios&lt;br /&gt;
 &lt;br /&gt;
 # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&lt;br /&gt;
&lt;br /&gt;
 Total Warnings: 0&lt;br /&gt;
 Total Errors:   0&lt;br /&gt;
 Things look okay - No serious problems were detected during the pre-flight check&lt;br /&gt;
&lt;br /&gt;
 # /etc/rc.d/init.d/nagios restart&lt;br /&gt;
 Stopping nagios: .done.&lt;br /&gt;
 Starting nagios: done.&lt;br /&gt;
&lt;br /&gt;
Ref Url: http://exchange.nagios.org/directory/Tutorials/Other-Tutorials-And-HOWTOs/How-To-Monitor-Network-Switch-and-Ports-Using-Nagios/details&lt;/div&gt;</summary>
		<author><name>Amit</name></author>
	</entry>
</feed>