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 »

ok will load it this week end.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

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

My Cacti server died on my so I can't test everything. However, I was running PHP 5.2.5.

Can't check with V1.

With Net SNMP this is what was returned:


C:\WINDOWS\system32>snmpget -v 1 -c RWstring x.x.x.x .1.3.6.1.2.1.1.2.0

Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.324

It looks similar to what was in the unix post you referenced.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

steagu wrote: With Net SNMP this is what was returned:
C:\WINDOWS\system32>snmpget -v 1 -c RWstring x.x.x.x .1.3.6.1.2.1.1.2.0
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.324
It looks similar to what was in the unix post you referenced.
Until I find a better solution could you insert in your NET-SNMP/usr/snmp/snmp.conf file
printNumericOids 1
perhaps also
printNumericEnums 1

(In windows the function snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC); do not exist :( )
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 »

pepj wrote:
steagu wrote: With Net SNMP this is what was returned:
C:\WINDOWS\system32>snmpget -v 1 -c RWstring x.x.x.x .1.3.6.1.2.1.1.2.0
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.324
It looks similar to what was in the unix post you referenced.
Until I find a better solution could you insert in your NET-SNMP/usr/snmp/snmp.conf file
printNumericOids 1
perhaps also
printNumericEnums 1
(instead to change the NET-SNMP/usr/snmp/snmp.conf --->)
have you ("steagu") already actived NET-SNMP for configmanager (in setting "use netsnmp".) ?
If yes try with this new version of the file snmpclass.php (to copy into sharednetworkclass)
Attachments
snmpclass.zip
(6.1 KiB) Downloaded 307 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
tviktor
Posts: 12
Joined: Sun Apr 01, 2007 11:25 pm

Post by tviktor »

Hello!
I have several cisco devices and I want to download configs via scp from suse linux box. When I ran script

Code: Select all

scp user@host:running-config /tmp/1.cfg
it ask a password. So configmanager dont work.
I tried to generate rsa keys on my linux box, but I dont know, how put them on cisco device.
Help please.
[quote][b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.0
[b]Poller Type[/b] - Spine v
[b]Plugins[/b][list]Device Monitoring (monitor - v0.8.2)
Global Plugin Settings (settings - v0.3)
Thresholds (thold - v0.3.9)
Host Info (hostinfo - v0.2)
PHP Network Weathermap (weathermap - v0.941)
Poller Performance Report (pollperf - v0.32)
IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4c)
PHP Network Managing (manage - v0.5.1)
Report Creator (reports - v0.3)
RRD File Cleaner (RRD Cleaner - v0.34)
Syslog Monitoring (syslog - v0.5.2)
Configuration manager (configmanager - v0.75)
Update Checker (update - v0.4)
Uptime (uptime - v0.3)[/list][/quote]
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

Hi Jean Michel,

I installed your plugin on a totally different server and it worked well. i didn't have to use the new file you posted and was able to do everything with the default files. Thank you!

steve (steagu)
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

pepj,

I have it installed as I followed your 'manual,

I want to use the PHP tftp method, I have the sharednetworkclass in plugins, and it needed to be in global.php not config.php

I see the tab in the top for upload/download, BUT, I do not see how to initiate a download from the device. nor do I see how to tell what IP and user name/ password to use to access the device.

Can you help.?

Thanks
Cacti v0.8.8a
Weathermap 9.7a
--------------------
tviktor
Posts: 12
Joined: Sun Apr 01, 2007 11:25 pm

Post by tviktor »

I found answer to my question
http://forums.cacti.net/viewtopic.php?p=131083#131083

I use putty's pscp under linux, and all is fine
[quote][b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.0
[b]Poller Type[/b] - Spine v
[b]Plugins[/b][list]Device Monitoring (monitor - v0.8.2)
Global Plugin Settings (settings - v0.3)
Thresholds (thold - v0.3.9)
Host Info (hostinfo - v0.2)
PHP Network Weathermap (weathermap - v0.941)
Poller Performance Report (pollperf - v0.32)
IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4c)
PHP Network Managing (manage - v0.5.1)
Report Creator (reports - v0.3)
RRD File Cleaner (RRD Cleaner - v0.34)
Syslog Monitoring (syslog - v0.5.2)
Configuration manager (configmanager - v0.75)
Update Checker (update - v0.4)
Uptime (uptime - v0.3)[/list][/quote]
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

Posted: Thu Apr 03, 2008 12:27 am Post subject:

--------------------------------------------------------------------------------

pepj,

I have it installed as I followed your 'manual,

I want to use the PHP tftp method, I have the sharednetworkclass in plugins, and it needed to be in global.php not config.php

I see the tab in the top for upload/download, BUT, I do not see how to initiate a download from the device. nor do I see how to tell what IP and user name/ password to use to access the device.

Can you help.?


From the "manage configs" bit, you have to click on "Add" in the top right to add your job to for the download. From there its fairly self explanatory but be sure to make it an "active rule". You'll also need to configure a Read/Write SNMP string on the device you are trying to download the config from.
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

steagu,

Thanks, that was what I missed. Now I am closer to making it work, but I am
getting this error in the logfile, says it is not active, and I have the active checked on the configmanager. BTW, I am working with DELL layer-2 switches to try and get this working.

2008-04-03 22:31:08 Error: download. RESULT: Error: function in developpement ....... not activ.
2008-04-03 22:29:50 create pancho config for configmanager(configid=1) --> /data/configmanagerid1.conf!2008-04-03 22:30:25 create pancho config for configmanager(configid=1) --> /data/configmanagerid1.conf!2008-04-03 22:31:08 INFO: execute the upload/download configuration 1 (/data/configmanagerid1.conf) with php tftp.
2008-04-03 22:27:08 Error: download. RESULT: Error: function in developpement ....... not activ.
2008-04-03 22:27:08 INFO: execute the upload/download configuration 1 (/data/configmanagerid1.conf) with php tftp.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

Can someone tell me what is not active.?

2008-04-05 00:47:08 Error: download. RESULT: Error: function in developpement ....... not activ.

2008-04-05 00:47:08 INFO: execute the upload/download configuration 1 (/data/configmanagerid1.conf) with php tftp.
Last edited by StarLog on Thu Apr 10, 2008 6:58 pm, edited 1 time in total.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
steagu
Posts: 37
Joined: Thu Nov 15, 2007 12:15 pm
Location: Manchester, United Kingdom

Post by steagu »

Hi Starlog,

From your Cacti "Main menu" choose Settings then the "Up/Download Config Manager" tab. Do a print screen and post it here. Did you make any modifications from the default? On my setup, I modified the IP of the TFTP server and then modified the default SNMP parameters.


Also do a print screen of the settings under "manage configs". On that one as well I just modified the TFTP server and the SNMP stuff.

Do you have any other plugins running? Are they working fine?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

StarLog wrote:Can someone tell me what is not active.?
2008-04-05 00:47:08 Error: download. RESULT: Error: function in developpement ....... not activ.
2008-04-05 00:47:08 INFO: execute the upload/download configuration 1 (/data/configmanagerid1.conf) with php tftp.
1/ are you using NET-SNMP ?
2/ One reason for "in developpement " could be the result of the "sysObjectID" for the MIB-SNMP.
Therefore could you copy and unzip this example-file under sharednetwork, execute it and give me the results?

for example like:

Code: Select all

php D:\Programme\Cacti-NetworkMonitoring\plugins\sharednetworkclass\example9_check_snmp_networkclass.php  -i=IP-address -c=community-string 
or

Code: Select all

php D:\Programme\Cacti-NetworkMonitoring\plugins\sharednetworkclass\example9_check_snmp_networkclass.php  -i=IP-address -c=community-string -m=2 -a=D:\Programme\NET-SNMP\usr\bin
Sorry, but the maximum filesize for all my Attachments is reached. I will try to contact the Board Administrator in order to upload the 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
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

pepj wrote:
StarLog wrote:Can someone tell me what is not active.?
2008-04-05 00:47:08 Error: download. RESULT: Error: function in developpement ....... not activ.
2008-04-05 00:47:08 INFO: execute the upload/download configuration 1 (/data/configmanagerid1.conf) with php tftp.
1/ are you using NET-SNMP ?
2/ One reason for "in developpement " could be the result of the "sysObjectID" for the MIB-SNMP.
Therefore could you copy and unzip this example-file under sharednetwork, execute it and give me the results?

for example like:

Code: Select all

php D:\Programme\Cacti-NetworkMonitoring\plugins\sharednetworkclass\example9_check_snmp_networkclass.php  -i=IP-address -c=community-string 
or

Code: Select all

php D:\Programme\Cacti-NetworkMonitoring\plugins\sharednetworkclass\example9_check_snmp_networkclass.php  -i=IP-address -c=community-string -m=2 -a=D:\Programme\NET-SNMP\usr\bin
Sorry, but the maximum filesize for all my Attachments is reached. I will try to contact the Board Administrator in order to upload the file
Attachments
example9_check_snmp_networkclass.zip
(3.49 KiB) Downloaded 302 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
Arrow2005
Cacti User
Posts: 54
Joined: Thu Nov 03, 2005 3:07 pm
Contact:

Post by Arrow2005 »

Have anybody tryed to install this on a CactiEZ server ???

I did try, but failed. think I have tryed everything

but can´t get it to work
if you can patch it to day, why dont whait util 2morrow
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests