Skip Menu |

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

Report information
The Basics
Id: 31291
Status: resolved
Priority: 0/
Queue: Nagios-Object

People
Owner: duncan_j_ferguson [...] yahoo.co.uk
Requestors: mmcclure [...] peakperformanceit.com
Cc:
AdminCc:

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



Subject: Parsing bug for multiple contact groups in host
Date: Fri, 7 Dec 2007 15:23:10 -0600
To: <bug-Nagios-Object [...] rt.cpan.org>
From: "Mike McClure" <mmcclure [...] peakperformanceit.com>
Hello, I'm trying to use Nagios-Object-0.20 to parse some configs and check contacts for hosts. Hosts with multiple contact_groups doesn't parse quite right. When a host object with multiple contact_groups attribute values is dumped, it does not show the attribute at all. Using Perl 5.8.8 on Fedora Core 5, kernel 2.6.18-1.2239.fc5. I've looked through the code, but I can't figure out where the problem is. Thanks, - Mike ---- Mike McClure Network Engineer Peak Performance IT mmcclure@peakperformanceit.com
Subject: [rt.cpan.org #31291] Parsing bug for multiple contact groups in host
Date: Thu, 13 Dec 2007 21:40:51 -0600
To: <bug-Nagios-Object [...] rt.cpan.org>
From: "Mike McClure" <mmcclure [...] peakperformanceit.com>
Hello, I think I've found a workaround for the problem. It seems that the resolving/registering process doesn't try to resolve things using arrays, which is what is being fed out of the first parsing routines. So if that first part is skipped (making arrays), then the rest seems to work fine. *** /root/.cpan/build/Nagios-Object-0.20/lib/Nagios/Object.pm Fri Aug 24 00:39:06 2007 --- Object.pm Thu Dec 13 21:34:42 2007 *************** *** 783,791 **** $self->_validate( $key, $value, @{$vf->{$key}} ); } ! if ( ref $vf->{$key}[0] eq 'ARRAY' && $value =~ /,/ ) { ! $value = [ split /\s*,\s*/, $value ]; ! } # set the value (which is an anonymous subroutine) if ( defined($value) ) { --- 783,791 ---- $self->_validate( $key, $value, @{$vf->{$key}} ); } ! #if ( ref $vf->{$key}[0] eq 'ARRAY' && $value =~ /,/ ) { ! # $value = [ split /\s*,\s*/, $value ]; ! #} # set the value (which is an anonymous subroutine) if ( defined($value) ) { Show quoted text
> -----Original Message----- > >
------------------------------------------------------------------------ - Show quoted text
> Hello, > > I'm trying to use Nagios-Object-0.20 to parse some configs and check > contacts for hosts. Hosts with multiple contact_groups doesn't parse > quite right. When a host object with multiple contact_groups
attribute Show quoted text
> values is dumped, it does not show the attribute at all. > > Using Perl 5.8.8 on Fedora Core 5, kernel 2.6.18-1.2239.fc5. I've > looked through the code, but I can't figure out where the problem is. > > Thanks, > > - Mike > > ---- > Mike McClure > Network Engineer > Peak Performance IT > mmcclure@peakperformanceit.com >
Fixed with patch provided in RT#46480