NEB Changing Message Text

Mohr James james.mohr at elaxy.com
Mon Oct 24 14:47:38 CEST 2005


Hi All!

One of my goals in using the NEB is to change the message text. In my
tests I simply do it like this:

sprintf(temp_buffer,"CHANGED MESSAGE: %s",tmp_service->plugin_output);
strcpy(tmp_service->plugin_output,temp_buffer);

This works, but each message is acutally getting processed three times,
so I end up with a message that looks like this:

CHANGED MESSAGE: CHANGED MESSAGE: CHANGED MESSAGE: HTTP ok: HTTP/1.1 200
OK - 2.322 second response time 

If I start the check manually ("Re-schedule the next check of this
service") it looks like this: 

CHANGED MESSAGE: CHANGED MESSAGE: HTTP ok: HTTP/1.1 200 OK - 2.322
second response time 

After a while it seems that I get the "CHANGED MESSAGE:" three times,
then back again. However, I am not 100% sure what is going on.
Somethings the text is there three times, sometimes twice.

I have a single callback function for NEBCALLBACK_SERVICE_STATUS_DATA
events. In the nagios.log, I only see two entries:

[1130552871] EVENT: 20 MESSAGE: HTTP ok: HTTP/1.1 200 OK -   0.301
second response time
[1130552871] EVENT: 20 MESSAGE: CHANGED MESSAGE: HTTP ok: HTTP/1.1 200
OK -   0.301 second response time

Regards,

Jim Mohr


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list