I have configure nagios core 4.0.7 with nrpe and its working perfectly fine and now I want extend nagios capability to monitor my SNMP device like switch router and ESXi host.
To that I have installed below RPM.
Code: Select all
[root@sov-srv-negios01 snmptt]# rpm -qa |grep snmp
net-snmp-utils-5.5-50.el6_6.1.x86_64
net-snmp-libs-5.5-50.el6_6.1.x86_64
net-snmp-devel-5.5-50.el6_6.1.x86_64
snmptt-1.4-0.9.beta2.el6.noarch
net-snmp-perl-5.5-50.el6_6.1.x86_64
net-snmp-5.5-50.el6_6.1.x86_64Code: Select all
[root@sov-srv-negios01 snmp]# more snmptrapd.conf
#
# No traps are handled by default, you must edit this file!
#
# authCommunity log,execute,net public
logoption f /var/log/snmptrap.log
disableAuthorization yes
traphandle default /usr/sbin/snmptthandler
#traphandle default /usr/sbin/snmptt
createUser -e 8000000001020304 arqadmin SHA mypassword AES
authuser log arqadminI have convert VMware MIBS by below command
Code: Select all
# for i in `ls -lrt |awk '{print $9}'`; do snmpttconvertmib --in=$i --out=/etc/snmp/snmptt.conf.vmware --exec='/usr/local/nagios/libexec/eventhandlers/submit_check_result $r TRAP 2 '; doneI have installed NSTI package also and all this work but I am not able get snmptt logs in correct format.
When I am poweron/off VM in ESXi host I am getting below messages in my snmptt.log file
snmptt logs
Code: Select all
Mon Nov 3 14:16:25 2014 .1.3.6.1.4.1.6876.4.1.0.1 Normal "Status Events" hem-lab-esxi-10 - 1 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes
Mon Nov 3 14:17:14 2014 .1.3.6.1.4.1.6876.4.1.0.4 Normal "Status Events" hem-lab-esxi-10 - 4 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes
Mon Nov 3 14:17:44 2014 .1.3.6.1.4.1.6876.4.1.0.4 Normal "Status Events" hem-lab-esxi-10 - 4 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes
Mon Nov 3 14:18:48 2014 .1.3.6.1.4.1.6876.4.1.0.2 Normal "Status Events" hem-lab-esxi-10 - 2 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltesCode: Select all
2014-11-03 14:16:25 hem-lab-esxi-10 [UDP: [10.128.27.40]:35774->[10.128.156.100]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (39882200) 4 days, 14:47:02.00 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.6876.4.1.0.1 .1.3.6.1.4.1.6876.50.101.0 = INTEGER: 1 .1.3.6.1.4.1.6876.50.102.0 = STRING: "/vmfs/volumes/54468116-b03d8ea4-431d-
549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx" .1.3.6.1.4.1.6876.2.1.1.2.20 = STRING: "test-centos-tempaltes"
2014-11-03 14:17:14 hem-lab-esxi-10 [UDP: [10.128.27.40]:35774->[10.128.156.100]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (39887200) 4 days, 14:47:52.00 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.6876.4.1.0.4 .1.3.6.1.4.1.6876.50.101.0 = INTEGER: 4 .1.3.6.1.4.1.6876.50.102.0 = STRING: "/vmfs/volumes/54468116-b03d8ea4-431d-
549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx" .1.3.6.1.4.1.6876.2.1.1.2.20 = STRING: "test-centos-tempaltes"
2014-11-03 14:17:44 hem-lab-esxi-10 [UDP: [10.128.27.40]:35774->[10.128.156.100]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (39890200) 4 days, 14:48:22.00 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.6876.4.1.0.4 .1.3.6.1.4.1.6876.50.101.0 = INTEGER: 4 .1.3.6.1.4.1.6876.50.102.0 = STRING: "/vmfs/volumes/54468116-b03d8ea4-431d-
549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx" .1.3.6.1.4.1.6876.2.1.1.2.20 = STRING: "test-centos-tempaltes"
2014-11-03 14:18:15 hem-lab-esxi-10 [UDP: [10.128.27.40]:35774->[10.128.156.100]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (39893200) 4 days, 14:48:52.00 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.6876.4.90.0.401 .1.3.6.1.4.1.6876.4.30.3.0 = Hex-STRING: 07 DE 0B 03 0F 0E 26 00
2014-11-03 14:18:48 hem-lab-esxi-10 [UDP: [10.128.27.40]:35774->[10.128.156.100]]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (39896500) 4 days, 14:49:25.00 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.6876.4.1.0.2 .1.3.6.1.4.1.6876.50.101.0 = INTEGER: 2 .1.3.6.1.4.1.6876.50.102.0 = STRING: "/vmfs/volumes/54468116-b03d8ea4-431d-
549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx" .1.3.6.1.4.1.6876.2.1.1.2.20 = STRING: "test-centos-tempaltes"
Code: Select all
[root@sov-srv-negios01 snmp]# grep .1.3.6.1.4.1.6876.4.1.0.1 snmptt.conf.vmware
EVENT vmwVmPoweredOn .1.3.6.1.4.1.6876.4.1.0.1 "Status Events" Normal
[root@sov-srv-negios01 snmp]# grep .1.3.6.1.4.1.6876.4.1.0.2 snmptt.conf.vmware
EVENT vmwVmPoweredOff .1.3.6.1.4.1.6876.4.1.0.2 "Status Events" NormalI want "EVENT vmwVmPoweredOff .1.3.6.1.4.1.6876.4.1.0.2 "Status Events" Normal" to shown snmptt.log.
Please tell me how can achive this
I have checked in my mysql database ist showing everything
My Database table information showing like this.
Code: Select all
EVENT vmwVmPoweredOff .1.3.6.1.4.1.6876.4.1.0.2 "Status Events" Normal
214 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:43:50.00 | Mon Nov 3 14:13:13 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 09 25 00 | 0 | 2014-11-03 14:13:16 |
| 215 | vmwVmPoweredOn | .1.3.6.1.4.1.6876.4.1.0.1 | .1.3.6.1.4.1.6876.4.1.0.1 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:47:02.00 | Mon Nov 3 14:16:25 2014 | 1 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes | 0 | 2014-11-03 14:16:26 |
| 216 | vmwVmHBDetected | .1.3.6.1.4.1.6876.4.1.0.4 | .1.3.6.1.4.1.6876.4.1.0.4 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:47:52.00 | Mon Nov 3 14:17:14 2014 | 4 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes | 0 | 2014-11-03 14:17:16 |
| 217 | vmwVmHBDetected | .1.3.6.1.4.1.6876.4.1.0.4 | .1.3.6.1.4.1.6876.4.1.0.4 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:48:22.00 | Mon Nov 3 14:17:44 2014 | 4 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes | 0 | 2014-11-03 14:17:46 |
| 218 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:48:52.00 | Mon Nov 3 14:18:15 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 0E 26 00 | 0 | 2014-11-03 14:18:16 |
| 219 | vmwVmPoweredOff | .1.3.6.1.4.1.6876.4.1.0.2 | .1.3.6.1.4.1.6876.4.1.0.2 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:49:25.00 | Mon Nov 3 14:18:48 2014 | 2 /vmfs/volumes/54468116-b03d8ea4-431d-549f3541e74a/test-centos-tempaltes/test-centos-tempaltes.vmx test-centos-tempaltes | 0 | 2014-11-03 14:18:52 |
| 220 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:53:54.00 | Mon Nov 3 14:23:17 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 13 28 00 | 0 | 2014-11-03 14:23:22 |
| 221 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:14:58:55.00 | Mon Nov 3 14:28:18 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 18 2A 00 | 0 | 2014-11-03 14:28:22 |
| 222 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:15:03:57.00 | Mon Nov 3 14:33:19 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 1D 2B 00 | 0 | 2014-11-03 14:33:22 |
| 223 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:15:08:59.00 | Mon Nov 3 14:38:21 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 22 2C 00 | 0 | 2014-11-03 14:38:22 |
| 224 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:15:14:01.00 | Mon Nov 3 14:43:23 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 27 2E 00 | 0 | 2014-11-03 14:43:27 |
| 225 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:15:19:02.00 | Mon Nov 3 14:48:24 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 2C 30 00 | 0 | 2014-11-03 14:48:27 |
| 226 | vmwCimOmHeartbeat | .1.3.6.1.4.1.6876.4.90.0.401 | .1.3.6.1.4.1.6876.4.90.0.401 | | | hem-lab-esxi-10 | 10.128.27.40 | Status Events | Normal | 4:15:24:03.00 | Mon Nov 3 14:53:26 2014 | This notification, if the agent is so configured, will be sent 07 DE 0B 03 0F 31 31 00 | 0 | 2014-11-03 14:53:27 |
+-----+-------------------+------------------------------+------------------------------+------------+-----------+-----------------+--------------+---------------+----------+---------------+--------------------------+---------------------------------------------------------------------------------------------------------------------------+----------+---------------------+
226 rows in set (0.00 sec)Please help me
Thanks
Sanjay
