Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


plugin for download/upload routers switches configuration
Goto page Previous  1, 2, 3 ... 22, 23, 24, 25, 26, 27  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General
Author Message
shahbour



Joined: 30 Nov 2007
Posts: 16

PostPosted: Sun Dec 16, 2007 6:10 pm    Post subject: Reply with quote

Hello,

Code:
 snmpset -v 2c -c XXXXX 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 "/tftpboot/myconfig.txt" .1.3.6.1.4.1.9.9.96.1.1.1.1.14.123 integer 4
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.123: Bad value name (192.168.38.6)
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.123: Unknown Object Identifier (Sub-id not found: iso -> /tftpboot/myconfig)

i tried it with "" and without adn also tftpboot/myconfig and /tftpboot/myconfig in both i got same result


.1.3.6.1.4.1.9.9.96.1.1.1.1.5.123: Bad value name (192.168.38.6)
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.123: Unknown Object Identifier (Sub-id not found: iso -> /tftpboot/myconfig)
Back to top
shahbour



Joined: 30 Nov 2007
Posts: 16

PostPosted: Tue Dec 18, 2007 4:55 pm    Post subject: Reply with quote

Do u think trying on different Cisco routers will be better.
Back to top
MikeAlt



Joined: 18 Oct 2007
Posts: 2

PostPosted: Wed Dec 19, 2007 10:27 am    Post subject: No output created via telnet Reply with quote

Hi community,

I tried a lot of changes in my config but without success.
I would like to collect the config with telnet, but no files created.
The log show me everything is ok. I cannot see any errors.

Quote:
2007-12-19 16:12:08 exec_background(/var/www/html/plugins/configmanager/configmanager/scripts/telnetdownloadmatrixdfe.sh 10.10.10.10 admin *** /data/10.10.10.10-2007-12-19.cfg) for following hosts:10.10.10.10


the command:
Quote:
%g%/configmanager/scripts/telnetdownloadmatrixdfe.sh %n% %u% %w% %p%%n%-%y%-%m%-%d%.cfg


the script:
Quote:
#!/bin/sh
(echo "$2"; echo "$3"; echo "set length 0"; echo "show config"; echo "exit"; sleep $5
) | telnet $1 > temp
csplit -k -f temp temp '/show run/'
rm -f temp
if test -f temp00 ; then rm -f temp00; fi
if test ! -f temp01 ; then exit; fi
echo mv temp01 $4
mv temp01 $4


System is UNIX.

Can you help me to get it running ?


regards and thx

Mike
Back to top
airwalk
Cacti User


Joined: 18 Aug 2006
Posts: 103
Location: MSK, RU

PostPosted: Fri Dec 21, 2007 3:17 am    Post subject: Reply with quote

please, delete this message
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Fri Dec 21, 2007 7:26 am    Post subject: Reply with quote

What message are you asking to be deleted?

TheWitness
Back to top
airwalk
Cacti User


Joined: 18 Aug 2006
Posts: 103
Location: MSK, RU

PostPosted: Mon Dec 24, 2007 5:21 am    Post subject: Reply with quote

TheWitness wrote:
What message are you asking to be deleted?

TheWitness


Forget. I was asking to delete the message saying "please, delete this message" because the original message was made by mistake.

The following somewhat doesn't relate to the plugin functionality but I feel it could be of use for some.
Just FYI. I found a bug in Cisco's implementation of scp. IOS is C2800NM-ADVIPSERVICESK9-M, Version 12.4(12), RELEASE SOFTWARE (fc1).

This deals at least with Cacti on win32.
If I try to run pscp with the path to write output to containg "/" then a router crashes and undergoes a cold restart. If the folder delimitered by slash doesn't exist then pscp won't be able to create one for you and will hang till timeout expires. Cisco reports to syslog the following messages and then reboots immediately(!!!!).

15: *Dec 21 18:29:35 MSK: %SYS-5-RESTART: System restarted --
16: Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(12), RELEASE SOFTWARE (fc1)
17: Technical Support: http://www.cisco.com/techsupport
18: Copyright (c) 1986-2006 by Cisco Systems, Inc.
19: Compiled Fri 17-Nov-06 12:02 by prod_rel_team
20: *Dec 21 18:29:35 MSK: %SNMP-5-COLDSTART: SNMP agent on host MSK-WAN-MKH-1 is undergoing a cold start
21: *Dec 21 18:29:36 MSK: %SSH-5-ENABLED: SSH 1.99 has been enabled
221: Dec 21 18:38:37 MSK: %SYS-2-WATCHDOG: Process aborted on watchdog timeout, process = SSH Process.
222: -Traceback= 0x42520988 0x42520AA0 0x4252B40C 0x4252B4BC 0x4252B9D0 0x4252C95C 0x4252D8AC 0x425342B0 0x42527260 0x42194A48 0x42194A2C

That was quite a flap when tried to run a script during business hours.
Please, be aware! =)
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Tue Dec 25, 2007 12:20 pm    Post subject: Reply with quote

airwalk wrote:

The following somewhat doesn't relate to the plugin functionality but I feel it could be of use for some.
Just FYI. I found a bug in Cisco's implementation of scp. IOS is C2800NM-ADVIPSERVICESK9-M, Version 12.4(12), RELEASE SOFTWARE (fc1).
... crash ....


Thanks for the advice (I will check it in two weeks. At this time I have not the same release on any C2800 and have no problem)

But I have NO problem with the IOS "Cisco IOS Software, 2800 Software (C2800NM-IPVOICEK9-M), Version 12.4(12), RELEASE SOFTWARE (fc1)
flash:c2800nm-ipvoicek9-mz.124-12.bin".

Do you have open a case by cisco ? (So they will also check this for the next release ...)
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Tue Dec 25, 2007 12:40 pm    Post subject: Re: No output created via telnet Reply with quote

MikeAlt wrote:
I tried a lot of changes in my config but without success.
I would like to collect the config with telnet, but no files created.
The log show me everything is ok. I cannot see any errors.
... configmanager/scripts/telnetdownloadmatrixdfe.sh %n% %u% %w% %p%%n%-%y%-%m%-%d%.cfg


Hello

1/ you don't pass the most important parameter (the last) the sleep-time. You don't know how quick you router answer in particularly on the WAN or when very busy ...
2/ echo "set length 0" is for CatOs. For IOS You need: echo "term length 0"
3/ you have: csplit -k -f temp temp '/show run/' but "echo "show config". It is never equal
4/ pay attention with your temp because you create and remove it. The problem could be your shell don't start where you want !!! I will prefer to give the whole path or to have a parameter.

Solution:
the command:
Code:
%g%/configmanager/scripts/telnetdownloadmatrixdfe.sh %n% %u% %w% %p%%n%-%y%-%m%-%d%.cfg 10

the script:
Code:

#!/bin/sh
(echo "$2"; echo "$3"; echo "term length 0"; echo "show running"; echo "exit"; sleep $5
) | telnet $1 > /var/temp
csplit -k -f /var/temp /var/temp '/show run/'
rm -f /var/temp
if test -f /var/temp00 ; then rm -f /var/temp00; fi
if test ! -f /var/temp01 ; then exit; fi
echo mv /var/temp01 $4
mv /var/temp01 $4
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Tue Dec 25, 2007 1:07 pm    Post subject: Reply with quote

shahbour wrote:


- Normally pancho runs on almost all cisco device.

- I have test on the same router and IOS "Cisco C2600 ios 12.2(4)".
I have see NO problem with pancho (and manually) with version 1 and version 2c
I only become the same error when I use the read community !!!! With the write community NO problem.

I send you my manually function I have done
on windows
Code:
snmpset -v 2c -c WRITEcommunity 172.30.0.1 1.3.6.1.4.1.9.9.96.1.1.1.1.2.111 i 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.111 i 4 .1.3.6.1.4.1.9.9.96.1.1.1.1.4.111 i 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.5.111 a "172.30.0.2" .1.3.6.1.4.1.9.9.96.1.1.1.1.6.111 s "test/myconfig.txt" .1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 4

iso.3.6.1.4.1.9.9.96.1.1.1.1.2.111 = INTEGER: 1
iso.3.6.1.4.1.9.9.96.1.1.1.1.3.111 = INTEGER: 4
iso.3.6.1.4.1.9.9.96.1.1.1.1.4.111 = INTEGER: 1
iso.3.6.1.4.1.9.9.96.1.1.1.1.5.111 = IpAddress: 172.30.0.2
iso.3.6.1.4.1.9.9.96.1.1.1.1.6.111 = STRING: "test/myconfig.txt"
iso.3.6.1.4.1.9.9.96.1.1.1.1.14.111 = INTEGER: 4

On Unix solaris
Code:

snmpset -v 2c -c WRITEcommunity 172.30.0.1 1.3.6.1.4.1.9.9.96.1.1.1.1.2.111 integer32 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.3.111 integer 4 .1.3.6.1.4.1.9.9.96.1.1.1.1.4.111 integer 1 .1.3.6.1.4.1.9.9.96.1.1.1.1.5.111 ipaddress "172.30.0.2" .1.3.6.1.4.1.9.9.96.1.1.1.1.6.111 octetstringascii "test/myconfigunix.txt" .1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 integer 4


PS: with TFTPpure PHP I have to check the version 2c something not correct I think
Back to top
fata51



Joined: 16 Nov 2005
Posts: 14

PostPosted: Fri Feb 01, 2008 5:14 am    Post subject: Reply with quote

Hi,

First of all , I'd like to thank you for all your great job. I'm trying the plugin for the fist time and after a little while, I'm configuring my first task in order to download the running config of one of my cisco switch. But it failed, I'm getting this logs :

2008-02-01 10:00:06 exec_background ( ***) for following hosts:192.168.169.247
2008-02-01 10:00:06 Error: download. RESULT: Unknown Copy Failure not activ.
DEBUG CiscoTFTPIOStransfert result: result=Unknown Copy FailureUnknown Copy Failure
DEBUG CiscoTFTPIOStransfert: random number=850, source=run, source's file=4, destination=tftp, thedestination's file=1
DEBUG tftp typtransfert=ciscoIOS
Found data query XML file at './plugins/sharednetworkclass/MIBXML/MIBtoLoad.xml'
2008-02-01 10:00:03 Load class "Cisco" of 192.168.169.247 for download
Found data query XML file at './plugins/sharednetworkclass/MIBXML/MIBtoLoad.xml'
Found data query XML file at './plugins/sharednetworkclass/MIBXML/RFC1213-MIB.xml'
Found data query XML file at './plugins/sharednetworkclass/MIBXML/MIBtoLoad.xml'
2008-02-01 10:00:03PHP tftp download of 192.168.169.247(192.168.169.247)
2008-02-01 10:00:03 createconfig for TEST(configid=1)!
2008-02-01 10:00:03 Path is:/usr/bin

Any tips?

Thanks.
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Fri Feb 01, 2008 6:12 pm    Post subject: Reply with quote

fata51 wrote:

2008-02-01 10:00:06 exec_background ( ***) for following hosts:192.168.169.247
2008-02-01 10:00:06 Error: download. RESULT: Unknown Copy Failure not activ.

....
2008-02-01 10:00:03 Load class "Cisco" of 192.168.169.247 for download
Found data query XML file

Hello

It begins not bad 10:00:03 and can read on the cisco device...

I think You are using a read community ..... instead write (needed for having rights on the cisco configuration)

PS: if you are using snmp v2 or v3 please install the new version in the first post.
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Fri Feb 01, 2008 6:13 pm    Post subject: new version of configmanager and sharednetworkclass Reply with quote

new version of configmanager and sharednetworkclass
see first post.

current version configmanager: 0.76
current version sharednetworkclass: 0.39

corrections from configmanager 0.75 to 0.76:

    - bug snmp v2
    - add new options for snmp v3 (some like priv auth are not supported in pancho, only with snmp pure PHP).
Back to top
fata51



Joined: 16 Nov 2005
Posts: 14

PostPosted: Mon Feb 04, 2008 10:13 am    Post subject: Reply with quote

Hi,

Thanks for your reply. I just checked, I'm using a SNMPv1 RW community. It doesn't work. Here is my config file from the logs page :

[binair] => 0
[delay] => 0
[finishlog] => 0
[accepttrap] => 0
[usepancho] => 0
[tftp] => 192.168.169.72
[reload] => 0
[startup] => 0
[commit] => 0
[fileformat] => ::HOST::.::DATE::.cfg
[pre] =>
[post] =>
[templatename] =>
[command] =>
[snmp_community] => pilou
[snmp_password] =>
[snmp_username] =>
[snmp_version] => 1
[lastused] => 0000-00-00 00:00:00
[sun] => 0
[sat] => 0
[fri] => 0
[thu] => 0
[wed] => 0
[tue] => 0
[mon] => 0
[monthly] => 0
[date] => 2008-02-01 09:34:00
[fileupload] => /data/upload.cfg
[pathdata] => /data
[path] => /data
[up_download] => download
[PCmanager] =>
[state] => up
[configtype] => tftp
[name] => TEST
[id] => 1
Back to top
pepj
Cacti User


Joined: 29 Sep 2005
Posts: 288
Location: switzerland

PostPosted: Mon Feb 04, 2008 6:25 pm    Post subject: Reply with quote

fata51 wrote:

[fileupload] => /data/upload.cfg
[pathdata] => /data


This parameter must be relative to tftp root (a tftp server cannot write outside)
so [pathdata] => empty in your case

you can also test directly with with snmpnetworkclass
Code:

cd ...yourcactipath\plugins\sharednetworkclass
php example8_tftp_snmp_networkclass.php -i=IP-address-device -v=1 -c=YourCommunity --tftpdirection=download --filesource=run --filedestination=filenameandpathundertftproot.txt --tftpserver=YourTFTPserver -d
Back to top
fata51



Joined: 16 Nov 2005
Posts: 14

PostPosted: Wed Feb 06, 2008 2:15 am    Post subject: Reply with quote

pepj wrote:
fata51 wrote:

[fileupload] => /data/upload.cfg
[pathdata] => /data


This parameter must be relative to tftp root (a tftp server cannot write outside)
so [pathdata] => empty in your case

you can also test directly with with snmpnetworkclass
Code:

cd ...yourcactipath\plugins\sharednetworkclass
php example8_tftp_snmp_networkclass.php -i=IP-address-device -v=1 -c=YourCommunity --tftpdirection=download --filesource=run --filedestination=filenameandpathundertftproot.txt --tftpserver=YourTFTPserver -d


thanks, it's working now.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 22, 23, 24, 25, 26, 27  Next
Page 23 of 27

 



Powered by phpBB © 2001, 2005 phpBB Group