Question about NEB

Hendrik Baecker b00mer at gmx.net
Fri Oct 21 13:10:25 CEST 2005


Hi List,

now I've changed some code from Ethan's helloworld.c NEB to give me NEB 
Callbacks from Nagios Core.

I've registered a callback for Service Check data like this:

    
neb_register_callback(NEBCALLBACK_SERVICE_CHECK_DATA,nsca_neb_module_handle,0,nsca_neb_handle_data);

and I am processing this Service Checkdata just in that way, that I want 
to see them in the log:

###

case NEBCALLBACK_SERVICE_CHECK_DATA:
                if((scdata=(nebstruct_service_check_data *)data)){
                        
snprintf(temp_buffer,sizeof(temp_buffer)-1,"nsca_neb:%s\t%s\t%d\t%s",(scdata->host_name), 

                                    (scdata->service_description), 
(scdata->return_code), (scdata->output));
                        temp_buffer[sizeof(temp_buffer)-1]='\x0';
                        write_to_all_logs(temp_buffer,NSLOG_INFO_MESSAGE);
             }
break;

.....

###

I am a little confused, cause I am getting two (different) Log entries 
for each service check!

Log-Output:

[1129892835] nsca_neb:Nagios_Slave      Disk /usr       0       DISK OK 
- free space: /usr 3425 MB (57%):
[1129892836] nsca_neb:Nagios_Slave      Disk /usr       0       DISK OK 
- free space: /usr 3425 MB (57%):
[1129892854] nsca_neb:Nagios_Master     Disk /var       0       DISK OK 
- free space: /var 2865 MB (57%):
[1129892855] nsca_neb:Nagios_Master     Disk /var       0       DISK OK 
- free space: /var 2865 MB (57%):

On the other side I have perfdata enabled and just see one entry for 
each check.

Can anyone explain?

Is it a feature? Is it a bug?

Regards,
Hendrik

Hendrik Baecker schrieb:

> Hello List,
>
> I've got a question about NEB.
>
> Are they handled by nagios like service_checks? Specially, does the 
> nagios reaper waits for the NEB-module after an callback?
>
> As far as I know works nagios like this:
>
> nagios forks to execute a service check and after executing the forked 
> nagios dies. After some time the nagios reaper comes to get the 
> service_check results. So in this case there are two calls for one 
> service check.
>
> So if I write a NEB to get some informations with the nagios callback 
> has the nagios core to have an answer from the NEB like "data 
> successfully processed by NEB" or does the data has just goes through 
> the neb api to the neb and that's it?
>
> Sorry for bad english but I hope that someone gets what I mean.
>
> Bye
> Hendrik
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> 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:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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