Monitor Windows via SNMP
Jump to navigation
Jump to search
1 install snmp for windows XP
- Go to Start | Control Panel | Add Or Remove Programs.
- Choose Add/Remove Windows Components.
- In the Windows Components window, scroll down and select Management And Monitoring Tools. Don't put a check mark in the selector box; simply select the entry.
- Click Details.
- Scroll down and select the check box next to Simple Network Management Protocol.
- Click OK to return to the Windows Component window
When you're done with these steps, configure SNMP with the appropriate community strings by opening the Services Control Panel applet and locating the SNMP Service.
Open the service's Properties page by double-clicking the service.
2 install snmp for windows 2008R2
- Servermanager | Features | Add Features
- Choose: SNMP + WMI SNMP Provider
- Configure: ServerManager > Configuration > Services > SNMP
3 configure nagios
vi /etc/nagios3/conf.d/hosts-mydomain.com.cfg --- define host { host_name win parents master alias Windows Test Host address 192.168.0.10 use generic-host } define service{ use generic-service hosts win service_description Disk C: check_command check_snmp_storage_v1!C:!80!95!!public } define service{ use generic-service hosts win service_description Physical Memory check_command check_snmp_storage_v1!Physical Memory!90!95!!public } define service{ use generic-service hosts win service_description Virtual Memory check_command check_snmp_storage_v1!Virtual Memory!70!90!!public } define service{ use generic-service hosts win service_description Running Processes check_command check_snmp_int!public!hrSystemProcesses.0!100!150 } define service{ use generic-service hosts win service_description CPU Load check_command check_snmp_load_v1!stand!80!95!!public } define service{ use generic-service hosts win service_description Service RDP check_command check_win!!Terminaldienste!public } ---
vi /etc/nagios-plugins/config/custom.cfg --- define command{ command_name check_snmp_int command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o '$ARG2$' -w '$ARG3$' -c '$ARG4$' } ---
/etc/init.d/nagios3 restart