ConfigStore Plugin

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

aocampo wrote:
chadd wrote:
aocampo wrote:Hi Chadd!!

When I put the configstore directory in cacti/plugins, I can see the same trouble in my browser.

Please, could you help me?

Thanks in advance!!

Sure. Can you give me a list of all the other plugins you have? Also, keep sending updates if you can today, and we will get the problem resolved. Thanks.
Of course chadd! I have these plugins:

Monitor 1.2
Mactrack 2.9
Settings 0.7
Weathermap 0.97a
Superlinks 0.8
Thold 0.4.2

My Cacti version is 0.8.7g and my Plugin Architecture is 2.9.

Thanks for your prompt response!

Please try the latest version (0.5). I found that the settings plugin was also using a function called 'send_mail'. I made a few other bug fixes as well.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Latest version is 0.5 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
aocampo
Posts: 15
Joined: Wed Sep 29, 2010 11:03 am

Re: ConfigStore Plugin

Post by aocampo »

chadd wrote:Latest version is 0.5 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.

Thanks a lot chadd!! Sadly, now I have this warning message when I click over ConfigStore/Device Types:

Code: Select all

opendir(/var/www/cacti/plugins/configstore/lib) [function.opendir]: failed to open dir: No such file or directory in /usr/share/cacti/plugins/configstore/functions.php on line 432.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

aocampo wrote:
chadd wrote:Latest version is 0.5 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.

Thanks a lot chadd!! Sadly, now I have this warning message when I click over ConfigStore/Device Types:

Code: Select all

opendir(/var/www/cacti/plugins/configstore/lib) [function.opendir]: failed to open dir: No such file or directory in /usr/share/cacti/plugins/configstore/functions.php on line 432.
There is a line in configstore_device_types.php that reads:

$backup_scripts_dir = "/var/www/cacti/plugins/configstore/lib";

Make sure that is your path to the directory - likely it is not.. (I will fix this in the morning and release new code).

If yours is the same than make sure that the webserver has permissions to read and write to directories in configstore. I usually do:

chown -R 'webserver user':'some group' configstore

For me it is like this:

sudo chown -R www-data:netdev configstore

www-data is the user the webserver runs as, and netdev is the group I put myself and anyone else who wants to edit files in.

Then I give write access to the group like this: chmod -R g+w configstore

If that does not fix it, let me know. Look for new code tomorrow.

-chadd.
aocampo
Posts: 15
Joined: Wed Sep 29, 2010 11:03 am

Re: ConfigStore Plugin

Post by aocampo »

chadd wrote:
aocampo wrote:
chadd wrote:Latest version is 0.5 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.

Thanks a lot chadd!! Sadly, now I have this warning message when I click over ConfigStore/Device Types:

Code: Select all

opendir(/var/www/cacti/plugins/configstore/lib) [function.opendir]: failed to open dir: No such file or directory in /usr/share/cacti/plugins/configstore/functions.php on line 432.
There is a line in configstore_device_types.php that reads:

$backup_scripts_dir = "/var/www/cacti/plugins/configstore/lib";

Make sure that is your path to the directory - likely it is not.. (I will fix this in the morning and release new code).

If yours is the same than make sure that the webserver has permissions to read and write to directories in configstore. I usually do:

chown -R 'webserver user':'some group' configstore

For me it is like this:

sudo chown -R www-data:netdev configstore

www-data is the user the webserver runs as, and netdev is the group I put myself and anyone else who wants to edit files in.

Then I give write access to the group like this: chmod -R g+w configstore

If that does not fix it, let me know. Look for new code tomorrow.

-chadd.

Thanks again chadd, it solves my problem! In addition, I guess $log_file needs to be changed in configstore/lib/logger.class.php and configstore/include/logger.class.php
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Thanks! I will take a look through the code again when I get a chance and try to eliminate any "hard coded" paths. Glad it is working for you! There will be a lot of future additions, as soon as I can find the time in my schedule.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Latest version is 0.6 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain
conditions.

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
aocampo
Posts: 15
Joined: Wed Sep 29, 2010 11:03 am

Re: ConfigStore Plugin

Post by aocampo »

chadd wrote:Latest version is 0.6 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain
conditions.

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
Thanks chadd! I guess you should change the below piece of code in setup.php:

Code: Select all

function configstore_version () {
        return array(
                'name'      => 'ConfigStore',
                'version'   => '0.6',               <== it was 0.5
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

aocampo wrote:
chadd wrote:Latest version is 0.6 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain
conditions.

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
Thanks chadd! I guess you should change the below piece of code in setup.php:

Code: Select all

function configstore_version () {
        return array(
                'name'      => 'ConfigStore',
                'version'   => '0.6',               <== it was 0.5

HAHA, good catch. Will do.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

chadd wrote:
aocampo wrote:
chadd wrote:Latest version is 0.6 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under certain
conditions.

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page
it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
Thanks chadd! I guess you should change the below piece of code in setup.php:

Code: Select all

function configstore_version () {
        return array(
                'name'      => 'ConfigStore',
                'version'   => '0.6',               <== it was 0.5

HAHA, good catch. Will do.

Made the update to 0.6 in the setup file. Updated on original post. Please let me know if you find anymore bugs ;)
aocampo
Posts: 15
Joined: Wed Sep 29, 2010 11:03 am

Re: ConfigStore Plugin

Post by aocampo »

chadd wrote: Made the update to 0.6 in the setup file. Updated on original post. Please let me know if you find anymore bugs ;)
No problem my friend, I'm looking for bugs :P
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Latest version is 0.7 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under
certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
--- 0.7 ---
- Added onClick highlighting, select of an item. Complying with the rest of Cacti.
- Changed the table width to 100% for entire plugin for more space.
- Changed the "Device Filters" layout to keep from pushing out the table and causing issues.
- Changed the device page layout to only show the "inspect" magnifying glass when an item failed backups.
Also added a "no-wrap" style to make IE happy.
- Fixed the "Backup Status" and Device Status filters on the configstore_devices.php pages, so that those
fields cleared when the clear button is pushed.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

chadd wrote:Latest version is 0.7 and is updated on the first post. Here is the change log:

----[ Changelog

--- 0.1 ---
Initial Beta Release

--- 0.2 ---
- Fixed typo in lib/cisco-ios.php
- Corrected for wierd IOS prompts in lib/cisco_ios-telnet.php
- Corrected for wierd IOS prompts in lib/cisco_ios-ssh.php
- Updated configstore_poller.php to format run time in Hours, Minutes, Seconds instead of just Seconds
- Corrected problem with configstore_poller.php that kept email from being formatted correctly under
certain conditions

--- 0.3 ---
- Fixed account to device filter so that when you click on the number of devices that belong to an account on
the account page it actually filters the device list correctly.
- Added new device type for Cisco ASA.

--- 0.4 ---
- Fixed color change to active tab.
- Added Device Type manager, to make it easier to add your own backup scripts.
- Added Sites to help organize devices by physical location.
- Added the ability to do a mass change of devices to a new site, or authentication account.

--- 0.5 ---
- Changed the name of the 'send_mail' function to 'configstore_sendmail', because it was already declared in
the settings plugin.
- Fixed the plugin name under 'plugin management' to Plugin -> ConfStore.
- Fixed the filter, 'showing rows' to reflect the actual number of rows being shown.
--- 0.6 ---
- Fixed two bugs in the device filter. One was the search field did not work, and the other was the device type
filter did not work.
- Fixed hard coded file paths to use $config['base_path'].
--- 0.7 ---
- Added onClick highlighting, select of an item. Complying with the rest of Cacti.
- Changed the table width to 100% for entire plugin for more space.
- Changed the "Device Filters" layout to keep from pushing out the table and causing issues.
- Changed the device page layout to only show the "inspect" magnifying glass when an item failed backups.
Also added a "no-wrap" style to make IE happy.
- Fixed the "Backup Status" and Device Status filters on the configstore_devices.php pages, so that those
fields cleared when the clear button is pushed.

Found one small bug, fixed it, and reposted as v0.7 again.
r00tnix
Posts: 1
Joined: Tue Feb 01, 2011 11:15 pm

Re: ConfigStore Plugin

Post by r00tnix »

I need some help on getting this working. I am new to Cacti, but understand it fairly well. I installed your plugin .7 version, configured up the setting in Configuration->Settings->ConfigStore. Added an account, Site and Device (Cisco ASA). I click on backup, and nothing happens, light turns red and says failed.

Is there any type of debugging i can see what is going on? I am not getting any logs in the plugins/configstore/logs folder, and when i TCPDUMP the interface for the host I am trying to backup, I see no traffic as if the program is not starting the backup process.

Thanks for the help.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

There should be a little magnifying glass icon next to the little red dot. Click on that, and you can see what the problem was. Let me know what it says (if it doesn't makes sense to you) and I will try to help you fix the problem.

-chadd.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests