[Spacewalk-list] Spacewalk 1.5 Monitoring issue

Jan Pazdziora jpazdziora at redhat.com
Fri Aug 5 14:54:26 UTC 2011


On Tue, Aug 02, 2011 at 07:34:46PM +0100, David Nutter wrote:
> On Tue, Jul 26, 2011 at 11:27:19AM +0530, trm asn wrote:
> 
> *snip*
>  
> > 'ProbeRecord', 'get_hostAddress') ; that error I have resolved by editing
> > "NPRecords.pm" & changed the parameter "hostAddress" to "HOSTADDRESS" .
> > 
> > now my "scout config push" are getting success, but unfortunately still the
> > monitoring status is "PENDING, Awaiting Update" .
> > 
> > 
> > -bash-3.2$ rhn-runprobe --probe=261 --log=all=4
> > Can't locate object method "hostname" via package
> > "NOCpulse::Probe::Config::ProbeRecord" at
> > blib/lib/Class/MethodMaker/Engine.pm (autosplit into
> > blib/lib/auto/Class/MethodMaker/Engine/new.al) line 941.
> > 
> > Any idea...
> 
> Hi, 
> 
> I've worked around/fixed the above error, and the error where
> rhn-catalog output is missing probe details by changing NOCPulse::Probe::Config::ProbeRecord
> and /var/lib/nocpulse/libexec/ProbeCatalog.pm as per the patches
> below. For information only, I don't recommend that anyone apply these
> to a production install!
> 
> --- ProbeRecord.pm.orig 2011-08-02 19:27:20.000000000 +0100
> +++ ProbeRecord.pm      2011-08-02 19:26:57.000000000 +0100
> @@ -54,6 +54,8 @@
>     contactGroupCustomers => 'contact_group_customers',
>     contactGroupNames     => 'contact_group_names',
>     hostAddress           => 'host_ip',
> +   HOSTADDRESS           => 'host_ip',
> +   HOSTNAME              => 'host_name',
>     hostName              => 'host_name',
>     hostRecid             => 'host_id',
>     parsedCommandLine     => 'parameters',
> 
> --- ProbeCatalog.pm.orig        2011-08-02 19:27:41.000000000 +0100
> +++ ProbeCatalog.pm     2011-08-02 19:25:58.000000000 +0100
> @@ -35,10 +35,10 @@
>      my $result;
>      if ($probe_id) {
>         $result = $probeHashRef->{RECID}.' '.$probeHashRef->{PROBE_TYPE};;
> -       if ($probeHashRef->{hostName}) {
> -           $result .= ' on '.$probeHashRef->{hostName}.' ('.$probeHashRef->{hostAddress}.')';
> +       if ($probeHashRef->{HOSTNAME}) {
> +           $result .= ' on '.$probeHashRef->{HOSTNAME}.' ('.$probeHashRef->{HOSTADDRESS}.')';
>         } else {
> -           $result .= ' on '.$probeHashRef->{hostAddress};
> +           $result .= ' on '.$probeHashRef->{HOSTADDRESS};
>         }
>         $result .= ': '.$probeHashRef->{DESCRIPTION};
> 
> 
> 
> So, now I can run a probe from the commandline and get correct results
> but my probes still won't update as far as the UI is concerned.

I assume the problem is that your scout config push does not finish.
Could you check if patch at

	http://git.fedorahosted.org/git/?p=spacewalk.git;a=commitdiff;h=6483c7e7e912df6cf60ad792c3e6de43431ff0d8

would improve things for you?

I still need to investigate your patch some more.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat




More information about the Spacewalk-list mailing list