Port Descriptions
Posted: Wed Sep 18, 2013 10:03 am
Hi,
I have Nagios monitoring ports on our switches, however I've found that hard-coding the port description tags into my switch.cfg has been a tedious task and I foresee this becoming an issue as we grow bigger. Is there a simpler and quicker way of doing this?
As it is now, I am making an individual defined service for each port on the switch and coding the switch description associated with it in the service_description...
example:
I've done this for almost every important switch and port, however, is there a way to script it into Nagios to pull the description straight from the switch? Any ideas or tips to simplify this process would be most welcome.
Thank you!
I have Nagios monitoring ports on our switches, however I've found that hard-coding the port description tags into my switch.cfg has been a tedious task and I foresee this becoming an issue as we grow bigger. Is there a simpler and quicker way of doing this?
As it is now, I am making an individual defined service for each port on the switch and coding the switch description associated with it in the service_description...
example:
Code: Select all
##############################
#######switch ETH STATUS#######
##############################
define service{
use generic-service
host_name switch
service_description Eth 1 [description here]
check_command check_snmp!-H 10.7.x.x -P 2c -C secret -o ifOperStatus.1 -r '1|6'
max_check_attempts 2
check_interval 1
retry_check_interval 1
check_period 24x7
notification_interval 5
notification_period 24x7
contact_groups admins
}
define service{
use generic-service
host_name switch
service_description Eth 2 [description here]
check_command check_snmp!-H 10.7.x.x -P 2c -C secret -o ifOperStatus.2 -r '1|6'
max_check_attempts 2
check_interval 1
retry_check_interval 1
check_period 24x7
notification_interval 5
notification_period 24x7
contact_groups admins
}
Thank you!