event handler error in eventman.log

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

event handler error in eventman.log

Post by vy3734 »

hi,
I have OMI service integrated with nagios. For some after a recent linux patch and server reboot, the events stopped going to OMI.
i see the following error in /usr/local/nagiosxi/var/eventman.log
PROCESSED 0 EVENTS
buffer too small to read octet string (17 < 17)
....................
PROCESSED 0 EVENTS
buffer too small to read octet string (17 < 17)
....................
buffer too small to read octet string (17 < 17)

checked snmp service, it is up and running.
Can someone please help...!


Thanks!
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: event handler error in eventman.log

Post by vy3734 »

After working on a fix that i found online

As a workaround please log in to the core shell and execute the following: 
rm /var/lib/snmp/snmpapp.conf
Dong so will stop the false e-mail warnings immediately.
By deleting this automatically created wrong snmp config file one allows the next run of snmp to re-create it correctly.

the buffer too small error is not in the logs anymore....
but i see this
PHP Notice: Undefined index: contact in /usr/local/nagiosxi/html/includes/utils-notifications.inc.php on line 0
PHP Notice: Undefined index: hostalias in /usr/local/nagiosxi/html/includes/utils-notifications.inc.php on line 0
RUNNING COMMAND: /usr/bin/snmptrap -v 2c -c $Community_String $OMI_IP '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "linuxhost" nSvcDesc s "Cpu-Usage" nSvcStateID i 2 nSvcOutput s "high cpu test alert"
..PROCESS EVENT: ID=19569, SOURCE=2, TYPE=1, TIME=2019-01-29 11:08:21

still the events are not making it to OMI.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: event handler error in eventman.log

Post by tgriep »

can you provice more details on how you have OMI service integrated with Nagios?
Are you just using the SNMP Trap Sender component to send traps to the OMI device?

There may be another folder that has to have the permissions set so the nagios user can write to it.
The /var/lib/net-snmp folder and contents has to be writable by the nagios user/group and to fix that, run the following as root and then check to see if the traps are sent.

Code: Select all

chown -R nagios.nagios /var/lib/net-snmp
Be sure to check out our Knowledgebase for helpful articles and solutions!
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: event handler error in eventman.log

Post by vy3734 »

the files are currently owned by root
$ ls -l /var/lib/net-snmp/
total 4
drwxr-xr-x 2 root root 6 Sep 13 04:56 cert_indexes
drwxr-xr-x 2 root root 14 Sep 13 04:56 mib_indexes
-rw------- 1 root root 1693 Jan 28 17:01 snmpd.conf

can i go ahead and run chown -R nagios:nagios here?

just making sure i don't mess up the server.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: event handler error in eventman.log

Post by tgriep »

Yes, go ahead and change it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: event handler error in eventman.log

Post by vy3734 »

To answer your previous questions:
can you provide more details on how you have OMI service integrated with Nagios?
Are you just using the SNMP Trap Sender component to send traps to the OMI device?

yes i'm using the SNMP trap sender utility in nagios to send traps to OMI.

it was working fine until recently when the server went through a linux patch and was rebooted.

I changed the permissions as suggested. still no traps received in OMI.
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: event handler error in eventman.log

Post by vy3734 »

$ ls -l /var/lib/net-snmp/
total 8
drwxr-xr-x 2 nagios nagios 6 Sep 13 04:56 cert_indexes
drwxr-xr-x 2 nagios nagios 14 Sep 13 04:56 mib_indexes
-rw------- 1 nagios nagios 675 Jan 29 15:35 snmpapp.conf
-rw------- 1 nagios nagios 1693 Jan 28 17:01 snmpd.conf

snmpapp.conf file just got created.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: event handler error in eventman.log

Post by tgriep »

Take a look in the /usr/local/nagiosxi/var/eventman.log file for any errors and post them here.

Can you run the snmptrap command on the nagios server and does it send the trap to the OMI device?

Dan you describe what Linux Patch was installed?
Was it a yum update?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked