plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

Anyone using this on DELL 53xx or 34xx or 62xx switches.?

I will try to test it on CactiEZ v0.3 with those switches.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

Re: how can i check if the view for version 2 allow...?

Post by warnesj »

pepj wrote:
fernandakp wrote:I couldn t make it work neither.
Here again.....

I don't understand why you have not the same answer with and without NetSNMP, perhaps the MIBS settings.
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".

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.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: how can i check if the view for version 2 allow...?

Post by pepj »

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).
OK ... thanks ... I will add it for the next 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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

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.
Can you try it?
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
fata51
Posts: 17
Joined: Wed Nov 16, 2005 8:34 am

Post by fata51 »

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 :
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)
Logs from configManager :

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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

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 ?
3/ Are you sure your TFTP is able to copy under / ????
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
fata51
Posts: 17
Joined: Wed Nov 16, 2005 8:34 am

Post by fata51 »

pepj wrote:
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 ?
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).
for ex. in settings
/usr/bin/perl.exe -I/usr/local/bin/pancho/lib /usr/local/bin/pancho/pancho.pl
3/ Are you sure your TFTP is able to copy under / ????
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)
1/ Yes, it was successful.

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

... :roll:
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

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?
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

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???
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

steagu 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?
Yes Cisco first release with CISCO-CONFIG-COPY-MIB is 11.1.24 and not for all hardware
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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

steagu 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.
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

... 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
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

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
I'm using Cacti 0.8.7a on Windows XP... Is there something else I can test?
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

Will this work on DELL 53xx or 34xx or 62xx switches.?
layer-2 and 3
Cacti v0.8.8a
Weathermap 9.7a
--------------------
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

steagu wrote:
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
I'm using Cacti 0.8.7a on Windows XP... Is there something else I can test?
Sorry for the delay ...
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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests