plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

ddonohue wrote:snmp problem
the snmp download is based for cisco on http://www.cisco.com/en/US/customer/tec ... 4aa6.shtml

snmpset -v 1 -c private <device name> ccCopyProtocol.<random number> integer 1
ccCopySourceFileType.<Random number> integer 1
ccCopyDestFileType.<Random number> integer 3
ccCopyServerAddress.<Random number> ipaddress "<server ip address>"
ccCopyFileName. <Random number> octetstring "<file name>"
ccCopyEntryRowStatus.<Random number> integer 4

or
snmpset -v 1 -c private <device name>
.1.3.6.1.4.1.9.9.96.1.1.1.1.2.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.3.<Random number> integer 4
.1.3.6.1.4.1.9.9.96.1.1.1.1.4.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.<Random number> ipaddress "<server ip address>"
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.<Random number> octetstring "<file name>"
.1.3.6.1.4.1.9.9.96.1.1.1.1.14.<Random number> integer 4


So if you send each of these commands on the router it should start the download
(But I prefer to use pancho .......)
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

What version of SNMPSET are you using? that doc from cisco, says it assumes you are using HPOV Snmpset.

donohue.
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

Pepj,

I understand what you say but It's not OK to run

First I have changed my configmanager and I think it's Ok.(you can see the confimanager.doc)
When I open /usr/local/tftp/configmangerid1.conf I see that file:
-------------------------------------
[global]
TftpServer=172.21.2.45
TftpRoot=/usr/local/tftp/
TftpPath=20060719
LogFile=/usr/local/tftp/configmanagerid1.conf.log
ForkLimit=10
StylePattern=::HOST::.::DATE::.confg
StyleDate=%Y%m%d
SnmpVersion=1
SnmpRetries=1
SnmpWait=5.2
SnmpMtu=1500
SnmpDebug=0
SnmpCommunity=public
[172.16.5.17]
IpAddress=172.16.5.17
pre=if test -d '/usr/local/tftp/20060719' then mkdir /usr/local/tftp/20060719 fi
----------------------------------------
But when you say that i have two icons one for the config file(Ok) and one for the log(not ok) perhaps because I have not the matrac pluging?

And the big problem is that I don't see the file download in /usr/local/tftp/%y%%m%%d% it seems that pancho is not running for the dowloading because my log for Pancho doesn't change.
Attachments
configmanager.doc
(124 KiB) Downloaded 344 times
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

And i have forgotten moreover the directory /usr/local/tftp/20060719 is not created so the pre command doesn't work.
If you hav eany idea for this pb let me a message.

Thank pepj :-)
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

One more question my pancho file has to be in a specifique place under unix?
Perhaps is it the pb but I don't think so.
One more time the pre command has to be done and I see nothing and no directory is created.

And when I use pancho manualy with a command like that :
pancho --download
All is ok I see the Log and the download file.


Thank a lot pepj and if someone have the same problem could you help me.
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

And in the setting tabs in CACTI what does it stand for exactly

perl -Id:\programme\pancho\lib pancho.pl

Thank for time that you pend pepj :-)
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

And in the setting tabs in CACTI what does it stand for exactly

perl -Id:\programme\pancho\lib pancho.pl

Thank for time that you spend pepj :-)
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

jduchesne wrote:And in the setting tabs in CACTI what does it stand for exactly

perl -Id:\programme\pancho\lib pancho.pl

Thank for time that you spend pepj :-)
This is actually the path to the pancho lib,

ie,

D:\programme\pancho\lib
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

jduchesne wrote:And in the setting tabs in CACTI what does it stand for exactly
perl -Id:\programme\pancho\lib pancho.pl
I think you 've found your problem, parameter "program" in settings.

can you say me what you have in the setting for the parameter "program"?
This parameter is the full path to be executed for starting pancho (the other parameters are added to this command).
So for my windows I have "D:/Programme/perl/bin/perl.exe -Id:/programme/pancho/lib d:/programme/pancho/pancho.pl" because my pancho is under "d:/programme/pancho/" and my perl is under "D:/Programme/perl/bin/".

Because you have an unix you have to insert:
If you use "cactid" (insert the full path when it is not ok with relative paths)
ex: /usr/.../bin/perl -I/usr/.../pancho/lib /usr/.../pancho/pancho.pl
or
/usr/.../bin/perl /usr/.../pancho/pancho.pl

If you use "cmd.php" you can use relativ path
ex: perl -I/usr/.../pancho/lib /usr/.../pancho/pancho.pl
or
perl /usr/.../pancho/pancho.pl

PS: I have to explain better the installation procedure for the settings in the manual.txt.
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

It's good ouf!!! :-)

Thank a lot for all your reply.
You have solve my problem it was in setting tab in my programm.

The last question I work in cisco so if I want to download the startup-config or the running-config how can I choose this option?

Because in pancho when I download it's the running-config that I saved so is it possible to choose the startup-config?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

jduchesne wrote:Because in pancho when I download it's the running-config that I saved so is it possible to choose the startup-config?
At this time I have not implemented this choice,

but I will do it (I had forgotten this possibility) at the next release. I have not a lot of time now.

PS: If you always want the startup config and cannot wait, you could change the following line in "configmanager_gatewaytoprogram.php":
(in function configmanager_createparameter)
line number 117

$param2= ($updown=="upload") ? "--upload --filename ".$uploadfile : "--download";
---->change to ----->
$param2= ($updown=="upload") ? "--upload --filename ".$uploadfile : "--download --start ";
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

pb

Post by jduchesne »

Pepj I have some error in my log in cacti .can you take a look please?

I try to make a pre command but it doesn' t work but only with pancho it works so I probably make a mistake but I don't know where.

thank a lot pepj
Attachments
cactipb.doc
(114 KiB) Downloaded 277 times
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: pb

Post by pepj »

jduchesne wrote:Pepj I have some error in my log in cacti .can you take a look please?

I try to make a pre command but it doesn' t work but only with pancho it works so I probably make a mistake but I don't know where.
The created pancho config is OK. The started command too (on the log).

some trivial questions (only to be sure)
- has the user, who run cacti, the right to change your directory ?
- executable?

Try to add "sh " before your command.

PS: for testing you can change this config "xxx.conf" file and start pancho directly from the command:
perl pancho/pancho.pl -download -config nameoftheconfigmanager.conf
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

To ddonohue

Could you solve the snmp problem ?
with snmpset v 1 -c rw-string router 1.3.6.1.2.1.1.4.0 s thisisthenewcontact

and
with pancho
Jean-Michel
cacti 0.8.7e | cmd & cactid (cactid 0.8.x) | Linux | MySQL Ver 14.7 Distrib 4.1.12, for Win32 | PHP v5.2.6 | Apache v2.x | Thold | Plugin Architecture | plugin "configuration manager" http://cactiusers.org/forums/topic257.html | plugin "IP subnet calculator IPv4 / IPV6" http://forums.cacti.net/viewtopic.php?t=15428 | plugin banner http://docs.cacti.net/userplugin:banner | Net-SNMP 5.5.2 | cygwin 1.5.18 of 02.07.2005
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

i havn't had any time to really play with this in the past 2-3 weeks. I recently had a AS400 arrive at my location so i've been doing some network re-arranging/vlan'n in order to get things working for us. I'll be back to this in a week or so.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests