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 »

OK. I just downloaded a fresh copy of Cacti from the site (http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz), a fresh copy of PIA (http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz), and the latest version of ConfigStore from this forum (http://forums.cacti.net/download/file.php?id=22597). I installed all three on a VM of Ubuntu 10.04LTS, running apache2 and mysql 5. I imported the cacti.sql file to the new database I created for cacti (cacti), and granted permissions to my cactiuser (cactiuser). Then copied all the PIA files into cacti, and import the pa.sql file into the same cacti database. Then I un tared, and copied all the ConfigStore files into the plugin directory, so now there is a configstore directory inside the plugins directory. I then granted permissions to my new admin user to see both the plugin management area, and ConfigStore. Then I installed, and activated ConfigStore. I then followed the same steps you outlined in your previous example (add an account called test, add a device called test, then assign the test account to the test device.). I received no errors up to this point. I have not tested a backup yet, as my VM does not have access to anything, but I would assume that there would be no problems there either.. Please confirm that you have installed Cacti, PIA(v2), and ConfigStore correctly. Please check the database and make sure all tables shown below are there in your installation:

mysql> show tables like '%configstore%';
+---------------------------------+
| Tables_in_cacti (%configstore%) |
+---------------------------------+
| plugin_configstore_accounts |
| plugin_configstore_archive |
| plugin_configstore_backups |
| plugin_configstore_device_types |
| plugin_configstore_devices |
| plugin_configstore_sites |
| plugin_configstore_templates |
+---------------------------------+
7 rows in set (0.00 sec)

mysql>

Please make sure that your webserver user has ownership, or can at least read the configstore directory - and write to the configstore/backups directory:

If all these things are verified, then you may have to reinstall ConfigStore - which is simple enough. Just go to plugin management, click disable, then click uninstall. Then do the same in reverse (install, activate). Check the database again, as well as permissions, and try to create an account, device, etc. If you still get the errors, and weird behavior, please give a full inventory (OS, versions of all relevant software, etc.). Sorry your having issues with the plugin. Hope this post helps you figure it out.

-chadd.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

Hi sir,

Below is the plugin details which i am using in cacti


Plugin Management (Cacti Version: 0.8.7g, Plugin Architecture Version: 2.8)
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

I have download the file configstore-v0.7.tar.gz

copy the file in the plugins folder
cd /var/www/html/plugins

After that i extract the file by below command
tar -xvzf configstore-v0.7.tar.gz

this only step i have taken , any other then step required so pls tell .
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

sharekhan wrote:I have download the file configstore-v0.7.tar.gz

copy the file in the plugins folder
cd /var/www/html/plugins

After that i extract the file by below command
tar -xvzf configstore-v0.7.tar.gz

this only step i have taken , any other then step required so pls tell .

1.) Do you have the PIA(Plugin Architecture) installed (version 2+)?

2.) Did you go to the "plugin management" area of the console, and "install" and "activate" the plugin?

3.) What version of Cacti are you using?

4.) Do you have other plugins that are working?

5.) Are you running Cacti on a Windows server, or NIX server - if NIX what flavor?

If you can answer these questions, I can better direct my help on the matter. It is difficult to say what the problem might be with the information I have at the moment. Thanks, and good luck.

-chadd.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

1.) Do you have the PIA(Plugin Architecture) installed (version 2+)?
Ans: Yes, with the version Plugin Architecture Version: 2.8.

2.) Did you go to the "plugin management" area of the console, and "install" and "activate" the plugin?
Ans: Yes, i can able to install and activiate the plugin

3.) What version of Cacti are you using?
Ans: Cacti Version: 0.8.7g

4.) Do you have other plugins that are working?
Ans: Yes, i.e syslog, Mactrack, Discovery etc. are working properly

5.) Are you running Cacti on a Windows server, or NIX server - if NIX what flavor?
Ans: CactiEZ - Centos 5

If you can answer these questions, I can better direct my help on the matter. It is difficult to say what the problem might be with the information I have at the moment. Thanks, and good luck.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Is it possible for you to show screen shots of the errors? Also, do you get any errors in your Apache2 log?

Can you post any errors you are getting in your apache2/error.log (as it relates to this)? Not sure where that is on CentOS, but in Ubuntu it is /var/log/apache2/error.log.

Also, any screen shots of the problems you are having. I am at a loss at the moment.. Sorry..

-chadd.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ConfigStore Plugin

Post by noname »

Hi chadd,
sorry for silly question..

configstore_accounts.php:

Code: Select all

655:  $sql = "SELECT * FROM plugin_configstore_accounts limit " . ($num_rows*($_REQUEST["page"]-1)) . ", $num_rows";
656:  
657:  $result = db_fetch_assoc($sql);

...

693:  foreach ($result as $row) {
...
713:          form_checkbox_cell($row["hostname"], $row["id"]);
It seems that 'hostname' field is not existed in 'plugin_configstore_accounts' table,
where does it (=$row["hostname"]) come from?
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

noname wrote:Hi chadd,
sorry for silly question..

configstore_accounts.php:

Code: Select all

655:  $sql = "SELECT * FROM plugin_configstore_accounts limit " . ($num_rows*($_REQUEST["page"]-1)) . ", $num_rows";
656:  
657:  $result = db_fetch_assoc($sql);

...

693:  foreach ($result as $row) {
...
713:          form_checkbox_cell($row["hostname"], $row["id"]);
It seems that 'hostname' field is not existed in 'plugin_configstore_accounts' table,
where does it (=$row["hostname"]) come from?

Thanks, you did catch a typo, but it is insignificant to the function of the code. Line 713 should be:

713: form_checkbox_cell($row["name"], $row["id"]);

form_checkbox_cell is a core cacti function that displays the checkbox, and the field in error was just the title of that form field - as you can see below in the cacti function:

/* form_checkbox_cell - format's a tables checkbox form element so that the cacti js actions work on it
@arg $title - the text that will be displayed if your hover over the checkbox */
function form_checkbox_cell($title, $id) {
print "\t<td onClick='select_line(\"$id\", true)' style='" . get_checkbox_style() . "' width='1%' align='right'>\n";
print "\t\t<input type='checkbox' style='margin: 0px;' id='chk_" . $id . "' name='chk_" . $id . "'>\n";
print "\t</td>\n";
}


Now that I am looking at the code, it isn't even used in that function... Eitherway, I will correct that in the next release. Thanks again.

-chadd.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: ConfigStore Plugin

Post by noname »

Thanks for the detailed explanation.

I felt strange when I looked sharekhan's post, but now I understood very well.
Thanks again.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

Hi Sir,

Thank u

One problem has got solved, now i can create the Account properly without any error.

after creating everything properly then to i cant able to take the backup . even not getting any error .

below are small explain of the diagram

(Source) (Port any) (Destination)
Cacti server--->cisco L2--->cisco L3--->Firewall--->router (SSH)

in firewall log its showing it connecting on 161(snmp) port only .why i dont know
i enable source to destination port any on firewall

below step which are created in cacti server.

I click the Console -> Configstore Device Accounts

Click --> ADD -> Account: [new]

1) Name = test (DONE)
2) Backup Protocol = TFTP (DONE)
3) Account Type = SSH (DONE)
4) Username = test
5) Password = test (The same user name pass created in router for testing purpose.)
6) Enable Password = (DONE)
7) Private Key Path = (What to add i don't know )
After fill the requirement i select to save


Configstore Devices

Click --> ADD -> Query: [new]

1) Enable Device = (I check the BOX)
2) Description = test
3) IP Address = 192.168.x.x (Router ip add)
4) Directory = plugins/configstore/backups
5) Schedule = Daily
6) Device Type = Cisco-IOS
7) Authenication Account = test (Which i create in account option upwarde)

After finish i have start to taking backup but no success .


pls tell me sir what will be the problem .
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

Hi sir ,

i getting the error , how to solve it

Console -> Cacti Settings -> ConfigStore

expect Binary Path /usr/bin/expect
The path to your expect binary. [ERROR: FILE NOT FOUND]
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

sharekhan wrote:Hi sir ,

i getting the error , how to solve it

Console -> Cacti Settings -> ConfigStore

expect Binary Path /usr/bin/expect
The path to your expect binary. [ERROR: FILE NOT FOUND]

This error is because you don't have expect installed. Expect is the scripting language being used to actually issue the commands on the device. Expect is used when "terminal" connections are being made (telnet, ssh). Just google expect, and download/install the binary, then put the path to the installed binary in the settings of configstore.

As far as your connection through your firewall goes, if you are doing ssh to the device and tftp back from the device, you will have to open the port for your tftp connection from the device - as it is not going to be a state-full connection. What you are doing is using ssh to connect the the device, and asking the device to initiate a tftp connection back to your server. Anyway, hope this helps. In your defense, this is the only thing in the README file that would give you any indication that you needed expect.. (You will need to make sure the paths to all the required tools are set correctly.). I will update the README file with more explicit instructions, and try to get some more formal documentation done. I am in the middle of a pretty big over-haul of ConfigStore at the moment - so the documentation will have to wait until I am done. Cheers.

-chadd.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

thank u very much sir ,

i will wait for the ConfigStore & documentation.

god will help u in doing good.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

Hi Sir,

I have install the expect-5.42.1-1.i386.rpm in cacti

after install now i can able to take backup of router through SSH .

thank u very much to guide me the proper way.its really help.


Thank u very much sir.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: ConfigStore Plugin

Post by sharekhan »

Hi Sir,

I have install the expect-5.42.1-1.i386.rpm in cacti

after install now i can able to take backup of router through SSH .

thank u very much to guide me the proper way.its really help.


Thank u very much sir.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests