plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
zheka
Posts: 44
Joined: Tue May 23, 2006 11:52 am

Re: Configmanager v6, what to do next, missing something

Post by zheka »

pepj wrote:
Do you really have no /var/tftp/switch02.conf?
- check the read/write rights
- In the "manage config view" when you click on the name of the config, you should see the hosts for this config and when you click on "show final configuration file"-ICON you should see the /var/tftp/switch02.conf that will be used by pancho.
- check the "configuration-->settings-->Up/Download TAB". Do you have insert "TFTP path" and "program" parameters (example windows program="pathperl/bin/perl.exe -Ipath/pancho/lib path/pancho/pancho.pl"

How to check pancho at the command line:
...perl\bin\perl.exe -I...\pancho\lib ...\pancho\modules\blib\lib\pancho.pl --download --config ....\tftp\data\yourconfig.conf
Hi Jean-Michel!

I'm a bit closer to the solution, thanks to you man, you rock.
My problem was with the user name running tftp daemon. Having it resolved I was able to save config files from CISCO devices manually.

And of course I finally got the switch02id6.conf file show up in my tftp root. Now if I run the command:

perl -I/usr/local/bin /usr/local/bin/pancho --download --config ./Switch02id6.conf

I end up with the error message:

ERROR (10.0.0.131): Received noSuchName(2) error-status at error-index 1

Does it mean the host 10.0.0.131 is inaccassible from the cacti box?

Many-many thanks in advance
Eugene
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Configmanager v6, what to do next, missing something

Post by pepj »

zheka wrote: ERROR (10.0.0.131): Received noSuchName(2) error-status at error-index 1
Does it mean the host 10.0.0.131 is inaccassible from the cacti box?
No, it can reach it. It is the RFC-error for SNMP that tell you your community is not the right one. (sometimes it could be a problem for some old IOS when you have a space or some special char in your community)

Code: Select all

                     noError(0),
                     tooBig(1),
                     noSuchName(2),
                     badValue(3), 
                     readOnly(4),
                     genErr(5),
                     noAccess(6),
                     wrongType(7),
                     wrongLength(8),
                     wrongEncoding(9),
                     wrongValue(10),
                     ....
                     authorizationError(16),
                     notWritable(17),
                     inconsistentName(18)
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
zheka
Posts: 44
Joined: Tue May 23, 2006 11:52 am

Post by zheka »

Jean-Michel, it is getting like an endless race :-?

I got rid of the previous error message and now I have this one:

ERROR (10.0.0.131): Source Configuration doesnt exist

What I did to get rid of ERROR (10.0.0.131): Received noSuchName(2) error-status at error-index 1 was changing read-only community string to the read-write one. I can query the cisco switch in question with

snmpwalk -v1 -c readwrite 10.0.0.131 and it answers with lots of MIBs.

Do I deal with the same RFC error for SNMP?

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

Post by pepj »

zheka wrote: I was changing read-only community string to the read-write one.
Yes, it is normal. Configurations can be read only with read-write rights per default
zheka wrote: ERROR (10.0.0.131): Source Configuration doesnt exist
It seams the device has not the file requested by the MIB-request. What type of device and software you have ?

If Cisco you could try to do a download manually like described in post
http://forums.cacti.net/viewtopic.php?t ... &start=120
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
zheka
Posts: 44
Joined: Tue May 23, 2006 11:52 am

Post by zheka »

Well, the device is a regular CISCO switch 2950 IOS 12.1.

Unfortunately I don't have an account at CISO to see the page provided at the link.

Will this snmpset command allow to create the file that I want to download with pancho ?

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

Post by pepj »

zheka wrote:the device is a regular CISCO switch 2950 IOS 12.1.
Pancho has no problem with this type of devices. I have some of them too and have no problem for up/downloading.
zheka wrote:Will this snmpset command allow to create the file that I want to download with pancho ?
Direct snmp download without pancho ... pure snmp commands (in fact what pancho do) ...
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
User avatar
adrianmarsh
Cacti User
Posts: 437
Joined: Wed Aug 17, 2005 8:51 am
Location: UK

Post by adrianmarsh »

I'm about to start experimenting with this.. I've a Linux Cacti system. So far the install has gone ok, but when I try to access any of the gui options (eg manage configs), I get a popup "error no right", and an entry in the log: 25/04/2007 01:04:34 WARNING: wrong authetification from host 192.168.50.53

What authentication is it talking about?

EDIT: Ok, figured out that I *had* to put the IP into secure.cfg, even though it says that no ip would allow any host..
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Multi Method Logging

Post by cjennings_cr »

I was, until recently, using the PANCHO method to download configs from my Cisco Routers and Switches. When I had the need to also download Cisco PIX devices, I found that PANCHO would not work for this. So, I deviated from PANCHO and began to create some TCL/Expect scripts to perform this task (because the default scripts included with ConfigManager do not account for "Enable" passwords when using pscp). I successfully created these scripts and have them running as needed. However, I have a "need" for the script-to-ConfigManager interaction:
In PANCHO, when a script ran, it outputted information to the screen in the form of:

Code: Select all

SUCCESS: copied {host}:running-config to {tftp host}:{path}{filename}
or

Code: Select all

ERROR ({host}): {error description}
This information would show up as a log entry in ConfigManager as a successful copy (or error if there was one)

I have created my TCL/Expect scripts to output the the results of the scripts in the exact same format as PANCHO. How can I have these results show up in the log file like they did when I was using PANCHO?

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

Re: Multi Method Logging

Post by pepj »

Sorry for the late answer, I was very busy
cjennings_cr wrote:ConfigManager do not account for "Enable" passwords when using pscp).
Why don't you want to use user password on the PIX (it would be more secure with ssh/scp) ? (ip scp enable must be activated if you use scp)
cjennings_cr wrote: I successfully created these scripts and have them running as needed. However, I have a "need" for the script-to-ConfigManager interaction:
the output could be written in the file "cfgmng_logfile.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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Beta 0.7 with pure PHP TFTP download/upload

Post by pepj »

The BETA release of 0.7 is http://cactiusers.org/forums/viewtopic.php?p=3708#3708


There is the Beta 0.7 with pure PHP TFTP (release 0.6x with additionally the possibility to download/upload with TFTP without Pancho)

- You have to install (copy) first the "sharednetworkclass" for example under "plugins\sharednetworkclass" otherwise you will have to change the path in the config.php of configmanager

- install the configmanager 0.7
- in the setting you have to active the possibility to use TFTP pure PHP
- in the setting you have to give the paths to the snmpset and check the parameters
- In each config you want use TFTP pure PHP instead Pancho click in the field "pure tftp without pancho".

PS: I have tested it with Cisco and Foundry. It would be nice if someone could tell me if nortel and the other are OK.

PS: The sharednetwork class can be used for a lot of more snmp functions. See the examples
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
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Re: Multi Method Logging

Post by cjennings_cr »

PEPJ wrote:Why don't you want to use user password on the PIX (it would be more secure with ssh/scp) ? (ip scp enable must be activated if you use scp)
My TCL/Expect script is written to use PLINK (ssh) - so the security thing is a non-issue.
PEPJ wrote:the output could be written in the file "cfgmng_logfile.txt"
Are you saying that I just redirect the output to this file and it will automatically show up in the log - each line as a separate entry?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Multi Method Logging

Post by pepj »

cjennings_cr wrote:
PEPJ wrote:the output could be written in the file "cfgmng_logfile.txt"
Are you saying that I just redirect the output to this file and it will automatically show up in the log - each line as a separate entry?
Yes, after the refresh time the log view will read this file.
PS: in order to be well presented you have to had the time YYYY-MM-DD hh:mm:ss at the begin of the line (see example in the log) and you could add some words to change the color like ERROR (to see in red), SQL(light blue), STATS(light green), WARN (gold), DEBUG(green)
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
User avatar
cjennings_cr
Posts: 20
Joined: Thu Jan 06, 2005 8:09 am
Contact:

Post by cjennings_cr »

THANKS!! - worked like a charm!
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

Here is the Beta 0.71 with pure PHP TFTP

(add Nortel binary and ascii, Passport 8x00)
- You have to install (copy) first the "sharednetworkclass version0.31" for example under "plugins\sharednetworkclass" otherwise you will have to change the path in the config.php of configmanager

- install the configmanager 0.71
http://cactiusers.org/forums/viewtopic. ... c&start=90
- in the setting you have to active the possibility to use TFTP pure PHP
- in the setting you have to give the paths to the snmpset and check the parameters
- In each config you want use TFTP pure PHP instead Pancho click in the field "pure tftp without pancho".

PS: I have tested it with Cisco and Foundry. It would be nice if someone could tell me if nortel and the other are OK.

PS: The sharednetwork class 0.31 can be used for a lot of more snmp functions. See the examples
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: plugin for download/upload routers switches configuratio

Post by pepj »

pepj wrote:(you need the pugin architechture)

Configmanager plugin
current version 0.6
beta version 0.71 (no need of pancho for all methods) under http://cactiusers.org/forums/viewtopic.php?p=3731#3731
new changes:
- traps/syslog detection with activation of the config for the host which receiveed the trap.

next developpement:
- pure php module for TFTP if whished (no need of pancho)

Explanation:
With this plugin you can easily schedule the download/upload of the configuration of your routers, switches AND NOW any devices (or change in one click some parameters of hundert of switches ... dangerous but possible now). It should function for all type of router or switches.
There is two method "TFTP" and "multi".
- "TFTP" is based of "pancho" www.pancho.org.
- "multi" can use any scripts or SCP, FTP, SFTP.
The syslog(haloe plugin) and traps could active the download of the pancho config or script for the host which has received a specific event and which the "trap event flag" is active.

read first the manual.txt in the zipped file

(for windows) copy the diff.exe and gzip.exe into /plugins/configmanager
if you don't have one.
I cannot put it in the package because the max upload in this forum is 256

UPGRADE: for upgrading
- take care about your own secure.cfg and securecompare.cfg files and your scripts under 'plugins/configmanager/scripts if you have some
- (NO MORE NEEDED database_upgrade.php )

You see some views (and the full release including gzip.exe and diff.exe) in :
http://cactiusers.org/forums/viewtopic.php?p=1020#1020 or here below

- syslog/traps event activation
- new logs,
- display of no more used devices
- simplify GUI of TFTP method
- update/installation of SQL DB automatically (wait only 5 minutes)
- format for compatibility with plugin update
- possibility to change the TFTP server for each configmanager config (will solve NAT problem)

I will put in this post always the latest release.
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