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

Post by pepj »

jherrinike wrote: To solve it, rename comparaison.GIF to comparaison.gif
Another problem with an image : checkoff.gif / checkon.gif
In html/inc_device_filter_table.php, line 9, the path must be :

Code: Select all

$img=$config['url_path'].'plugins/configmanager/images/'.
[/quote]

You'r right, thanks ... unix is case sensitive ....

I've posted a new version 0.4d and after 0.4e see below
(for updating take care about your own secure.cfg file and your scripts under 'plugins/configmanager/scripts if you have some)

Thanks for your feedback.
Last edited by pepj on Fri Jun 02, 2006 10:37 am, edited 1 time in total.
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 »

Bug found

Selection for the insertion of hosts in a configuration of configuration manager:
By using Mactrac and hosts of cacti, an host is not showed for the selection when you have inserted for example an host with the ID X and you search an host with the same ID X from the Mactrac devices. These hosts are not the same because the ID of Mactrac has none relation with the ID host of cacti. I had interverted a '-'.

I have corrected this in the version 0.4e.
I put also the corrected file configmanager_edit.zip for those who have the version 0.4d.

(the files have been removed because of new versions. If you need only the corrected configmanager_edit.zip please copy it from the new release 0.4e or above)
Last edited by pepj on Fri Aug 04, 2006 10:03 am, edited 1 time in total.
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
13casa
Posts: 1
Joined: Wed Jun 07, 2006 10:44 am

Problem with pancho

Post by 13casa »

Is it possible to have more information about the installation and the configuration of pancho with this plugin.
I try to found more information on the web but on pancho.org there is no more information

thanks

Sorry for my english
waxaw
Posts: 9
Joined: Mon Apr 24, 2006 9:01 am

Post by waxaw »

Hi,

I tried to download configurations from a hp2524 and from Cisco Catalyst 2950.

I installed your great plugin and pancho. All is ok.

My config file is created but when i launch it in a prompt command i've got this:
error: [2304] Net::SNMP::__ANON__(): Received noSuchName(2) error-status at erro
r-index 1

ERROR (10.x.x.x): Received noSuchName(2) error-status at error-index 1 <== Cisco


ERROR (10.x.x.x): Unable to determine plugin for 10.x.x.x <== my HP2524

error: [2304] Net::SNMP::__ANON__(): Received noSuchName(2) error-status at erro
r-index 1

ERROR (10.x.x.x): Received noSuchName(2) error-status at error-index 1
<== an another Cisco
Can you help me ?
incrediblekicks
Posts: 4
Joined: Mon Jun 19, 2006 4:09 pm

scp w/ configmanager

Post by incrediblekicks »

Hi there,

Has anyone successfully gotten scp to work with configmanager? I'm getting multiple password failures after running configmanager_poller.php. Its sending CRs but seems like the password thats stored in the db (looks like "snmp_password") isnt being sent. btw this is being tested with a cisco router (c2600-ipbasek9-mz.124-8 ) and a linux box. The command line Im running is:

/usr/bin/scp %u%@%n%:running-config %p%/%n%-running-config.txt

Thanks for any help!
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

problem in the installation

Post by jduchesne »

Sorry but pepj I have some questions about the installation.
First in the step 3 when you say create a sql database how can i make this and where.(It's a command line in unix?)
Moreover step 5 is it the right of th e plugin that i have to change or another directory.
and step 7 what is for you settings tab and where is it?

thank you for all.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: problem in the installation

Post by pepj »

Sorry for the delay, because I was abroad.
jduchesne wrote:First in the step 3 when you say create a sql database how can i make this and where.(It's a command line in unix?)
Unix or Windows:
- open a shell or command dos and do "mysql --user=root --password cacti < your_cacti/plugins/configmanager/configmanager.sql" (or mysql.exe)
Moreover step 5 is it the right of th e plugin that i have to change or another directory.
It means the cacti right under the "User Management" item.
Open the user you want give the right to use configmanager. Select the check box in the realm permission.
step 7 what is for you settings tab and where is it?
A new tab will appear (after step 5) in the Configuration/Cacti setting
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

Re: scp w/ configmanager

Post by pepj »

Sorry for the delay, because I was abroad.
incrediblekicks wrote:multiple password failures after running configmanager_poller.php. Its sending CRs but seems like the password thats stored in the db (looks like "snmp_password") isnt being sent. btw this is being tested with a cisco router (c2600-ipbasek9-mz.124-8 ) and a linux box.
/usr/bin/scp %u%@%n%:running-config %p%/%n%-running-config.txt
This method will send only the password from the settings of this config. Nothing to do with snmp. But in the command you should pass the password with %w%.
It functions only for BSD (where an option exist to pass a password in scp/ssh) and for Windows with the putty command "pscp -l %u% -pw ". Under Windows I've already test it.
For the other unix the password can be insert only interactively ... there is a lot of stuff on the web about this problem.
Therefore to solve the problem you have first to generate a key without password and put it on the router. (example http://www.linuxjournal.com/article/8600).
To know if your key fingerprint is:
31:df:a5:73:4a:2f:a6:6c:1c:32:a2:f2:b3:c5:a7:1f user1@computer1
you should on a cisco router with "crypto key pubkey-chain rsa" insert the key like 31dfa573 4a2fa66c 1c32a2f2 b3c5a71f

I don't have done it with unix at this time, but I will test it later.
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

Re: Problem with pancho

Post by pepj »

13casa wrote:Is it possible to have more information about the installation and the configuration of pancho with this plugin.
I try to found more information on the web but on pancho.org there is no more information
(http://www.pancho.org/introduction.html)

What is your problem ?

PS: I am thinking about to change configmanager in order to bypass the pancho and perl. But I need more time to convert it in pure php.
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 »

Sorry for the delay, because I was abroad.
waxaw wrote:I tried to download configurations from a hp2524 and from Cisco Catalyst 2950.
I installed your great plugin and pancho. All is ok.
ERROR (10.x.x.x): Received noSuchName(2) error-status at error-index 1 <== Cisco
I don't have got a problem with cisco until now. I have also some 2950.
What is your pancho config ?
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
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

i'm getting a message saying that --download isn't a valid option when i try to run the poller by hand.

donohue

cacti@impreza:~/plugins/configmanager> perl -I/usr/local/bin/pancho.pl --download --config /data/configmanagerid7.conf
Unrecognized switch: --download (-h will show valid options).


and, i'm getting this running any php stuff.. Running PHP5

PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /cacti-0.8.6h/plugins/configmanager/setup.php on line 48
Last edited by ddonohue on Wed Jul 12, 2006 11:11 pm, edited 1 time in total.
jherrinike
Posts: 24
Joined: Wed May 10, 2006 2:46 pm
Location: Memphis, TN USA

Post by jherrinike »

I am still getting this when I try to run pancho.

Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 84.
Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 86.
Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 92.
Global symbol "$config_file" requires explicit package name at /usr/local/bin/pancho line 101.
Execution of /usr/local/bin/pancho aborted due to compilation errors.


Anyone have any ideas?
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Post by pepj »

ddonohue wrote:i'm getting a message saying that --download isn't a valid option when i try to run the poller by hand.
cacti@impreza:~/plugins/configmanager> perl -I/usr/local/bin/pancho.pl --download --config /data/configmanagerid7.conf
Unrecognized switch: --download (-h will show valid options).
your command is not the right one, it should be:
either
.../perl [-IdirectoryOfpancho\lib ] directoryOfpancho\pancho.pl --download --config /data/configmanagerid7.conf
or
.../perl directoryOfpancho\pancho.pl --download --config /data/configmanagerid7.conf
Running PHP5
PHP Warning: Call-time pass-by-reference has been deprecated
You're right, it should be "configmanager_listmanagerIPs($listofManagerIPs);" in setup.php.
I haven't seen it because under windows the default option is allow_call_time_pass_reference = On (in php.ini)

So you can remove the "&" of "configmanager_listmanagerIPs(&$listofManagerIPs);" line 48 in setup.php.
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
jduchesne
Posts: 30
Joined: Fri Jul 07, 2006 7:50 am

pb with cacti

Post by jduchesne »

Hello pepj,

I made all the steps in order to install cacti plugin but when I oppen cacti nothing appear.

For pancho installation all is OK but can you take a look at the cacti installation ?

step0: i think it is ok I download plugin architecture and i made copy files using pre patched files.

Step1:pancho is OK

Step2:I copy the plugin under my cacti/plugins/configmanager

step3:I create my sql database

step4; I put $plugins[] = 'configmanager'

step5: I made chmod 777 for the plugin

step6: I have touch secure.cfg with an empty file to allow all workstation

step7: I log cacti but in the setting tab nothing new is appear I don't see TFTPserver and other information like tftp root dat path ...

can you help me pepj if you can with my explication.

Thank a lot for your help and your time that you spend.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: pb with cacti

Post by pepj »

jduchesne wrote:step7: I log cacti but in the setting tab nothing new is appear I don't see TFTPserver and other information like tftp root dat path ...
You must give the right to this user.
Under "User Management" select the user and check the realm(s) for configmanager
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