plugin for download/upload routers switches configuration
Moderators: Developers, Moderators
Re: how can i check if the view for version 2 allow...?
Sorry to bring back an old thread, but I think I found what's going on. I was having the same problem as fernandakp, and what it turned out that in Linux the default OID output format for PHP-SNMP is full instead of numeric. That's why Net-SNMP would return something different than PHP-SNMP. So when the SysObject ID was being returned it was coming back as "SNMPv2-SMI::enterprises.9.1.516" for my C3750 instead of ".1.3.6.1.4.1.9".pepj wrote:Here again.....fernandakp wrote:I couldn t make it work neither.
I don't understand why you have not the same answer with and without NetSNMP, perhaps the MIBS settings.
So what I did to fix that was added snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC); to lines 436, 519, 612, and 702 in the snmpclass.php file (basically after every snmp_set_quick_print(0); line).
pepj, can you see any issues I may run into doing this? I imagine you want numeric SNMP values and not full ones so I hope what I did will be okay.
Re: how can i check if the view for version 2 allow...?
OK ... thanks ... I will add it for the next release.warnesj wrote: in Linux the default OID output format for PHP-SNMP is full instead of numeric. That's why Net-SNMP would return something different than PHP-SNMP. So when the SysObject ID was being returned it was coming back as "SNMPv2-SMI::enterprises.9.1.516" for my C3750 instead of ".1.3.6.1.4.1.9".
So what I did to fix that was added snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC); to lines 436, 519, 612, and 702 in the snmpclass.php file (basically after every snmp_set_quick_print(0); line).
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
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
Can you try it?StarLog wrote:Anyone using this on DELL 53xx or 34xx or 62xx switches.?
I will try to test it on CactiEZ v0.3 with those switches.
a/ method TFTP with pancho I think it will not work ... only PowerConnect (MIB 1.3.6.1.4.1.674.10895) has been impemented in pancho.
b/ method TFTP pure PHP (sharednetworkclass) you have to try, I have programmed it like a blind with only some MIBs. If you have better MIBs and give me feedback, I could correct bugs. Try first directly with the sharednetworkclass example8 and give me feedback.
c/ with method multi (scripts) it should work (because with scripts its always possible) if you adapt the scripts of cisco for example. You can also explain me exactly how you do a download manually and I can help you to create the scripts.
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
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
Hi,
After make ConfigManager work with Pure TFTP mode (without Pancho), I'm trying to use it with pancho. Pancho compiled and has been installed successfully (in /usr/local/bin). I defined the task to download some Cisco switchs and router configuration but It doesn't work. Here are some information :
My config :
2008-02-27 11:40:04 INFO: /IAS-NCY_backupid2.conf.log has 1 of 4 devices with a reported status. Not copying logfile yet.
2008-02-27 11:40:02 DEBUG: exec_background(pancho --download --config /IAS-NCY_backupid2.conf).
2008-02-27 11:40:02 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 11:40:02 INFO: execute the upload/download configuration 2 (/IAS-NCY_backupid2.conf) with Pancho.
2008-02-27 10:45:04 INFO: /IAS-NCY_backupid2.conf.log has 1 of 4 devices with a reported status. Not copying logfile yet.
2008-02-27 10:40:04 DEBUG: exec_background(pancho --download --config /IAS-NCY_backupid2.conf).
2008-02-27 10:37:03 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:37:31 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:40:04 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:40:04 INFO: execute the upload/download configuration 2 (/IAS-NCY_backupid2.conf) with Pancho.
)
[binair] => 0
[usepancho] => 1
[accepttrap] => 0
[tftp] => 192.168.169.7
[startup] => 0
[commit] => 0
[templatename] =>
[fileformat] => ::HOST::.::DATE::.cfg
[post] =>
[pre] =>
[command] =>
[lastused] => 0000-00-00 00:00:00
[snmp_community] => pilou
[snmp_password] =>
[snmp_username] =>
[snmp_version] => 1
[sun] => 1
[sat] => 0
[fri] => 0
[thu] => 0
[wed] => 0
[tue] => 0
[mon] => 0
[monthly] => 0
[state] => up
[fileupload] =>
[pathdata] =>
[path] =>
[date] => 2008-02-27 10:36
[up_download] => download
[configtype] => tftp
[name] => IAS-NCY_backup
[id] =>
In ConfigManager settings, I defined the path to Pancho (pancho Settings for TFTP method. --> program) as "pancho" (without quotes). Is it good ?
Any tips?
Thanks,
Vincent
After make ConfigManager work with Pure TFTP mode (without Pancho), I'm trying to use it with pancho. Pancho compiled and has been installed successfully (in /usr/local/bin). I defined the task to download some Cisco switchs and router configuration but It doesn't work. Here are some information :
My config :
Logs from configManager :Cacti Version - 0.8.7a
Plugin Architecture - 1.4
Poller Type - Cactid v
Server Info - Linux 2.6.18-6-686
Web Server - Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch10 mod_perl/2.0.2 Perl/v5.8.8
PHP - 5.2.0-8+etch10
PHP Extensions - zip, xmlwriter, libxml, dom, xmlreader, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard, Reflection, posix, mime_magic, mbstring, json, iconv, hash, gettext, ftp, filter, exif, dba, date, ctype, calendar, bz2, bcmath, zlib, pcre, openssl, apache2handler, gd, mysql, mysqli, PDO, pdo_mysql, snmp
MySQL - 5.0.32-Debian_7etch5-log
RRDTool - 1.2.15
SNMP - 5.2.3
Plugins
- Update Checker (update - v0.4)
Host Info (hostinfo - v0.2)
Device Monitoring (monitor - v0.8.2)
Network Tools (tools - v0.2)
PHP Network Weathermap (weathermap - v0.941)
Configuration manager (configmanager - v0.75)
Network Discovery (discovery - v0.8.3)
Syslog Monitoring (syslog - v0.5.2)
Global Plugin Settings (settings - v0.3)
SuperLinks (superlinks - v0.72)
RRD File Cleaner (RRD Cleaner - v0.32)
Report Creator (reports - v0.3)
2008-02-27 11:40:04 INFO: /IAS-NCY_backupid2.conf.log has 1 of 4 devices with a reported status. Not copying logfile yet.
2008-02-27 11:40:02 DEBUG: exec_background(pancho --download --config /IAS-NCY_backupid2.conf).
2008-02-27 11:40:02 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 11:40:02 INFO: execute the upload/download configuration 2 (/IAS-NCY_backupid2.conf) with Pancho.
2008-02-27 10:45:04 INFO: /IAS-NCY_backupid2.conf.log has 1 of 4 devices with a reported status. Not copying logfile yet.
2008-02-27 10:40:04 DEBUG: exec_background(pancho --download --config /IAS-NCY_backupid2.conf).
2008-02-27 10:37:03 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:37:31 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:40:04 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-27 10:40:04 INFO: execute the upload/download configuration 2 (/IAS-NCY_backupid2.conf) with Pancho.
)
[binair] => 0
[usepancho] => 1
[accepttrap] => 0
[tftp] => 192.168.169.7
[startup] => 0
[commit] => 0
[templatename] =>
[fileformat] => ::HOST::.::DATE::.cfg
[post] =>
[pre] =>
[command] =>
[lastused] => 0000-00-00 00:00:00
[snmp_community] => pilou
[snmp_password] =>
[snmp_username] =>
[snmp_version] => 1
[sun] => 1
[sat] => 0
[fri] => 0
[thu] => 0
[wed] => 0
[tue] => 0
[mon] => 0
[monthly] => 0
[state] => up
[fileupload] =>
[pathdata] =>
[path] =>
[date] => 2008-02-27 10:36
[up_download] => download
[configtype] => tftp
[name] => IAS-NCY_backup
[id] =>
In ConfigManager settings, I defined the path to Pancho (pancho Settings for TFTP method. --> program) as "pancho" (without quotes). Is it good ?
Any tips?
Thanks,
Vincent
3/ Are you sure your TFTP is able to copy under / ????fata51 wrote:After make ConfigManager work with Pure TFTP mode (without Pancho),1/ Was it successful ? (if not see the same remarks as 3/)fata51 wrote:I'm trying to use it with pancho. Pancho compiled and has been installed successfully (in /usr/local/bin). In ConfigManager settings, I defined the path to Pancho (pancho Settings for TFTP method. --> program) as "pancho" (without quotes). Is it good ?
in settings please check the "tftp root path" and in the configuration "path for the data" must be relative to the "tftp root path"
ex. :
"tftp root path" = /var/tftp (in settings)
"path for the data" = data (in the config or in settings "data default path
" for global)
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
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
1/ Yes, it was successful.pepj wrote:1/ Was it successful ? (if not see the same remarks as 3/)fata51 wrote:After make ConfigManager work with Pure TFTP mode (without Pancho),2/ You have to give in the settings the full path to pancho and the path to perl because the cacti function execbackground start the command like as you give (not always the same environement).fata51 wrote:I'm trying to use it with pancho. Pancho compiled and has been installed successfully (in /usr/local/bin). In ConfigManager settings, I defined the path to Pancho (pancho Settings for TFTP method. --> program) as "pancho" (without quotes). Is it good ?
for ex. in settings3/ Are you sure your TFTP is able to copy under / ????/usr/bin/perl.exe -I/usr/local/bin/pancho/lib /usr/local/bin/pancho/pancho.pl
in settings please check the "tftp root path" and in the configuration "path for the data" must be relative to the "tftp root path"
ex. :
"tftp root path" = /var/tftp (in settings)
"path for the data" = data (in the config or in settings "data default path
" for global)
2/ I don't have any pancho.pl. I think after compiling and installing pancho from .tar.gz file, it's autonomous and doesn't need perl to run itself. Can anyone using pancho under Linux confirm this?
3/ I change in settings the "tftp root path" to match the atftpd path which is "/tftpboot". I left the "path for the data" empty because I want files to be put int the root of my tftp path.
Again I got those log lines :
2008-02-28 09:45:04 INFO: /IAS-NCY_backupid2.conf.log has 1 of 4 devices with a reported status. Not copying logfile yet.
2008-02-28 09:40:03 DEBUG: exec_background(pancho --download --config /IAS-NCY_backupid2.conf).
2008-02-28 09:40:03 create pancho config for IAS-NCY_backup(configid=2) --> /IAS-NCY_backupid2.conf!2008-02-28 09:40:03 INFO: execute the upload/download configuration 2 (/IAS-NCY_backupid2.conf) with Pancho.
28/02/2008 09:39:29 start ADD / EDIT configuration's parameters
...
I've installed this on my Cacti 0.87a installation on Windows XP. When I configure a task to download the config off of a router i get the following in my log file
is not possible using deprecated mibs. not activ.
2008-03-06 16:57:05 Error: download. RESULT: Error: Copying configurations to and from startup-config
2008-03-06 16:57:04 INFO: execute the upload/download configuration 1 (\configmanagerid1.conf) with php tftp.
This is my test router which has a VERY old IOS installed on it (11.x) so is it because of that?
is not possible using deprecated mibs. not activ.
2008-03-06 16:57:05 Error: download. RESULT: Error: Copying configurations to and from startup-config
2008-03-06 16:57:04 INFO: execute the upload/download configuration 1 (\configmanagerid1.conf) with php tftp.
This is my test router which has a VERY old IOS installed on it (11.x) so is it because of that?
I've since moved on from testing this with a 2600 and now am testing on a 2950 switch.
In my log file I have this:
2008-03-10 10:20:29 Error: download. RESULT: Unknown Copy Failure not activ.
2008-03-10 10:20:11 INFO: execute the upload/download configuration 1 (\configmanagerid1.conf) with php tftp.
Looking at another post, I tried running this manually and the following cam up:
C:\Inetpub\wwwroot\cacti\plugins\sharednetworkclass>php example8_tftp_snmp_networkclass.php -i=x.x.x.x -v=2c -c=RWString --tftpdirection=download --filesource=run --filedestination=c:\ios\test.txt --tftpserver=IP of Cacti Server -d
initialisation:OK
show the sysDescr
sysDescr-> Error=Error device not initialised. result=
DEBUG: HOST:192.168.6.242 ERROR:not activ
Any ideas???
In my log file I have this:
2008-03-10 10:20:29 Error: download. RESULT: Unknown Copy Failure not activ.
2008-03-10 10:20:11 INFO: execute the upload/download configuration 1 (\configmanagerid1.conf) with php tftp.
Looking at another post, I tried running this manually and the following cam up:
C:\Inetpub\wwwroot\cacti\plugins\sharednetworkclass>php example8_tftp_snmp_networkclass.php -i=x.x.x.x -v=2c -c=RWString --tftpdirection=download --filesource=run --filedestination=c:\ios\test.txt --tftpserver=IP of Cacti Server -d
initialisation:OK
show the sysDescr
sysDescr-> Error=Error device not initialised. result=
DEBUG: HOST:192.168.6.242 ERROR:not activ
Any ideas???
Yes Cisco first release with CISCO-CONFIG-COPY-MIB is 11.1.24 and not for all hardwaresteagu wrote:is not possible using deprecated mibs. not activ.
This is my test router which has a VERY old IOS installed on it (11.x) so is it because of that?
check clicking in : " View Supporting Images " from http://tools.cisco.com/Support/SNMP/do/ ... 1.1.1.1.13
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
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
If you are using unix please copy the following zipped file under "sharednetworkclass" because of the different default for the OID output format in unix ... see post http://forums.cacti.net/post-127415.html#127415steagu wrote:I've since moved on from testing this with a 2600 and now am testing on a 2950 switch.
In my log file I have this:
2008-03-10 10:20:29 Error: download. RESULT: Unknown Copy Failure not activ.
... with php tftp.
... then please retry ...
- Attachments
-
- snmpclass.zip
- (6.1 KiB) Downloaded 247 times
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
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
I'm using Cacti 0.8.7a on Windows XP... Is there something else I can test?If you are using unix please copy the following zipped file under "sharednetworkclass" because of the different default for the OID output format in unix ... see post http://forums.cacti.net/post-127415.html#127415
Sorry for the delay ...steagu wrote:I'm using Cacti 0.8.7a on Windows XP... Is there something else I can test?If you are using unix please copy the following zipped file under "sharednetworkclass" because of the different default for the OID output format in unix ... see post http://forums.cacti.net/post-127415.html#127415
Normally with all thiese hardware it should function very well ... I will check again with v2c ...
1/ do you have PHP 4.x ? In PHP 4.x snmp V 2, 2c, 3 do not function very well and some function are missing
2/ can you try with V1 ?
3/ can you check how are the answer of your snmp request. Perhaps you become an answer in not numeric format (in linux snmp-net it 's happend). For Unix I have corrected this.
like for unix :http://forums.cacti.net/viewtopic.php?p=126587#126587. For PHP-Windows the snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC) function do not exist.
try with snmp-NET:
snmpget -v 1 -c community-string IP-address .1.3.6.1.2.1.1.2.0
or
snmpget -v 1 -c community-string IP-address SysObjectID
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
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
StarLog wrote:Will this work on DELL 53xx or 34xx or 62xx switches.?
layer-2 and 3
I have no feedback about Dell until now .... Can you try ? I can do correction if not OK. (I have no DELL switches)
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
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
Who is online
Users browsing this forum: No registered users and 0 guests