[Nagiosplug-devel] [ nagiosplug-Bugs-1296242 ] check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2

SourceForge.net noreply at sourceforge.net
Tue Sep 20 03:21:17 CEST 2005


Bugs item #1296242, was opened at 2005-09-20 12:20
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel Bimschas (bimschas)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2

Initial Comment:
Hi,

the check_nagios plugin always gets the last_entry_time
wrong when doing checks on NAGIOSHOME/var/status.dat.

I made a little fix, my diff:

65,67c65
<       char tag[] = "created=";
<       char *dummy = NULL;
<
---
>
92,97c90,94
<               temp_ptr = strtok (input_buffer, tag);
<               temp_ptr = strtok (NULL,tag);
<               if (temp_ptr != NULL) {
<                       latest_entry_time = strtoul
(temp_ptr,NULL,10);
<                       break;
<               }
---
>               temp_ptr = strtok (input_buffer, "]");
>               temp_entry_time =
>                       (temp_ptr == NULL) ? 0L :
strtoul (temp_ptr + 1, NULL, 10);
>               if (temp_entry_time > latest_entry_time)
>                       latest_entry_time =
temp_entry_time;

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&group_id=29880




More information about the Devel mailing list