Perl SNMP polling script

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

helqud

Post by helqud »

crazily wrote:Hello rcnavas

First of all, spine.pl is a very good alternative to speeding up cacti.

I just have a little problem.
The InterfaceIndex-Numbers of the switches, routers,.... do change when I reboot them.

Now I would to fix it, that cacti don't see about the InterfaceIndex-Number, separate about the InterfaceDescription.

After 2 days looking after this problem, I have found that it function with the cmd.php, but not with the spine.pl.

Now I think, that this is because of the perl-script.

Could you say me, what I have to change in the script ??
Or could you made it and place it then in this forum ??
(I don't have know-how in perl)

I hope, this will help me.

Thank you in advance.

greets
crazily
It isn't the script, it just takes and snmp inst and polls the router/switch. Some vendors equipment (cisco catalyst switches, perhaps others) change the inst number on reboot to take into account added vlans etc. If it is a cisco router, you can use "snmp-server ifindex persist" to keep the ifindex the same on reboots. I believe the switches have a similar command as well, depending on the IOS/CatOS version.

-dallas
Leandro

Post by Leandro »

VeSS wrote:Does anyone know if this will support the 0.80 code?
My life depends on this answer... :D

Thanks.
marijonas
Posts: 31
Joined: Tue Jan 13, 2004 10:16 am

problems launching spine.pl

Post by marijonas »

I tried to launch spine.pl and I've got an error:
DBD::mysql::st execute failed: Table 'cacti.rrd_ds' doesn't exist at ./spine.pl line 53

I'm not very good on Perl programming so asking you for a help. Any hints or explanaitions.


Thanks in advance
irfan dp

Update spine.pl for cacti 0.8.X ?

Post by irfan dp »

Is there any update about spine.pl for cacti 0.8.X ?
It seems that cacti 0.6.8 and 0.8.X have different Mysql table structure.

cheers,
irfan dp
DrsDre
Posts: 1
Joined: Sun Dec 05, 2004 3:17 pm
Contact:

Maximum simultaneous requests

Post by DrsDre »

I'm wondering what would be the maximum amount of object be that you could query through the non-blocking at the same time.

In my situation I have 26000 devices on a WAN network which in certain situations can bo unstable. dispatching more then 500 queries at the same time makes a lot of queries time-out even when they are available (for example when I dispatch per 100 devices it seems ok.

I had to add

Code: Select all

        # Dispatches the SNMP queries in batches
        $_SNMPQUERYCOUNT += 1;
        if ($_SNMPQUERYCOUNT > 'batchsize') {
                $_SNMPQUERYCOUNT = 0;
                Net::SNMP->snmp_dispatcher();
        }
in the main 'while' loop after the '$result = $snmp->get_request(' statement.
FragKing
Posts: 28
Joined: Thu Jul 01, 2004 1:43 am
Location: Zurich, Switzerland
Contact:

cactid

Post by FragKing »

Have you tried using cactid yet?
Maybe it's the solution to go for you...

http://www.cacti.net/cactid_info.php

Regards
Michel
User avatar
MagnaChef
Cacti User
Posts: 164
Joined: Tue Nov 25, 2003 3:58 pm
Location: Buffalo, NY

Re: problems launching spine.pl

Post by MagnaChef »

marijonas wrote:I tried to launch spine.pl and I've got an error:
DBD::mysql::st execute failed: Table 'cacti.rrd_ds' doesn't exist at ./spine.pl line 53

I'm not very good on Perl programming so asking you for a help. Any hints or explanaitions.


Thanks in advance
Was there any resolution to this?
goodluck
Posts: 2
Joined: Tue Nov 28, 2006 9:59 pm

Post by goodluck »

# perl spine.pl
DBI connect('host=localhost;database=cacti','cacti',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) at spine.pl line 40

why????
goodluck
Posts: 2
Joined: Tue Nov 28, 2006 9:59 pm

Post by goodluck »

perl spine.pl
Use of uninitialized value in concatenation (.) or string at spine.pl line 140.
DBD::mysql::st execute failed: Table 'cacti.rrd_ds' doesn't exist at spine.pl line 53.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Oh, this is a very old thread, and I suppose that this hack is not officially supported. For faster polling, please consider using cactid which is officially supported and which is very fast, indeed
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests