ConfigStore Plugin
Moderators: Developers, Moderators
ConfigStore Plugin
ConfigStore is a plugin for backing up device configurations - based on the routerconfigs plugin. It is under development at the moment, but at a point that I think it could be useful.
Like with anything, you should make backups, be careful, etc. before installing. I make no warranty.
This plugin uses the PIA 2.x, so just untar, ungzip the file to your plugin directory and go to Plugin Management.
For further instructions please read the README file included in the tar ball. Better documentation will follow shortly.
This plugin is under active development, so fixes/features will be coming soon.
For now please post back to this thread if you have questions, problems, etc. I will work on getting a site to put releases on in the future, but that will be a ways off.
Have fun!
-chadd.
Like with anything, you should make backups, be careful, etc. before installing. I make no warranty.
This plugin uses the PIA 2.x, so just untar, ungzip the file to your plugin directory and go to Plugin Management.
For further instructions please read the README file included in the tar ball. Better documentation will follow shortly.
This plugin is under active development, so fixes/features will be coming soon.
For now please post back to this thread if you have questions, problems, etc. I will work on getting a site to put releases on in the future, but that will be a ways off.
Have fun!
-chadd.
- Attachments
-
- configstore-v0.7.tar.gz
- ConfigStore v0.7
- (104.93 KiB) Downloaded 1120 times
Last edited by chadd on Mon Nov 14, 2011 2:07 pm, edited 16 times in total.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Dont forget to post to the docs once its stable.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Found out that I did not account for not having to use a normal password, and an enable password when doing terminal logins. Now if you have a user set up with the privilege level to do enabled commands at first login, it should work. Just use the password field in the account form, and leave the enable password field blank if that is your case.
Could certainly use a beta tester.Marcelo wrote:Excelent work! if you need some betatester, feel free to contact me.
I have equipment from Cisco, Juniper, Arris, Nortel.
cya.
Have decided right now not to support Nortel. Most importantly because the config (at least on the switches we have) is binary. I have not looked into ways of making it text. Two, we are getting rid of them, and I don't know for sure, but I think they are defunct..
As for Juniper and Arris, I don't have either of those vendors equipment to test on. If you would like to send me info on them (login process, backup process, snmp mibs, etc.) I could try to do something if I get some time. The only issue is that you would have to do the testing. A better plan would be for you to add that functionality and post back the files . It is quite easy to add new vendor types (not as easy as I would like, but still quite easy). If you want to know what files to edit/create, let me know I will make a little recipe.
Anyway, thanks.
-chadd.
Sorry, I don't want to seem callus, but I really can't spend the time on getting Nortel devices to work. I think that even if I did, the config backup you have would not be able to be re-uploaded to a device for recovery. It would only serve as a template for the manual configuration of a device. Which may be very useful to people, but not to my current employer (as we would just replace it with a different vendors equipment).eternal wrote:For nortel routers look at bcc
If someone wants to work on backups for Nortel devices, using this plugin, I would be happy to answer any questions they might have in the process of writing the code.
The easiest way to get started (and this goes for any new currently unsupported equipment) would be as follows:
1.) Change code starting on line 98 of the configstore_devices.php file shown here:
"devicetype" => array(
"method" => "drop_array",
"friendly_name" => "Device Type",
"description" => "Choose the type of device.",
"value" => "|arg1:devicetype|",
"default" => 0,
"array" => array(1 => 'Cisco-IOS', 2 => 'Foundry'),
),
Add your new device type to the array, so it shows up in the drop down.
2.) Edit the functions.php file to detect your new device type and call the new php file you are going to create. Below is the section of code you need to edit (around line 84):
// Cisco-IOS device type
if ($device['devicetype'] == '1') {
if(!file_exists($config['base_path'] . '/plugins/configstore/lib/cisco-ios.php')) {
return false;
} else {
include_once($config['base_path'] . '/plugins/configstore/lib/cisco-ios.php');
$backup_results = cisco_ios_get_config($device);
}
// Foundry device type
} elseif ($device['devicetype'] == '2') {
if(!file_exists($config['base_path'] . '/plugins/configstore/lib/foundry.php')) {
return false;
} else {
include_once($config['base_path'] . '/plugins/configstore/lib/foundry.php');
$backup_results = foundry_get_config($device);
}
} else {
return false;
}
As you can infer, your new device type will be 3 and you will include a new file you are about to create to do the actual backup of the device.
3.) Create the new backup script and put it in the "lib" directory. You can just make a copy of one of the .php files currently in there (like cisco-ios.php or foundry.php) and modify it for your purposes. The expect scripts in the "lib" directory I am just using to do the terminal logins, and return the output to the backup script (cisco-ios.php or foundry.php). This script you create just has to return the following array back to the functions.php script:
$backup_results = array('device' => $device['id'],
'btime' => $t,
'directory' => $dir,
'filename' => $filename,
'config' => $data,
'lastchange' => $lastchange,
'username' => $lastuser,
'hostname' => $hostname,
);
It doesn't matter how you get this information, just that it gets sent back to the functions.php script in this format.
And that should be it. You should have support for your new device. The scripts I have included so far (cisco-ios.php and foundry.php) support all the different methods of backing up one of these devices. Your script does not have to - it only needs to support the method you would like to use. The "configstore_accounts" script should be able to accommodate your authentication requirements. If not, that can be changed too.
Hope this helps someone, and don't be afraid to ask me questions. I may not be able to answer them, but I will try. Good luck.
-chadd.
Any of the newer Avaya/Nortel (25xx,45xx,55xx,56xx, and 8xxx) switches also support ascii config management when running newer code.chadd wrote: Could certainly use a beta tester.
Have decided right now not to support Nortel. Most importantly because the config (at least on the switches we have) is binary...
Current cacti install
-------------------------
Hardware: ESXi 5.1 VM
Software Load: FreeBSD 9.0 + Lighttpd + MySQL + Cacti 0.8.7
Plug-ins loaded: aggregate, flowview, monitor, realtime, rrdclean, syslog, spikekill, settings, thold, weathermap, and uptime.
-------------------------
Hardware: ESXi 5.1 VM
Software Load: FreeBSD 9.0 + Lighttpd + MySQL + Cacti 0.8.7
Plug-ins loaded: aggregate, flowview, monitor, realtime, rrdclean, syslog, spikekill, settings, thold, weathermap, and uptime.
If you post the methods (ssh, telnet, scp, tftp, scpserver, snmp, etc.) that you'd like, and the data I need to write the code (login proceedure capture, mibs, etc.) I will give the code a try - and you can test it for me, as I have no Avaya/Nortel equipment to test on.. Let me know, and I will try to help.zgamer wrote:Any of the newer Avaya/Nortel (25xx,45xx,55xx,56xx, and 8xxx) switches also support ascii config management when running newer code.chadd wrote: Could certainly use a beta tester.
Have decided right now not to support Nortel. Most importantly because the config (at least on the switches we have) is binary...
-chadd.
Who is online
Users browsing this forum: No registered users and 1 guest