Cactiusers.org


It is currently Sat Jul 04, 2009 12:27 am




Post new topic Reply to topic  [ 197 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next
 plugin for download/upload routers switches configuration 
Author Message
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post plugin for download/upload routers switches configuration
Configmanager plugin,
(you need the pugin architecture)

current version configmanager: 0.81
current version sharednetworkclass: 0.42

changes in configmanager 0.8x:
    - Sort-function in the views
    - Renaming method "multi" in "script"
    - little improvement in the settings
    - ignore the disabled devices.
    - add some linux scripts for example ssh download with expect
    - changes between 0.80 and 0.81: only some files have been converted from DOS to unix format.

new changes in configmanager 0.7x:
    - also compatible with cacti 0.8.7 and above
    - TFTP method "pure PHP" without installing pancho is possible (need to copy "sharednetworkclass"). snmp v3 supported.
    - traps/syslog detection with activation of the config for the host which received the trap.

Explanation:
With this plugin you can easily schedule the download/upload of the configuration of your routers, switches AND NOW any devices (or change in one click some parameters of hundert of switches ... dangerous but possible now). It should function for all type of router or switches.

There is two method "TFTP" and "script".
[/list]- "TFTP" is based of "pancho" http://www.pancho.org.
- "TFTP" with option "pure PHP" no need of pancho installation (you need to copy the "sharednetwork class"-module).
- "script" can use any scripts or SCP, FTP, SFTP or what you want. Some scripts for windows and linux are provided.
[/list]
The syslog(haloe plugin) and traps could active the download of the pancho config or script for the host which has received a specific event and which the "trap event flag" is active.

read first the manual.txt in the zipped file

(for windows) copy the diff.exe and gzip.exe into /plugins/configmanager
if you don't have one.
I cannot put it in the package because the max upload in this forum is 256

UPGRADE: for upgrading
    - take care about your own secure.cfg and securecompare.cfg files and your scripts under 'plugins/configmanager/scripts if you have some
    - (NO MORE NEEDED database_upgrade.php )
You see some views (and the full release including gzip.exe and diff.exe) in :
viewtopic.php?p=1020#1020 or here below

-syslog/traps event activation

I will put in this post always the latest release.

PS: also http://forums.cacti.net/viewtopic.php?t=12406


Attachments:
File comment: diff.exe,gzip.exe for windows users
diff-gzip.zip [156.61 KiB]
Downloaded 371 times
File comment: some pictures
configmanagerPictures.zip [438.74 KiB]
Downloaded 1890 times
File comment: shared network class 0.42. for using TFTP method without pancho.
0.42 correction for OID output format in linux

sharednetworkclass0.42.zip [144.55 KiB]
Downloaded 15 times
File comment: version 0.8
PS: the putty, gzip and diff exe (for windows) have to be downloaded separately

configmanager0.81.zip [212.18 KiB]
Downloaded 20 times


Last edited by pepj on Sun May 03, 2009 3:02 pm, edited 55 times in total.

Fri Mar 10, 2006 9:06 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 1872
Post 
Great, I will see about setting up a test lan (none production) to give it a try on. I will let you know how it goes!


Fri Mar 10, 2006 10:28 am
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post Other views
Here other views


The pictures are now in the first post.


Attachments:
File comment: view of new logfile
configmanager-logfile.jpg
configmanager-logfile.jpg [ 177 KiB | Viewed 1136 times ]


Last edited by pepj on Fri Feb 01, 2008 6:08 pm, edited 5 times in total.

Sat Mar 11, 2006 8:03 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post New version
Hello

Here the new version with the possibility to choose the devices of Mactrac.

I ve corrected some bugs. I think it should be all ok now.
14.03.2005 possibility to use mactrac devices
14.03.2005 no more problem with the drop list
13.03.2006 the filter look now only at the name not the description
12.03.2006 correction bug with any.
12.03.2006 correction bug switch up/down.
12.03.2006 correction bug filter


Last edited by pepj on Fri Mar 24, 2006 4:25 pm, edited 1 time in total.



Tue Mar 14, 2006 7:17 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post need help for adding download/upload though FTP or SCP (SSH)
subject:
need help for adding download/upload the configuration though FTP or SCP (SSH)

I 've discussed with the creator of "pancho" Charles Menzes(devel@pancho.org).
He can add in pancho the option to download/upload the configurations through FTP or SCP (SSH).
For these changes he needs some volunters for testing the new function.

If someone is interested you can contact him www.pancho.org (devel@pancho.org).

I will adapt the cacti plugin configmanager to use this option.

thanks


Wed Mar 15, 2006 10:53 am
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
Here some little correction again:

I hope the last for this part of this plugin

16.03.2006 add show "last log file"
16.03.2006 problem with select all solved

In developpement:
----------------
- option for using SCP/SSH instead TFTP.
- comparaison of to file / like diff


Thu Mar 16, 2006 7:06 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
Here the new version

(picture in the first three posts !!!!)

With the compare function (diff) that a lot of people were waiting .... I needed more times because I had to rewrite the "browser" function of PHP because I needed to see files on the server not on the client.

You can submit you idea or correction (I cannot test linux, but I try programming without).

Some explanations:
Comparaison tool: you can compare what you want its a diff. I tested only under window
at this time but it should also function under linux. For the Windows users
I have put a diff.exe in the configmanager plugins which has the same parameters
as under linux.

security:
2/ For the comparaison of the file I want to use the same idea in order
to avoid the access above the specified directory. I use the file
"securecompare.cfg"


Last edited by pepj on Sat Mar 25, 2006 8:20 pm, edited 1 time in total.



Fri Mar 24, 2006 4:50 pm
New User

Joined: Sun Feb 19, 2006 8:53 am
Posts: 15
Post 
Great to see this functionality being included :)
Do I assume correctly that the included diff.exe is for the WIn32 platform whereas Linux will use native diff?

When I enter the 'compare configs' section I get this error:
"Call to undefined function: scandir() in /var/www/cacti-0.8.6h/plugins/configmanager/compare.php on line 375"

F


Sat Mar 25, 2006 8:49 am
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
Hello

Quote:
Do I assume correctly that the included diff.exe is for the WIn32 platform whereas Linux will use native diff?


Yes, it is what I want to do. I don't want to develop twice and unix has more tools per default. For this reason I have insert in the package a free window diff with the same options as unix.

PS: for comparaison between *.zip *.gz is the release is coming soon ...

Quote:
"Call to undefined function: scandir() in /var/www/cacti-0.8.6h/plugins/configmanager/compare.php on line 375"


Sorry I have seen "scandir" is only for PHP 5 (I begun with PHP for a couple of weeks, so I did not realize it).

Tell me if it is better for you with this file
If yes I will put it in the next changes.


Attachments:
File comment: compare which is also compatible with php4
compare.zip [4.15 KiB]
Downloaded 314 times
Sat Mar 25, 2006 3:56 pm
New User

Joined: Sun Feb 19, 2006 8:53 am
Posts: 15
Post 
Quote:
Tell me if it is better for you with this file


Yup, that works great now :)

Many thanks,
F


Sat Mar 25, 2006 4:26 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
Here the release with comparaison of zip of gz files.
I've corrected some errors for unix in the compare function

also ok for PHP4

PS: For the compare (diff function) check it you have the following temporary folder './plugins/configmanager/temp'


Attachments:
File comment: new version with compare of zipped files, zip,gz
configmanager.zip [255.79 KiB]
Downloaded 461 times
File comment: for windows people who don't have gzip.exe insert this one in ./plugins/configmanager
gzip.zip [44.38 KiB]
Downloaded 322 times
Sat Mar 25, 2006 8:19 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
@ jimmy (& Gigamit )

I have seen today (after trying the reports plugin of Bradley) that he is using the same realm 60-61. I can change mine, but I think you should give us one or two, or/and create a new function that would avoid such problems. For some month we had the same problem also with NPC(Nagios)...

What do you think about it?


Thu Mar 30, 2006 9:19 am
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post NEW VERSION with SCP SSH SFTP ....
Hello

I am proud to announce this new version with also the possibility to download/upload with SCP, SSH, SFTP, and more ...

I want to put more helps and pictures later ....

It would be good at telling me if it is good under unix (I think yes)

PS: In this version each person can create a template and so help the community. So if you have good templates tell us that

PS: for the users of the old version you must start: "php database_upgrade.php" and check the realms (user-management). I change it to 70.


Last edited by pepj on Wed Apr 05, 2006 4:10 am, edited 1 time in total.



Mon Apr 03, 2006 5:30 pm
User

Joined: Mon Dec 19, 2005 3:44 pm
Posts: 166
Post 
I have to do a little philosopy change with the "move" of the TFTP method. Until now I did a move after the TFTP download. But there is a big synchronisation's problem because we cannot know when the TFTP has finished to download all the files. Therefore when you have few routers/switches to "TFTP" download and some of them with low bandwidth, it happends that some files are not moved to yyymmdd folder (but are staying on the TFTProot) because the move started before the TFTP download was completly finished. With A very hudge amount of routers/switches I had no problem .. until now.
Therefore I remove my idea of "move" after the TFTP download. But I activate the TftpRoot and Tftppath parameters of Pancho for the people who have a TFTP which can do this.
So all the data will be copied under the TFTP path data (which must be under the TFTP root).

If someone has an idea how to solve this problem ..... (i.e: schedule later or an another move idea) http://forums.cacti.net/viewtopic.php?p=62213#62213

PS: If you want to try again with move you can "uncomment" the line 257 to 267 of the file "configmanager_gatewaytoprogram.php" (remove /* and */)

The last RELEASE is in the FIRST post


Last edited by pepj on Thu Apr 06, 2006 2:08 pm, edited 1 time in total.



Wed Apr 05, 2006 4:09 am
New User

Joined: Wed Apr 05, 2006 1:04 pm
Posts: 17
Post no right
When I attempt to manage the configs after installing the latest plugin, I get the error "error no right !!'... I have permissions setup and I am logged in as Admin... Did I miss something? I don't have secure.cfg setup, but at this point,I don't want to restrict this to a specific IP until I can get this working...


Wed Apr 05, 2006 1:13 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 197 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: