Statusmap bug and patch

Ethan Galstad nagios at nagios.org
Mon Jan 19 18:02:50 CET 2004


Thanks for the patch - I'll get it applied today.

As far as the passive checks are concerned, it appears as though 
Nagios is processing them (alerts are shown in the log file, as are 
notifications for those checks).  For some reason, however, they are 
not getting updated in the status log.  Is status information for 
active service checks working ok?  What are your values for the 
following config file directives:

aggregate_status_updates
status_update_interval

Lastly, how are you storing status data?  Text file or DB?

On 18 Jan 2004 at 19:49, Sergio Freire wrote:

> Ethan,
> i found a bug in statusmap.cgi that caused a segmentation fault.
> I was trying to set a background image which didn't exists, i think,
> but the statusmap.c should handle this nicely. I added a check just to
> see if the pointer is null or not. The changed line can be found in
> function load_background_image(), line 1428 (from 1-x-cvs branch). By
> the way, i have noticed another problem which i described at least two
> times and that is related with submition of passive checks, that
> alhough being correctly received (at least i can see them in the log
> file), don't affect the service state because nagios simple discards
> that passive check result. The problem isn't linear and i think it has
> something to do with the passive_check_result list in memory.. Thanks
> 
> Original code:
> 
>         if(create_type==CREATE_HTML)
>                 gdImageDestroy(background_image);
> 
> Fixed code:
> 
>         if((create_type==CREATE_HTML) && (background_image!=NULL))
>                 gdImageDestroy(background_image);
> 
> 
> 
> 
> Diff:
> --- statusmap.c 2003-11-23 01:37:22.000000000 +0000
> +++ statusmap.c.patched 2004-01-18 19:44:49.000000000 +0000
> @@ -1425,7 +1425,7 @@
>                 }
> 
>         /* if we are just creating the html, we don't need the image
> anymore */ -       if(create_type==CREATE_HTML) +      
> if((create_type==CREATE_HTML) && (background_image!=NULL))
>                 gdImageDestroy(background_image);
> 
>         return;
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -----------------------------------------
> Hi Ethan,
> i have already reported this in the start of July 2003 but as the
> problems continues so im posting it again. The problem is simple:
> Nagios does not process some passive checks!! I can see them arriving
> (i saw /var/log/messages) but sometimes Nagios simply internaly
> ignores the passive check result. For example, see these logs bellow
> and you can notice that IVR service when OK then it went critical and
> then OK again. Nagios DOES NOT process the last OK although it prints
> it in the log file. I checked the web interface and one hour after, it
> still was not processed!! One hour after i submited an OK in this
> service (IVR) using the CGI through the web page and Nagios processed
> it (you can see this in the last lines i copied) ... what is wrong??
> Ethan, i dont know if you noticed this already but im seeing this
> happening for long time for passive only services.. i have already
> looked at the source code but i can't find the problem although i
> guess its some problem with the list and the pointers of the check
> results..
> 
> 
> 
> Jan 12 10:03:49 bill1 nagios: EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;ivr4;IVR;0;InoVox Online
> Jan 12 10:06:30 bill1 nagios: SERVICE ALERT: ivr4;IVR;OK;HARD;1;InoVox
> Online Jan 12 10:06:30 bill1 nagios: SERVICE NOTIFICATION:
> nagios;ivr4;IVR;OK;notify-by-sms;InoVox Online Jan 12 10:06:30 bill1
> nagios: SERVICE EVENT HANDLER: ivr4;IVR;OK;HARD;1;handler_smsc Jan 12
> 10:08:49 bill1 nagios: EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;ivr4;IVR;2;InoVox Offline Jan 12 10:09:57
> bill1 snmptrapd[853]: 144.64.87.146: Enterprise Specific Trap (1001)
> Uptime: 0:01:27.26, system.sysName = "SMSIVR4",
> enterprises.3028.1.1.2.2.3.0 = 2 Jan 12 10:10:09 bill1 nagios:
> EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;ivr4;IVR;0;InoVox
> Online Jan 12 10:11:11 bill1 nagios: SERVICE ALERT:
> ivr4;IVR;CRITICAL;HARD;1;InoVox Offline Jan 12 10:11:11 bill1 nagios:
> SERVICE NOTIFICATION: nagios;ivr4;IVR;CRITICAL;notify-by-sms;InoVox
> Offline Jan 12 10:11:11 bill1 nagios: SERVICE EVENT HANDLER:
> ivr4;IVR;CRITICAL;HARD;1;handler_smsc
> 
> 
> 
> 
> Jan 12 11:27:14 bill1 nagios: EXTERNAL COMMAND:
> PROCESS_SERVICE_CHECK_RESULT;ivr4;IVR;0;Inovox OK
> Jan 12 11:27:29 bill1 nagios: SERVICE ALERT: ivr4;IVR;OK;HARD;1;Inovox
> OK Jan 12 11:27:29 bill1 nagios: SERVICE NOTIFICATION:
> nagios;ivr4;IVR;OK;notify-by-sms;Inovox OK Jan 12 11:27:29 bill1
> nagios: SERVICE EVENT HANDLER: ivr4;IVR;OK;HARD;1;handler_smsc
> 
> 
> 
> 
> -- 
> ========================================
> Sérgio Freire
> PT Inovação, SA
> Tel: +351 234 403609
> e-mail: sergio-s-freire at ptinovacao.pt
> Jabber: sergio at im.ptinovacao.pt
> ICQ: 49658099
> ----------------------------------------
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn




More information about the Developers mailing list