plugin for download/upload routers switches configuration

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
qrisraelMexicano
Posts: 1
Joined: Fri Apr 11, 2008 5:30 pm

Pix Firewall

Post by qrisraelMexicano »

Hi im using the config manager for the router and swicthes core, it works great, but i am having problems with the pixes, because i requiere use the enable command to have priviledges, so i dont know if someone knows about a script that authenticates by ssh, or after login by telnet in the pix automatically put the enable command and the password in order to get the configuration of the pix, i tried to modify the scripts but im not good in this.

Sorry for my poor english,

Thanks
liuzhe2000
Posts: 16
Joined: Wed Mar 19, 2008 9:57 am

Post by liuzhe2000 »

hi, guys
i'm beginner and english isn't my language.
i have set up the configmanager-0.76,and using
"Multiple configuration type"
i made a "copy-startup.bat",and it can execute to download my router's configuration.
it is ok,but how do i use it in the "Multiple configuration type " of configmanager-0.76?
if it can be used in configmanager, how should i config the configmanager-0.76?
help me!! :(
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Pix Firewall

Post by pepj »

qrisraelMexicano wrote:Hi im using the config manager for the router and swicthes core, it works great, but i am having problems with the pixes, because i requiere use the enable command to have priviledges, so i dont know if someone knows about a script that authenticates by ssh, or after login by telnet in the pix automatically put the enable command and the password in order to get the configuration of the pix, i tried to modify the scripts but im not good in this.

Sorry for my poor english,

Thanks
1/ Do you have unix or windows ?
2/ I would prefer to use ssh/scp with putty (easier for unix and window). In unix the default ssh/scp will function only with a automatic(anonymous) user, because default ssh/scp password is not interactiv only the key.
3/ With telnet : no problem with unix, but with windows you have to use the cgwin telnet because the default telnet.exe is not interactive with the password.

4/ what are your commands for pix? I can give you an example.
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
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

Issue....

Post by blugger »

Hi!

First I wanna thank for that great plugin. The work on that plugin should ofcourse continue.

I have one issue:

When I do a configmanager configuration the tool asks me to add some IP addresses. The problem is that no names are resolved.

Host Ip

x.x.x.x x.x.x.x

Under host also the IP addresses are shown but not the names.

Is this a bug?

BR, B.
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

scheduler not working ...

Post by blugger »

Hi!

Can somebody explain, why the scheduler does not work?

The scheduler has the following two fields:

1) date
2) when

There is no explanation how to set these values.

Thx,
B.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: Issue....

Post by pepj »

blugger wrote:I have one issue:
When I do a configmanager configuration the tool asks me to add some IP addresses. The problem is that no names are resolved.
Host Ip
x.x.x.x x.x.x.x
Under host also the IP addresses are shown but not the names.
Is this a bug?
I think you are speaking about secure.cfg
in "secure.cfg" you have to give the ip address. In a next release I will give the possiblity to give name or subnet.

Otherwise in the other part of this plugin you can give ip or host.
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: scheduler not working ...

Post by pepj »

blugger wrote:Can somebody explain, why the scheduler does not work?
The scheduler has the following two fields:
1) date
2) when
1/ date is the date of the first execution
2/ when is when do you want repeat

3/ do you have set the field "active rule" to "activeted" ("not paused") ?
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
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

hello ...

Post by blugger »

i did everything as described, but the configs are not saved.

is it possible that i have downloaded a wrong version of configmanger?

i installed the plugin as any other plugin. first i tried to use the database "configmanager.sql" in the root directory but this database did not work. then i tried to install the database in the "install_uninstall" directory. the database within the mentioned directory is called "sql-install-manually-configmanager.sql"

i think there is something wrong with the last version.

schedulling "saving cofiguration" still does not work :-(

i wanna use cacti instead of cisco works because with cacti i can save everything. please help.
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: hello ...

Post by pepj »

blugger wrote:i did everything as described, but the configs are not saved.
Could you give/send more information:
- which PHP version ?
- unix / windows ?
- TFTP pancho or TFTP pure PHP or "multi" ?
- your parameters in the config and in settings
- "describe plugin_cfgmng", "describe plugin_cfgmng_basis", "describe plugin_cfgmng_data", "describe plugin_cfgmng_trap"
- NET-SNMP or PHP-SNMPwhat do you see in the log of 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
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

my input...

Post by blugger »

hello!

here are the answers:

1) PHP Version 4.3.10

2) Unix (Suse)

3) Tried TFTP pancho (SNMP) / TFTP PHP (SNMP) and "multi" (SSH, Telnet)

If I do a "php configmanager_poller.php" everythin works fine. The only problem is that the automatic saving of configurations does not work.

4) I tried different configurations. I chose "date" in the past as well in the future. I selected different days including "monthly" as well excluding "monthly" I also actived the rules. I also activated "accept trap events".

Regarding the installation of the configmanager plugin I can tell you the following. I installed the plugin like any other plugin. The only issue I recogniced was the issue with the database (see above).

Within the configuration I selseced "use netsnmp".


Regarding the scheduller, is there something to be configured within the crontab?

The "logfile" of the configmanager does not give me some hints on what I should change.

BR
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: my input...

Post by pepj »

blugger wrote: 1) PHP Version 4.3.10
2) Unix (Suse)
3) Tried TFTP pancho (SNMP) / TFTP PHP (SNMP) and "multi" (SSH, Telnet)
If I do a "php configmanager_poller.php" everythin works fine. The only problem is that the automatic saving of configurations does not work.
4) I tried different configurations. I chose "date" in the past as well in the future. I selected different days including "monthly" as well excluding "monthly" I also actived the rules. I also activated "accept trap events".

Regarding the installation of the configmanager plugin I can tell you the following. I installed the plugin like any other plugin. The only issue I recogniced was the issue with the database (see above).

Regarding the scheduller, is there something to be configured within the crontab?
0/ "sql-install-manually-configmanager.sql". i think there is something wrong with the last version. schedulling "saving cofiguration" still does not work.
0A/ if you mean the parameter of configmanager are not saved, please give me the result of "describe plugin_cfgmng", "describe plugin_cfgmng_basis", "describe plugin_cfgmng_data", "describe plugin_cfgmng_trap"
0B/ could you upgrade to PHP 5.x (PHP4.x is no more supported and have some problem with snmp) ?

1/ with PHP 4.x you should work with NET-SNMP. You have this ... it should be ok for this point.

2/ "crontab" Need only the pooler of cacti

3/ let us try with 3A/ TFTP PHP (SNMP) and 3B/ "multi"
3A/
- 3A1/ are you sure the data path is a relativ path to the root-tftp
- 3A2/ TFTP ip cannot be 127.0.0.1
- 3A3/ do you have copy "sharednetworkclass" for example under .../plugins and check the path to sharednetworkclasspath in config.php from configmanager plugin
- 3A4/ try a "reset last run time" for this config in order to see if it is functioning. Then "php configmanager_poller.php -d" if you cannot wait five minutes
- 3A5/ try a download directly with sharednetworkclasspath:

Code: Select all

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 -m=2  --path=/usr/bin
3B/ "multi"
- 3B1/ Have you try with telnet script or ssh-script or .... (from /plugins/configmanager/scripts ?
- 3B2/ if you are using ssh and cisco.
+ create a rsa key (crypto key generate rsa) with key bigger as 768 because otherwise the unix workstation could not open a session without changing all the default.
+ "ip scp server enable" for scp down/upload
+ if you have several interfaces on your device don't forget to set the source interface
- 3B3/ try to start the script manually.
- 3B4/ try to start the script with configmanager. try a "reset last run time" for this config in order to see if it is functioning. Then "php configmanager_poller.php -d" if you cannot wait five minutes
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
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

FYI ...

Post by blugger »

I did everything as you wrote....

the point is that saving configurations work in the case it is triggered manually (php configmanager_poller.php -d)

I do not understand why the scheduller does not work.

----

Regarding DB I tried the following:

1) Install DB within "install_uninstall" directory by doing the following command:

mysql -u user -p cacti < sql-install-manually-configmanager.sql

afterwards I did the following command from the configmanager directory:

php database_upgrade.php


2) Install DB within "configmanager " directory by doing the following command (I uninstalled the other DB beofre):

mysql -u user -p cacti < configmanager.sql

afterwards I did the following command from the configmanager directory:

php database_upgrade.php


2b) From the last command I get the following output:

database_default=cacti,cfgmngtable=plugin_cfgmng,cfgmngtable_data=plugin_cfgmng_data. config[base_path]=/srv/www/htdocs
upgrade from release before 0.4
0000000
upgrade from release X to 0.4f
000
upgrade from release 0.4f to 0.5



The logging shows the following:
2008-07-13 03:42:03 update version number from 0.5f to 0.76. -> result=OK(1)
2008-07-13 03:42:03 Correct the SQL auto_increment id. -> result=OK,OK,OK,
2008-07-13 03:42:03 Upgrade of SQL data plugin_cfgmng ALTER TABLE plugin_cfgmng ADD COLUMN `binair` tinyint(11) NOT NULL default '0'; . -> result=
2008-07-13 03:42:03 Upgrade of SQL data plugin_cfgmng ALTER TABLE plugin_cfgmng ADD COLUMN `delay` int(10) NOT NULL default '0'; . -> result=
13/07/2008 03:42:03 INFO: Database upgrade.
13/07/2008 03:35:36 INFO: Database upgrade.



The automatic saving of configurations still does not work.

I also tried "reset last run time and execute in 5 minutes". This also does not work!

I dont think that PHPv4 is the reason? I will try to upgrade to PHPv5.

BR B.
blugger
Cacti User
Posts: 50
Joined: Wed May 07, 2008 10:23 am

Update ..

Post by blugger »

Here the output of the logging in the case I manually trigger a SW download:

2008-07-13 11:09:24 DEBUG: post command 'perl /srv/www/htdocs/plugins/configmanager/scripts/sleep.pl' return ->not OK Array
2008-07-13 11:09:06 exec_background(/srv/www/htdocs/plugins/configmanager/scripts/save_cfg_switchrouter.pl 10.65.0.10 admin *** /srv/www/htdocs/plugins/superlinks/content/tftpdir/data/CFG_INT/RouterSwitch/20080713/ 10.65.0.10.cfg) for following hosts:10.65.0.10

As you can see this works (MANUALLY)!
jrego
Posts: 44
Joined: Mon Jul 14, 2008 9:55 am

Post by jrego »

Hi,

Im using Fedora 9. Has anyone installed pancho on this platform? also in the instructions it says that the pancho directory is available somewhere? I cant seem to find it. Can someone help me out?

thanks
jrego
Posts: 44
Joined: Mon Jul 14, 2008 9:55 am

Post by jrego »

ok i got it installed i think..

can someone help with this error when i run php configmanager_poller.php -d


PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /usr/share/cacti/plugins/configmanager/configmanager_poller.php on line 11
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests