Page 1 of 1

Problems with eventman.php

Posted: Mon Dec 02, 2013 12:10 am
by Fred Kroeger
Have just upgraded to Nagios XI 2012R2.7 and noticed that eventman.php is reporting an error.
I have performed all the D/base repairs and still have problems. eventman.php is running every minute via cron, but the log file shows it is processing an event that was cleared several hours ago and then at the end of the log it complains about PHP fatal error.
This is exactly the same as another entry in this forum in Sept which has been locked.

Code: Select all

# /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
PROCESS EVENT: ID=3028870, SOURCE=2, TYPE=2, TIME=2013-12-02 09:32:54
*** GLOBAL HANDLER...
Array
(
    [event_id] => 3028870
    [event_source] => 2
    [event_type] => 2
    [event_time] => 2013-12-02 09:32:54
    [event_meta] => Array
        (
            [notification-type] => service
            [contact] => plakkineni
            [contactemail] => xxx
            [type] => PROBLEM
            [escalated] => 0
            [author] =>
            [comments] =>
            [host] => xxx
            [hostaddress] => xxx
            [hostalias] => xxx
            [hostdisplayname] => xxx
            [service] => NetApp - Disk Status
            [hoststate] => UP
            [hoststateid] => 0
            [servicestate] => UNKNOWN
            [servicestateid] => 3
            [lastservicestate] => UNKNOWN
            [lastservicestateid] => 3
            [servicestatetype] => HARD
            [currentattempt] => 5
            [maxattempts] => 5
            [serviceeventid] => 776234
            [serviceproblemid] => 340382
            [serviceoutput] => NAC UNKNOWN - could not import NMSDK
            [longserviceoutput] =>
            [datetime] => Mon Dec 2 09:32:54 WST 2013
        )

    [logging_enabled] => 1
)
*** GLOBAL HANDLER (snmptrapsender)...
Array
(
    [event_id] => 3028870
    [event_source] => 2
    [event_type] => 2
    [event_time] => 2013-12-02 09:32:54
    [event_meta] => Array
        (
            [notification-type] => service
            [contact] => xx
            [contactemail] => xxx
            [type] => PROBLEM
            [escalated] => 0
            [author] =>
            [comments] =>
            [host] => xxx
            [hostaddress] => xxx
            [hostalias] =>xxx
            [hostdisplayname] => xxx
            [service] => NetApp - Disk Status
            [hoststate] => UP
            [hoststateid] => 0
            [servicestate] => UNKNOWN
            [servicestateid] => 3
            [lastservicestate] => UNKNOWN
            [lastservicestateid] => 3
            [servicestatetype] => HARD
            [currentattempt] => 5
            [maxattempts] => 5
            [serviceeventid] => 776234
            [serviceproblemid] => 340382
            [serviceoutput] => NAC UNKNOWN - could not import NMSDK
            [longserviceoutput] =>
            [datetime] => Mon Dec 2 09:32:54 WST 2013
        )

    [logging_enabled] => 1
)
Got XI user id for contact 'xxx': 85
An email notification will be sent...

Email Notification Data:

Array
(
    [from] => Nagios XI <root@localhost>
    [to] =>xxx
    [subject] => PROBLEM Service Alert - xxx/NetApp - Disk Status is UNKNOWN
    [message] => ***** Nagios XI Alert *****

Nagios has detected a problem with this service.

Notification Type: PROBLEM

Service: NetApp - Disk Status
Host: xxx
Address: xxx
State: UNKNOWN
Info:
NAC UNKNOWN - could not import NMSDK
Date/Time: 02/12/2013 12:52:43

Respond: http://nagiosxi-wp/nagiosxi//rr.php?uid=85-15048-7c1c48b2f6ddd8fc3f474a217db88265
Nagios URL: http://nagiosxi-wp/nagiosxi/

)


PHP Fatal error:  Call to undefined function mb_convert_encoding() in /usr/local/nagiosxi/html/includes/utils-email.inc.php on line 74

Re: Problems with eventman.php

Posted: Mon Dec 02, 2013 11:15 am
by scottwilkerson
run

Code: Select all

yum install php-mb-string -y

Re: Problems with eventman.php

Posted: Mon Dec 02, 2013 6:59 pm
by Fred Kroeger
All good now - thanks for your help Scott.
However , you had a typo in the package name which stumped me for a while.....
It should be

Code: Select all

yum install php-mbstring -y
regards Fred

Re: Problems with eventman.php

Posted: Tue Dec 03, 2013 10:13 am
by abrist
good catch!