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

new version 0.82

Post by pepj »

_raindrop18 wrote:"I have a trouble with "compare"
- Your problem should be solve in new release 0.82.
It is a P.A 2.x version, so comment/or remove in global.php the

Code: Select all

$plugins[] = 'configmanager';
active the plugin with the "manage plugin option" of cacti, check the settings.
- some colors and changes in "side by side" and other options
sukanta wrote: wrote:Is this support to take backup of routers with TACACS.ie it has three level of password..username, passoword,enable
Now in v0.82 there is a new field, you can use it for enable password
torstentfk: wrote: list of devices to insert
Now in v0.82 possible to select only the hosts used in none configuration (checkbox)
Now possible to select with host or description
more parameters in scripts
in v0.82 possibility to pass:
- the description (some people are using it for hostname) %x%,
- the whole list of the hostnames %N% or the descriptions %X% or couple host,IPs %I%
(with exemple)
joseme: wrote: community with >15 characters
is fixed
torstentfk: wrote:CAMM?
coming soon
torstentfk: wrote:telnetunixcisco
I will check if I insert it in the next version. I had not seen this post.
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
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Hello!

I've installed last version of configmanager. Untile here all ok.
With the 0.81 version I've noticed that the scheduler starts every day 5 minutes later. Maybe the start is based on the end time of the previous execution? In addiction I've seen that the only way to schedule correctly the execution is to wake up in the night and use the "Reset last run time and execute in 5 minutes".
Is this in 0.82 solved or I'm making something wrong?

Thank's!

Simon
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Troubles in CActi 0.80.7g

Post by joseme »

HI:
I've installed this plugin on Centos 5.5 Cacti 0.8.7g, but seems It doesn't work, When a try to create a config, with "manage configs", I click on "Add", then put the data, click on "CREATE" button, but the config doesn't appear in "manage configs"!!.
I checked and the tables have been created, but no data on plugin_config table.
I have this plugin on a windows box and runs well. but on a Linux box has that trouble.
Could you help me?, maybe the cacti version..?

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

Post by pepj »

xefil wrote:Maybe the start is based on the end time of the previous execution
sorry I didn't notice that before, but you are right.
I will correct it soon (few days). sorry for your night work.
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: Troubles in CActi 0.80.7g

Post by pepj »

joseme wrote:click on "CREATE" button, but the config doesn't appear in "manage configs"!!.
1/ do you have some spaces (or special characters) in configurationsname ?
2/ could you send or compare the mysql databases ( "describe plugin_cfgmng" "describe plugin_cfgmng_data") with sql-install-manually-configmanager.sql file ?
3/ do you get the second view for inserting the hosts after click on "create"?
4/ please check the rights on the files in configmanager/, configmanager/html, ... and the ordner itself.
5/ errors ? /var/log/mysql/error.log ?
6/ in setting of configmanager active "debug", try again and look in configmanager logfile
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
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

CONFIGMANAGER

Post by joseme »

Hi Pepj:
I don't get the second view to insert the hosts, I attach three files:
1. Sql tables descr.
2. error log from configmanager
3. sql install manually.

I gave to "apache" user the rights:
chown -R apache configmanager/

error_log from configmanager shows message of an error UNKNOWN..

Thanks!
Attachments
error_log.txt
error from configmanager
(3.05 KiB) Downloaded 177 times
tables sql.txt
my sql tables
(6.96 KiB) Downloaded 183 times
install_uninstall.txt
install file manually
(3.29 KiB) Downloaded 170 times
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: CONFIGMANAGER

Post by pepj »

joseme wrote: 1. Sql tables descr.
3. sql install manually.
Hello
some columns are missing like binair

best way should be an upgrade. (the upgrade is automatically with the option install and enable of cacti plugin management). If you do it remove from global.php "configmanager" before.

otherwise download the last version unzip it, and compare with the new SQL db file. (Here you will have more that you need for your version but it is not a problem.
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
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

hI

Post by joseme »

Hi pepj:
The problem continues after install 0.823 version, well I realized that log shows :
tables plugin_cfgmng. -> id result=0, code=1054 errortext=Unknown column 'binair' in 'field list'

I checked the "plugin_cfgmng" table, and the column "binari" doesn't exist!!, but in sql-install-manually.sql script is present: "binair tinyint(11) NOT NULL default '0'.

So , I think is an error in the automatic installation of tables. Please take a look.. I attach the log and show table;
Thanks
Jose
Attachments
error_log.txt
(1.31 KiB) Downloaded 164 times
plugin_cfgmng table.txt
(5.12 KiB) Downloaded 194 times
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

Re: hI

Post by pepj »

joseme wrote:The problem continues after install 0.823 version, Unknown column 'binair' in 'field list'
binair was the uprade to 0.71 and you had already a version later. The other new columns have been added ...

To solve your problem quickest ways is to add the column binair with sql:
ALTER TABLE plugin_cfgmng ADD COLUMN binair tinyint(11) NOT NULL default '0';
or from shell:
mysql -u yourcactiuser -p cacti < text_file_with_the_sql_command
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
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Hi

Post by joseme »

Hi Pepj:
I added the colum binair and now I am able to add hosts. (this part is solved)
Well, I've trying to use the TFTP method ( actually I have a TACACS and had some troubles to use the script method), anyway.
I configured it like my old configmanager plugin (0.81),which is working well, but the new version (0.823) doesn't works.

I did the folowing tests:
1. I made a TFTP test from my Cisco Router to my Centos Cacti. All was OK, I got the config on the folder defined in /etc/xinetd.d/tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /home/configs/data
per_source = 11
cps = 100 2
flags = IPv4

I mean the config was stored in /home/configs/data.
So, TFTP is working.

2. I test:
[root@localhost sharednetworkclass]# php example8_tftp_snmp_networkclass.php -i="the_ip_router" -v=1 -c="my community" -m=2 --tftpdirection=download --filesource=run --filedestination=config --tftpserver="my_tftp_ip" -d=1 -l=1 --path=/usr/bin
.
.
.
DEBUG tftp typtransfert=ciscoIOS
DEBUG CiscoTFTPIOStransfert: random number=152, source=run, source's file=4, destination=tftp, thedestination's file=1
DEBUG CiscoTFTPIOStransfert: random number=152, source=run, source's file=4, destination=tftp, thedestination's file=1
DEBUG CiscoTFTPIOStransfert result: result=success

I got "success" and the router config file is store in /home/configs/data, then, this function is OK.

3. But when I made the test from the aplication plugin I mean, selecting "reset last run time and execute in 5 minutes" It doesn't work!!.
Some data I put:
path for configurations files : /home/configs
path for the data: /home/configs/data

The configuration file is stored in /home/configs, but there aren't router configs in "/home/configs/data"
I've given: "chmod 777 to this folders, but no results.

Could you help me?
thanks
Jose
pepj
Cacti User
Posts: 324
Joined: Thu Sep 29, 2005 5:03 am
Location: switzerland

New version 0.825 / some bugs in version 0.822, 0.823

Post by pepj »

Hello

in version 0.822, 0.823 there are some bugs with then scheduler and traps
I have corrected these bugs in v0.825.

+ Now Traps/events are functioning with any Syslog DB (need some parameters changes in cacti->settings). Tested with Syslog and CAMM.
+ The scheduler is more accurate
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
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Hi

Post by joseme »

Hi Pepj:
All work OK now, I installed the 0.825 version. TFTP schedule is working well.

Now, I'm trying to use the "script method", but I have a trouble, when I executed I got:

[root@localhost 20100910]# more my_ip.txt
spawn ssh my_user@my_ip show run
my_user@my_ip's password:
Received disconnect from my_ip: 11: Logged out.

I mean,
1. the script is executed, the file is generated in "my_ip.txt" (that's OK).
2. for some reason I got a desconection from the equipment (seems trouble with password.
3. when I try to connect directly from the cacti-server to the equipment, I got to do it!, I mean:

[root@localhost 20100910]# ssh my_user@my_ip
my_user@my_ip's password:

Then I put the password and get to connect to the equipment. so, It works fine

I'm using "ssh-ios-config.sh" script. I'm not an expert in scripts.
Seems a trouble with password, maybe because my password has 25 characters, alphanumeric with a "dot"... So, I had to modify the "configmanager.php" , because it only permitted passwords with 15 characters. Could it be the cause?

Thanks
Jose
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Script method SOLVED

Post by joseme »

Hi Pepj:
This trouble is solved, Actually my Linux Centos 5 showed a disconect with the following command:
spawn ssh $user@$host $arg1 $arg2
so I've changed it for:
spawn ssh $user@$host

and the args I've sent them after:
send -- "$arg1 $arg2\r"

Because my config was too long, I've changed too:
set timeout 35

after those changes, all works fine (including schedule)

By the way, In mode comparision, my files are shown without "tabs" , I mean:

In linux (using "more" command) I see:
interface et0
(here a tab)ip add XX..... (that's ok)

but in comparission tool I see:
interface et0
ip add XX..... (without space at the begining of the line)

I known is just a different way to see the data, but the "tabs" are useful to see the config, how can I do?

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

Re: Script method SOLVED

Post by pepj »

joseme wrote:In mode comparision, my files are shown without "tabs"
Yes I know, the problem is because HTML compresses automatically several spaces to one.
I want solve it too.
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

next activities for the next release.

Post by pepj »

in version 0.825 the *.sh and *.exp scripts are in DOS format. I will convert them again in the next version. (the CR of Windows could do some seldom troubles).If you cannot wait you could convert them with dos2unix or vi (s/^M//) where ^M is Ctrl-VCtrl-M

some problems
with Solaris and the diff function.

Next activities:
1/ the temp folder for configmanager will be a setting parameter default(.../configmanager/temp)
2/ the scripts folder for configmanager will be a setting parameter default(.../configmanager/scripts)
easier for upgrade, security, ...
3/ simplify the way to create scripts (will need only to copy the scripts and a help-file in order to be able to use it in the drop-down list of configmanager and get a example or help)
4/ rewrite some parts to simplify the code and reuse more libraries of cacti
5/ use cacti log
6/ add other scripts
6/ ...
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 3 guests