NEB Changing Message Text

Hendrik Baecker b00mer at gmx.net
Mon Oct 24 15:31:42 CEST 2005


Hi James,

you have to check what kind of event type your neb is getting by the 
nagios core.

See broker.h for more details and get some ideas out of Ethan's 
"helloworld.c" line 120.

Mohr James schrieb:

>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
>
>
>  
>



-------------------------------------------------------
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