Dienstag, 29. Juli 2014

Nagios crashing while using scheduled downtimes, log rotation and MK-Livestatus

So, this is my first post in English so please don't expect too much ;-)

There is a problem in nagios 3.4.x - 3.5.x while using NEB mk_livestatus (https://mathias-kettner.de/checkmk_livestatus.html), setting log_rotation_method and using scheduled downtimes.

This bug leads to a crashing nagios process at the time where a logrotate should be done.

I noticed this after updating nagios core from 3.3.x to 3.4.4 and also in 3.5.1.

There is a patch available at http://tracker.nagios.org/view.php?id=455 (Bug ID 455)

--- nagios-3.5.0/include/downtime.h     2013-02-10 00:55:47.000000000 +0100
+++ /tmp/downtime.h     2013-04-04 17:05:14.000000000 +0200
@@ -39,24 +39,26 @@
        char *service_description;
        time_t entry_time;
        time_t start_time;
-       time_t flex_downtime_start;             /* Time the flexible downtime started */
        time_t end_time;
        int fixed;
        unsigned long triggered_by;
        unsigned long duration;
        unsigned long downtime_id;
-       int is_in_effect;
-       int     start_notification_sent;
        char *author;
        char *comment;
 #ifdef NSCORE
        unsigned long comment_id;
+       int is_in_effect;
+#ifdef NSCORE
        int start_flex_downtime;
        int incremented_pending_downtime;
 //     int start_event;
 //     int stop_event;
        struct scheduled_downtime_struct *next;
+       time_t flex_downtime_start;             /* Time the flexible downtime started */
+       int     start_notification_sent;
        } scheduled_downtime;

This patch also works with 3.5.1 and should be applicable to 3.4.x.

On my next post i'll talk about creating rpms for nagios (which is very easy if you know how to)

Keine Kommentare:

Kommentar veröffentlichen