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

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

Post by pepj »

shahbour wrote:
In the "cacti settings" Tab "Up/Download Config Manager"
- in "TFTProot path" try without / at the end ( /tftpboot)
- "data default path" from ("cacti settings" Tab "Up/Download Config Manager") AND "path for the data" from your config insert only "data" without / (because it is under the TFTP-root-path)

- /tftpboot/data seams ok for "configurations file default path" and "path for configurations files"

Is cacti able to write in this folder /tftpboot/data (rights) ?

Can you active the configmanager debug and tell me what you see in the log of configmanager when (do you see ""create pancho config for "):
- you open the view where you can add devices and click on the "show configfile"-button
- when you make a "reset last run time and execute" of your config and wait 5 minutes.
shahbour wrote: 3/ Do you want use this with pancho or "pure PHP" ?
i am trying to use pancho , please advice me which is better.
[7quote]
It depends ... TFTP is not sure but you don't have to group your devices per vendor (ex. in method "multi" with ssh or scp)
... TFTP pancho you have to install Pancho and perl .... TFTP pure PHP has been tested for Cisco,Foundry,Nortel (3com is in development) ...

PS: TFTP pure PHP don't need the pancho configuration 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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

User of Cacti

Post by shahbour »

1- I know this question is not related to the plugin but how can i know which user is running the cacti website is it the same as apache.
2- I gave 777 permision for the tftpboot but i didn't create the data folder i thought it will be created automatically, at first i did then i deleted it.

My thoughts is that it is a permision issue but i am not sure how to check it. Is there a way that i can check if i am able to create files from inside the cact.
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

One step forword

Post by shahbour »

Hello ,
as we said above it seems the error was in permission on /tftpboot forlder now i am getting my configuration files.

but when running i checked the log file i got it like this

Listing of the config /tftpboot/cfg/Panchoid10.conf.log
Dec 10 12:27:59 [GMT/+0000] pancho: (ERROR) 192.168.XX.33 Received noAccess(6) error-status at error-index 1
Dec 10 12:28:00 [GMT/+0000] pancho: (ERROR) XXXXXXXXX Received noAccess(6) error-status at error-index 1
Dec 10 12:30:07 [GMT/+0000] pancho: (ERROR) 192.168.XX.33 Received noAccess(6) error-status at error-index 1
Dec 10 12:30:09 [GMT/+0000] pancho: (ERROR) XXXXXXXXX Received noAccess(6) error-status at error-index 1

also i tried from command line

pancho --download --config /tftpboot/cfg/Panchoid10.conf

same result i think it is something related to SNMP , sould i give it wr or just ro will work.

i added RW to one of the routers i am getting now.

Error Source Configuration doesnt exist


thanks for your help
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: One step forword

Post by pepj »

shahbour wrote: Received noAccess(6) error-status
- configuration need a write community (v1 & v2) + rights to the view (snmp v2)
- check also your ACL

If you don't get anymore error check the path for the tftp (look if your tftp get a request).
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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Getting forword

Post by shahbour »

After i added wr to the cisco and running this command

pancho --download --config /tftpboot/cfg/Panchoid10.conf

i am getting.

Error Source Configuration doesnt exist

Note
This might be related to the tftp , i used same tftp to download cfg from cisco router manually but first i had to do touch nameoffile then chmod 777 nameoffile before being able to do the copy from cisco.

i mentioned this to see if it is related.and i can't check if the tftp is getting request cos i can't find any log file related to it :( i am using SuSE enterprise 10
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Getting forword

Post by pepj »

shahbour wrote:After i added wr to the cisco and running this command pancho --download --config /tftpboot/cfg/Panchoid10.conf
Error Source Configuration doesnt exist
What type of device you have and IOS ?
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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Post by shahbour »

the one i tried on is AS5350 and the IOS is 12.3 (c5350-is-mz.123-17.bin) and i got also CISCO 7200 most of them are 12.4 or 12.3.

i only tried on the AS5350 i will try now on other routers. and post the result.
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Post by shahbour »

Hello,

i tried it on Cisco C2600 ios 12.2(4). When i waited to five minute it run correctly and when i check the data folder i found a file there but it is zero size.

So i run the command of pancho manually

ERROR (212.98.XXX.XXX): Unknown Copy Failure

Can this be cos i am copying over internet , cos only this Router connected to my tftp over internet.

Then i tried the the pure php i got lot of lines in the debug one of them is

2007-12-12 09:02:14 Error: Cannot download. 212.98.135.193 not activ

i think this is after issuing the download command.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

shahbour wrote: Can this be cos i am copying over internet , cos only this Router connected to my tftp over internet.
1/ Could be on Firewall. The TFTP should access to the router and the router should access to your TFTP.

(configurations+SNMP ... connectionless ... on the internet .. not very secure. )

Perhaps you have also to increase the SNMP timeout.

2/ you can also use the method "multi" with ssh or scp (or telnet but no secure). The session are more stabil. I would prefer this on the internet ....
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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Post by shahbour »

I tried it on the Cisco 7200 on local network i got Souce Configuration not found.

So for both 7200 and AS5300 i got this response.

For the 2600 it created a file but zero (over internet) i will try the mulit and to install a 2600 on the local network and try it also.

Can it be that we can't backup 7200 and AS5300 or it is tested before.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

shahbour wrote:I tried it on the Cisco 7200 on local network i got Souce Configuration not found.
Also something else is wrong ...

Can you try manually :
snmpset -v 1 -c private <device name> ccCopyProtocol.<random number> integer 1
ccCopySourceFileType.<Random number> integer 1
ccCopyDestFileType.<Random number> integer 3
ccCopyServerAddress.<Random number> ipaddress "<server ip address>"
ccCopyFileName. <Random number> octetstring "<file name>"
ccCopyEntryRowStatus.<Random number> integer 4

or
snmpset -v 1 -c private <device name>
.1.3.6.1.4.1.9.9.96.1.1.1.1.2.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.3.<Random number> integer 4
.1.3.6.1.4.1.9.9.96.1.1.1.1.4.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.<Random number> ipaddress "<server ip address>"
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.<Random number> octetstring "<file name>"
.1.3.6.1.4.1.9.9.96.1.1.1.1.14.<Random number> integer 4

PS: I cannot test on 2600 before 1-2 weeks.

By Cisco: URL=http://www.cisco.com/en/US/tech/tk648/t ... 4aa6.shtml
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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Post by shahbour »

i tried first method

snmpset -v 2c -c XXXXX 192.168.38.2 ccCopyProtocol.123 integer 1 ccCopySourceFileType.123 integer 1 ccCopyDestFileType.123 integer 3 ccCopyServerAddress.123 ipaddress 192.168.38.6 ccCopyFileName. 123 octetstring 020205 ccCopyEntryRowStatus.123 integer 4

where 38.2 is the router ip and 38.6 is the tftp server

i got
ccCopyFileName.: Bad object type: 1

when i tried the second one

snmpset -v 2c -c XXXXXX 192.168.38.2 .1.3.6.1.4.1.9.9.96.1.1.1.1.2.123 integer 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.123 integer 4 .1.3.6.1.4.1.9.9.96.1.1.1.1.4.123 integer 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.5.123 ipaddress "192.168.38.6" .1.3.6.1.4.1.9.9.96.1.1.1.1.6.123 octetstring 02020505 .1.3.6.1.4.1.9.9.96.1.1.1.1.14.123 integer 4

and i tried it without the " around the ipaddress andin both of them i go

.1.3.6.1.4.1.9.9.96.1.1.1.1.5.123: Bad value name (192.168.38.6)
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

shahbour wrote:i tried first method
snmpset -v 2c -c XXXXX 192.168.38.2 ccCopyProtocol.123 integer 1 ccCopySourceFileType.123 integer 1 ccCopyDestFileType.123 integer 3 ccCopyServerAddress.123 ipaddress 192.168.38.6 ccCopyFileName. 123 octetstring 020205 ccCopyEntryRowStatus.123 integer 4
ccCopyFileName.: Bad object type: 1
Here you have a space between 'ccCopyFileName.' and '123'. Remove the space.
And 'octetstring 020205 ' should be a normal string with " (path under your root tftp) like octetstring "folder1/myconfig.txt"

(same to do for the method with oid.)

Try again please.
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
shahbour
Posts: 16
Joined: Fri Nov 30, 2007 6:35 pm

Post by shahbour »

Hello i will post what i did and the result

snmpset -v 2c -c XXXXX 192.168.38.2 ccCopyProtocol.123 integer 1 ccCopySourceFileType.123 integer 1 ccCopyDestFileType.123 integer 3 ccCopyServerAddress.123 ipaddress 192.168.38.6 ccCopyFileName.123 octetstring "tftpboot/myconfig.txt" ccCopyEntryRowStatus.123 integer 4

ccCopyProtocol.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopyProtocol)
ccCopySourceFileType.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopySourceFileType)
ccCopyDestFileType.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopyDestFileType)
ccCopyServerAddress.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopyServerAddress)
ccCopyFileName.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopyFileName)
ccCopyEntryRowStatus.123: Unknown Object Identifier (Sub-id not found: iso -> ccCopyEntryRowStatus)
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

shahbour wrote: Object Identifier (Sub-id not found: iso -> ccCopyProtocol)
please try inserting the commands with oids (your snmp do not load the mibs cisco or they are not in your linux ):

Code: Select all

snmpset -v 1 -c private <device name>
.1.3.6.1.4.1.9.9.96.1.1.1.1.2.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.3.<Random number> integer 4
.1.3.6.1.4.1.9.9.96.1.1.1.1.4.<Random number> integer 1
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.<Random number> ipaddress <server ip address>
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.<Random number> octetstring "<file name>"
.1.3.6.1.4.1.9.9.96.1.1.1.1.14.<Random number> integer 4
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 1 guest