[rtg] Fwd: rtgpoll failed: using btoneill's targetmaker

Yu Safin calanet at gmail.com
Tue Nov 14 13:46:19 PST 2006


---------- Forwarded message ----------
From: Yu Safin <calanet at gmail.com>
Date: Nov 14, 2006 4:32 PM
Subject: Re: [rtg] rtgpoll failed: using btoneill's targetmaker
To: bill fumerola <billf at mu.org>


On 11/14/06, Yu Safin <calanet at gmail.com> wrote:
> On 11/14/06, bill fumerola <billf at mu.org> wrote:
> > On Tue, Nov 14, 2006 at 03:21:37PM -0500, Yu Safin wrote:
> > > This is what I get when I run rtgpoll.
> > > I am running SLES 10.  I will read about strace to see how I can use it.
> >
> > you might not need it quite yet:
> >
> > > caplan:/usr/local/rtg/bin # ./rtgpoll -d -vvv -t /opt/rtg/etc/targets.cfg
> > >
> > > caplan:/usr/local/rtg/bin # tail -10 /var/log/localmessages
> > > Nov 14 15:01:54 caplan rtgpoll: RTG version 0.8.1 starting.
> > > Nov 14 15:01:54 caplan rtgpoll: Daemon detached
> > > Nov 14 15:01:54 caplan rtgpoll: Checking another instance with pid 27266.
> > > Nov 14 15:01:54 caplan rtgpoll: PID 27266 is no longer running. Starting
> > > anyway.
> > > Nov 14 15:01:54 caplan rtgpoll: Using RTG config file
> > > [/usr/local/rtg/etc/rtg.conf].
> > > Nov 14 15:01:54 caplan rtgpoll: Initialize hash table pointers: 20000 bytes.
> > > Nov 14 15:01:54 caplan rtgpoll: Reading RTG target list
> > > [/opt/rtg/etc/targets.cfg].
> > > Nov 14 15:01:54 caplan rtgpoll: Successfully hashed [0] targets, (0 bytes).
> > > Nov 14 15:01:54 caplan rtgpoll: Error updating target list.
> >
> > /opt/rtg/etc/targets.cfg had no targets that succeeded. is it the same
> > targets file you were previously using? does it have all the required
> > fields for a successful poll?
> >
> > --
> > - bill fumerola / billf at FreeBSD.org
> >
> >
> >
> I ran BTONEILL's targetmaker that produced the /opt/rtg/etc/targets.cfg file.
> At the time I was running RTG 0.7.4 and it came to my attention that
> the targets.cfg I was using required the newer cvs version.
> So I did a "make clean" on the RTG 0.7.4 version, downloaded the cvs
> version and proceeded to install.
> I have never seen a valid targets.cfg since I am new to both RTG and
> BTONEILL's rtgtargmkr replacement so I apoligize for not being a big
> help.
> Please take a look at the following file and tell me if it is not correct.
> It was produced by targetmaker.   I do have a server by the name of
> lnxcapd at the address specified of 172.22.130.10.   My community's
> name is "public" and the snmpd daemon supports version 2.
>
> In the mean time, should I try to run rtgtargmkr.pl to see what it produces.
>
>
> caplan:/usr/local/rtg/bin # more  /opt/rtg/etc/targets.cfg
> # Generated 11/14/2006 13:57 by ./targetmaker
> # START lnxcapd
> host 172.22.130.10 {
>        community public;
>        snmpver 2;
> };
> # END lnxcapd
>
I went back and ran rtgtargmkr.pl.
It generated a targets.cfg.
I ran rtgpoll against this new targets.cfg and I am getting a new type
of errors.

caplan:/usr/local/rtg/etc # /usr/local/rtg/bin/rtgpoll -vvv -t
/opt/rtg/etc/targets.cfg
caplan:/usr/local/rtg/etc # targets failure on line 3 - syntax error
last token parsed: 172.22.130.10
caplan:/usr/local/rtg/etc #


The targets.cfg file:
caplan:/usr/local/rtg/etc # more /opt/rtg/etc/targets.cfg
# Generated 11/14/2006 16:07 by ./rtgtargmkr.pl
# Host  OID     Bits    Community       Table   ID      OOR     Description
172.22.130.10   .1.3.6.1.2.1.2.2.1.10.1 32      public  ifInOctets_1
 2       450000000
        (lo)
172.22.130.10   .1.3.6.1.2.1.2.2.1.11.1 32      public
ifInUcastPkts_1 2       450000000
        (lo)
172.22.130.10   .1.3.6.1.2.1.2.2.1.16.1 32      public  ifOutOctets_1
 2       450000000
        (lo)
172.22.130.10   .1.3.6.1.2.1.2.2.1.17.1 32      public
ifOutUcastPkts_1        2       4
50000000         (lo)
172.22.130.10   .1.3.6.1.2.1.2.2.1.10.2 32      public  ifInOctets_1
 3       450000000
0        (hsi0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.11.2 32      public
ifInUcastPkts_1 3       450000000
0        (hsi0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.16.2 32      public  ifOutOctets_1
 3       450000000
0        (hsi0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.17.2 32      public
ifOutUcastPkts_1        3       4
500000000        (hsi0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.10.3 32      public  ifInOctets_1
 4       450000000
0        (eth0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.11.3 32      public
ifInUcastPkts_1 4       450000000
0        (eth0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.16.3 32      public  ifOutOctets_1
 4       450000000
0        (eth0)
172.22.130.10   .1.3.6.1.2.1.2.2.1.17.3 32      public
ifOutUcastPkts_1        4       4
500000000        (eth0)


The execution of rtgtargmkr.pl:

caplan:/usr/local/rtg/etc # ./rtgtargmkr.pl
Poking lnxcapd (public) (32 bit)...
No id found for lo on device 1...adding.
No id found for hsi0 on device 1...adding.
No id found for eth0 on device 1...adding.
Done.


what I can conclude is that I should ignore the btoneill approach at this point.
However, I am not out of the woods due to the syntax error in line 3
in targets.cfg:
172.22.130.10   .1.3.6.1.2.1.2.2.1.10.1 32      public  ifInOctets_1
 2       450000000        (lo)

which is way beyond my ability.  why would rtgtargmkr.pl generate an
entry that would cause a syntax error?


More information about the RTG mailing list