сервис_nagios

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_nagios [2022/03/11 13:50]
val [Настройка nagios на использование check_snmp]
сервис_nagios [2024/06/20 15:32] (current)
val [Настройка nagios на использование check_snmp]
Line 16: Line 16:
  
 # a2enmod authz_groupfile # a2enmod authz_groupfile
 +
 +# a2enmod cgid
  
 # systemctl restart apache2 # systemctl restart apache2
Line 129: Line 131:
         use                     ​my-templ-service-ping         use                     ​my-templ-service-ping
         host_name ​              ​switch3         host_name ​              ​switch3
 +}
 +
 +#--- For next labs ---
 +
 +define host{
 +        use             ​my-templ-host
 +        host_name ​      ​cisco-router
 +        alias           Cisco 7200
 +        address ​        ​router
 } }
 </​code>​ </​code>​
Line 200: Line 211:
 # mkdir /usr/var # mkdir /usr/var
  
-# /​usr/​lib/​nagios/​plugins/​check_snmp -H router -C public -o ifInOctets.2,​ifOutOctets.--rate -w 62500,62500 -c 125000,​125000+# /​usr/​lib/​nagios/​plugins/​check_snmp -H router -C public -o ifInOctets.5,​ifOutOctets.--rate -w 62500,62500 -c 125000,​125000
  
 # chown -R nagios:​nagios /usr/var/ # chown -R nagios:​nagios /usr/var/
Line 219: Line 230:
         use                     ​generic-service         use                     ​generic-service
         host_name ​              ​cisco-router         host_name ​              ​cisco-router
-        service_description ​    int LAN bandwidth+        service_description ​    int LAN bandwidth ​SNMP 
 +        flap_detection_enabled ​ 0
         check_command check_snmp_band!public!ifInOctets.2,​ifOutOctets.2!62500,​62500!125000,​125000         check_command check_snmp_band!public!ifInOctets.2,​ifOutOctets.2!62500,​62500!125000,​125000
 #        check_command check_snmp_band!public!ifInOctets.5,​ifOutOctets.5!62500,​62500!125000,​125000 #        check_command check_snmp_band!public!ifInOctets.5,​ifOutOctets.5!62500,​62500!125000,​125000
Line 247: Line 259:
         host_name ​              ​cisco-router         host_name ​              ​cisco-router
         service_description ​    int WAN bandwidth MRTG         service_description ​    int WAN bandwidth MRTG
 +        flap_detection_enabled ​ 0
         check_command check_local_mrtgtraf!/​var/​www/​html/​mrtg/​router_fa0_0.log!AVG!62500,​62500!125000,​125000!10         check_command check_local_mrtgtraf!/​var/​www/​html/​mrtg/​router_fa0_0.log!AVG!62500,​62500!125000,​125000!10
 } }
сервис_nagios.1646995828.txt.gz · Last modified: 2022/03/11 13:50 by val