Skip Menu |

This queue is for tickets about the Nagios-Object CPAN distribution.

Report information
The Basics
Id: 46480
Status: stalled
Priority: 0/
Queue: Nagios-Object

People
Owner: duncan_j_ferguson [...] yahoo.co.uk
Requestors: smithj4 [...] bnl.gov
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.21.3
Fixed in: (no value)



Subject: Patch for Nagios v3 Status Log for missing tags & blocks.
This patch adds some missing tags found in the StatusLog with Nagios version 3. It also adds the new blocks of data that are included in Nagios version 3, for contacts, comments & downtime. Back in version 0.20 of this module I was using the patch found in bug report #33125, but then added to it to properly support the comments & downtime blocks that I was using. I updated my patch to apply to the latest version of this module, 0.21.3. ~Jason
Subject: perl-Nagios-Object-StatusLog-v3.patch

Message body is not shown because it is too large.

On Fri May 29 15:03:21 2009, smithj4@bnl.gov wrote: Show quoted text
> This patch adds some missing tags found in the StatusLog with Nagios > version 3. It also adds the new blocks of data that are included in > Nagios version 3, for contacts, comments & downtime. Back in version > 0.20 of this module I was using the patch found in bug report #33125, > but then added to it to properly support the comments & downtime blocks > that I was using. I updated my patch to apply to the latest version of > this module, 0.21.3.
Applied in git - do you have any suitable tests that can catch such problems in the future? Thanks Duncs
On Tue Jun 02 07:25:07 2009, duncs wrote: Show quoted text
> > Applied in git - do you have any suitable tests that can catch such > problems in the future?
Hi Duncs, Sorry, I just did this by manually looking at the file and testing with Nagios to scheduling downtime and making comments to see that the status file looked like. What did you want to do, automatically warn or handle file format changes with new versions of nagios? I am not sure what the Nagios version 1 file looked like, if that really matters anymore, but the first block in versions 2 & 3 seems to be the info section with the version number. It might be somewhat easy to make the status parser a little smarter and automatically detect the version and handle the format properly, without requiring the user to supply the file version. ~Jason
On Tue Jun 02 14:24:40 2009, smithj4@bnl.gov wrote: Show quoted text
> I am not sure what the Nagios version 1 file looked like, if that really > matters anymore, but the first block in versions 2 & 3 seems to be the > info section with the version number. It might be somewhat easy to make > the status parser a little smarter and automatically detect the version > and handle the format properly, without requiring the user to supply the > file version.
Detecting the nagios version seems like the best move. If that wasn't included in version 1 then fair enough - i seriously doubt there are many instances of it left about for it to be a concern.
Subject: Re: [rt.cpan.org #46480] Patch for Nagios v3 Status Log for missing tags & blocks.
Date: Mon, 8 Jun 2009 10:32:11 -0700
To: bug-Nagios-Object [...] rt.cpan.org
From: Al Tobey <tobert [...] gmail.com>
On Tue, Jun 2, 2009 at 4:25 AM, Duncan Ferguson via RT<bug-Nagios-Object@rt.cpan.org> wrote: Show quoted text
>       Queue: Nagios-Object >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=46480 > > > On Fri May 29 15:03:21 2009, smithj4@bnl.gov wrote:
>> This patch adds some missing tags found in the StatusLog with Nagios >> version 3.  It also adds the new blocks of data that are included in >> Nagios version 3, for contacts, comments & downtime.  Back in version >> 0.20 of this module I was using the patch found in bug report #33125, >> but then added to it to properly support the comments & downtime blocks >> that I was using.  I updated my patch to apply to the latest version of >> this module, 0.21.3.
> > Applied in git - do you have any suitable tests that can catch such > problems in the future?
I used to periodically pull the example configs from the Nagios distribution and throw them in the t/v2_config directory. I occasionally had to edit a couple paths to make them fly, but it worked well to find when new tags were added. You might try updating those configs and copy the test for v3_config. -Al
On Mon Jun 08 13:32:31 2009, tobert@gmail.com wrote: Show quoted text
> I used to periodically pull the example configs from the Nagios > distribution and throw them in the t/v2_config directory. I > occasionally had to edit a couple paths to make them fly, but it > worked well to find when new tags were added. > > You might try updating those configs and copy the test for v3_config.
Just added a set for v3 configs and it all worked first time Duncs
I'll leave this open until the code is done to detect the version from the config file