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 »

jherrinike wrote:I am still getting this when I try to run pancho.
Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 84.
......
Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 101.
Execution of /usr/local/bin/pancho aborted due to compilation errors.
I think it is a problem of a missing package as we discuss at http://forums.cacti.net/viewtopic.php?t ... c&start=60.
It should be "Config-IniFiles-2.30" when you are using the makefile in pancho/modules, but I am working with the 2.38 installed in my perl.

Have you check your ppm ? You should have 2.30 (I have 2.38)
"ppm> query Config-IniFiles
Querying target 1 (ActivePerl 5.8.6.811)
1. Config-IniFiles [2.38] A module for reading .ini-style configuration file"
when you have a another release as 2.30 you should do
+ change
- makefile.pl, ('Config::IniFiles' => '2.30',)
- execute it, "perl makefile.pl"
- start the makefile
+ or change directly the makefile you have now or search in your makefile "IniFiles.pm" and put it where pancho expect it to find. (for example something like pancho/blib/lib/InitFiles.pm)

(I am not a makefile specialist ...)

PS: what do you have at /usr/local/bin/pancho line 84?

PS: I think I will integrate the snmp-request (like in pancho) directly in the configmanager in order to bypass pancho. At this time I have no time, but I think it is now a need.
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 »

Sorry pepj

But I can't .You can see my user management.
I probably made a mistake but I can't say where


Thank pepj
Attachments
usermanagement.doc
(80 KiB) Downloaded 384 times
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

Pepji, Thanks, you were right, i was stupid.

now, i'm getting the same error,

ERROR (10.x.x.x): Received noSuchName(2) error-status at error-index 1 <== Cisco

this is on a 6509.

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

Post by pepj »

ddonohue wrote:now, i'm getting the same error,
ERROR (10.x.x.x): Received noSuchName(2) error-status at error-index 1 <== Cisco
this is on a 6509.
It is either a SNMP community string problem or a right on the router ACL or rw right for this community. You need read-write right for downloading a configuration.
(http://www.pancho.org/faq.html)
Last edited by pepj on Thu Jul 13, 2006 4:24 pm, edited 1 time in total.
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 »

jduchesne wrote: But I can't .You can see my user management.
I probably made a mistake but I can't say where
As I can see you have no other plugins
could you try to active the simpliest plugin http://wotsit.thingy.com/haj/cacti/links-plugin.html which allow to add other links or the Monitor plugin (http://cactiusers.org/).
I am not sure your plugin architecture is ok because in order to see the check box for the realm of configmanager in the user management, you only need to do "step4; I put $plugins[] = 'configmanager' ". When you only do this you should already see the checkbox.
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 »

if it isn't one thing, it's another.

Received wrongValue(10) error-status at error-index 4

When trying to run via TFTP.

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

Post by pepj »

ddonohue wrote: Received wrongValue(10) error-status at error-index 4
When trying to run via TFTP.
Do you have 650x IOS or CatOS ?
can you try first on a other switch ?
can you send you configfile and log? you can change the community to XXX
Which snmp version are you trying ?

can you execute directly from command-shell:
.../bin/perl.exe -I.../pancho/lib .....pancho/pancho.pl -download -config nameoftheconfigmanager.conf
(-I.../pancho/lib could be omitted)
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 »

6509 IOS,

I don't have another layer 3 switch to give it a try on. Which configfile and log do you want? I've tryed SNMP2 and 1.



impreza:/cacti-0.8.6h/log # perl /usr/local/bin/pancho --download --config /data/configmanagerid7.conf

ERROR (10.xxx.xxx.xxx): Received wrongValue(10) error-status at error-index 4 6509


ERROR (10.xxx.xxx.xxx): Received wrongValue(10) error-status at error-index 4 6509

ERROR (10.xxx.xxx.xxx): No Response - 2948G

donohue
User avatar
Viggy
Posts: 23
Joined: Fri Sep 16, 2005 5:15 pm
Location: MI, USA

No output from within Cacti

Post by Viggy »

I had this running before, but now I have run into trouble

I am running version 4e on linux.

I installed Pancho and it works from the command line. I try running it from within Cacti and I can see the command being run from the log file. but nothing shows up in the TFTP directory.


I then switched to SCP and Linux and had the same result (or Lack)
I can run the SCP command from the command line and get a file downloaded, but from within cacti nothing happens. I can see that the poller is trying to run the command from the output of the Cacti Log file.

Any one else seen this?
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

Post by jduchesne »

hello pepj,

sorry but i have other problem.
First all are ok I see the configure configmanager and I add it (ouf!)

I can compare two files it's ok.

But when I try to manage configs I have an error message

ERROR NO RIGHT!!

so how can i access to the manage configs with no error?

If you need to have my files and the configuration to understande say me and I give what you want.

thank for all
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

jduchesne wrote:hello pepj,

sorry but i have other problem.
First all are ok I see the configure configmanager and I add it (ouf!)

I can compare two files it's ok.

But when I try to manage configs I have an error message

ERROR NO RIGHT!!

so how can i access to the manage configs with no error?

If you need to have my files and the configuration to understande say me and I give what you want.

thank for all
This is in regards to your secure file. you need to add in the secure file with your ip address.

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

Post by pepj »

ddonohue wrote:6509 IOS
ERROR (10.xxx.xxx.xxx): Received wrongValue(10) error-status at error-index 4 6509
donohue
Could you post your configmanagerid7.conf ?
Thanks
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

Re: No output from within Cacti

Post by pepj »

Viggy wrote:I had this running before, but now I have run into trouble
What do you mind before ? which version.
I try running it from within Cacti and I can see the command being run from the log file. but nothing shows up in the TFTP directory.
Could you check if you see something in the log of pancho ? (you can click on the log-file icon in the configmanager for this configuration)
I then switched to SCP and Linux
Under linux scp could be a problem of key (see http://forums.cacti.net/viewtopic.php?t ... c&start=75)

Perhaps it could be a problem of parameters because I had changed the way to push a command before or after the tftp download, because there could be a synchronisation problem when the TFTP download was not finished.
Now you can put the parameter in the config. Here an example for me:
- I download in a path like d:/data/20060714 (the date change each day), my TFTP root is d:/data
- path for configurations files ---> d:/data
- fileformat for the uploaded/downloaded file ---> ::HOST::.::DATE::.cfg
- pre command in pancho ---> If not exist d:\\data\\%y%%m%%d% mkdir d:\\data\\%y%%m%%d% (it is windows for unix it should be if test -d '/data/%y%%m%%d%'; then mkdir /data/%y%%m%%d% fi)
- I have no post command (you need a sleep when you use it because the TFTP is asynchrone)
To notice: some TFTP can not download when the path it is not under the tftp-root-path

PS: in order to be sure .... is your config "active" ?

PS: you can reset the first time in order to execute the download in five minutes in selecting in the first view "http://your-cacti/plugins/configmanager ... anager.php" the action "Choose an action: reset last run time".
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've since, read from somewhere, that your TFTP Server can't be 127.0.0.1, ie Localhost, so now i'm just getting a time out.

cacti@impreza:~/plugins/configmanager> perl -I/usr/local/src/Pancho-9.3.9/lib /usr/local/bin/pancho --download --config /data/configmanagerid7.conf

ERROR (10.xxx.xxx.2): Network timeout


ERROR (10.xxx.xxx.3): Network timeout


ERROR (10.xxx.xxx.250): No Response


[global]
TftpServer=10.xxx.xxx.108 <- Cacti Server
TftpRoot=/data
TftpPath=/data/
LogFile=/data/configmanagerid7.conf.log
ForkLimit=10
StylePattern=::HOST::.::DATE::.cfg
StyleDate=%Y%m%d
SnmpVersion=2c
SnmpRetries=1
SnmpWait=5.2
SnmpMtu=1500
SnmpDebug=0
SnmpCommunity=SNMPCOMMUNITY HERE
[10.xxx.xxx.2]
IpAddress=10.xxx.xxx.2
[10.xxx.xxxx.3]
IpAddress=10.xxx.xxx.3
[10.xxx.xxx.250]
IpAddress=10.xxx.xxx.250
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

ddonohue wrote:i've since, read from somewhere, that your TFTP Server can't be 127.0.0.1, ie Localhost, so now i'm just getting a time out.
It is not my TFTP ... but it is normal !!! Yes because the command is executed by the switch/router so he cannot find localhost !!!!

It seems your TFTP (server) cannot reached the router.
Try this:
- download the script for Cisco, cisco11.sh or cisco12.sh, in http://www.pancho.org/archives/contrib/ (for your IOS version)
- change the values (router,string,server,file)
- execute it.

It is a script of the creator of pancho for testing if your switch/router respond to the snmprequest and download the config file.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests