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 »

Vins wrote:In the configstore_poller.php at line 170 and 183 there's a hard-coded reference to

'<ahref="http://net10/cacti/plugins/configstore/ ... _status=-1&...

it is correct?

No. That will be fixed in the next release. I am very close, but if you provide a patch, I will patch the existing one and post it to the forum. Otherwise, just keep an eye out. On a related note, I am close to a point with the next release that I could release it, but have a ways to go on my actual goal. If anyone would like to get the new one a little early, let me know. If I have enough interest, I will post another working release. Here is a short list of the changes done now:

- Inventory management.
- Separation of Inventory and backups.
- Config Search - search for a string in the latest backups. i.e. how many switches have a particular command in their configs.
- Ability to keep Cacti devices and MacTrack devices in sync with ConfigStore.
- Location awareness. Everything has to be entered into inventory, and assigned a location. Management, Cacti/Mactrack integration, Backups, etc. is an option.
- API (never written an API, so I am sure that criticism will make it better ;)
- Abstraction of backup server into the accounts area instead of global settings. This was so that you can have multiple backup servers. This is so that you if you have a device behind a firewall, which is NATting for the device, you can tell the device to backup to the NAT IP. I am sure their are other uses, but that was mine.
- Ability to send a config from a particular context, or VRF on a device.
- Read only mode for most areas of ConfigStore.

Things that need to be done before official release:

- Tagging. Ability to tag inventory items to each other in a parent child relationship. (switch belongs to a stack who's master has an IP/hostname etc.)
- Documentation management. Ability to upload and tag documents to anything in inventory. i.e. Attach a floor plan to a floor in inventory, etc. Use your imagination..
- Contact/Contract man agent with tagging of course. This is primarily for vendor contract management. It is not a intended to be a replacement for a GAO - though it would be nice ;)
- Crypto Store. This is for keeping encrypted information i.e. username/passwords, etc.
- VPN manager. This may be worked into the Contact manager, but haven't thought it though completely yet. The purpose is provide an internal portal for people to update, and view VPN documentation. Everyone has their own VPN form they ask other companies to fill out when creating a site-to-site VPN that establishes encryption, PSK, contact info, peer addresses, etc. This will be that, in a web form to start with.

Any questions or comments welcome.

-chadd.
dtonated
Posts: 5
Joined: Tue Aug 03, 2010 10:23 pm

Re: ConfigStore Plugin

Post by dtonated »

I am very interested in your short list of changes, is there any way I can get a early release version?
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

dtonated wrote:I am very interested in your short list of changes, is there any way I can get a early release version?

I have had a set back.. ;) Well, not really a set back, as much as another redesign.. Unfortunately, it is going to take a bit longer than I thought, but I think the final product will be a little more flexible. The changes, in case you care, are that I decided to make ConfigStore a modular framework. I am trying to make it easier on myself in the future to add more bits and pieces, seeing as though I get frequent requests for more functionality from my company. Anyway, as soon as I get a working copy, I will post it to the forum, so that people can kick the tires. Cheers,

-chadd.
dtonated
Posts: 5
Joined: Tue Aug 03, 2010 10:23 pm

Re: ConfigStore Plugin

Post by dtonated »

sounds great, keep up the good work. are you on any particular timeline?
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

dtonated wrote:sounds great, keep up the good work. are you on any particular timeline?

Yeah, ASAP ;). I, like most people writing code for Cacti, do this in addition to all their other responsibilities. Unfortunately, my actual job tends to get in the way of writing code.. That, and meetings.. Why are meetings so important these days?? ;). I will try to get this out soon. Cheers,

-chadd.
dtonated
Posts: 5
Joined: Tue Aug 03, 2010 10:23 pm

Re: ConfigStore Plugin

Post by dtonated »

Awesome. I ran across something this morning as well. We use a special character in our SNMP community string ($) and I noticed with wireshark that when trying to TFTP a config with SNMP everything from the $ on gets chopped off. FYI.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

dtonated wrote:Awesome. I ran across something this morning as well. We use a special character in our SNMP community string ($) and I noticed with wireshark that when trying to TFTP a config with SNMP everything from the $ on gets chopped off. FYI.

What device type is it? Cisco_IOS?

If so, try changing line number 146 in configstore/lib/cisco-ios.php to the below:

$cmd = "$snmpset " . "-r " . $info['snmp_retries'] . " " . "-t " . $info['snmp_timeout'] . " " . "-Oqv " . "-v " . $info["snmp_version"] . " " . "-c " . "'" . $info['snmp_writestring'] . "'" . " " . $device['ipaddress'] . ":" . $info['snmp_port'];

Just added single quotes around the community string. That should do it. Sorry about that. Fixed in next release ;)

-chadd.
dtonated
Posts: 5
Joined: Tue Aug 03, 2010 10:23 pm

Re: ConfigStore Plugin

Post by dtonated »

That did it, thanks.
oramatel
Posts: 3
Joined: Mon Apr 06, 2009 11:53 pm

Re: ConfigStore Plugin

Post by oramatel »

chadd wrote:
Vins wrote:I forgot to mention that all other Cacti queries and graphs are still working like usual; I've also verified with a tcpdump that the Cacti server is not even trying to ssh the destination devices (but if I start the backup manually all is working normally)... the destination directory permission should not be the root cause also for this reason, it stops before...

Is there a way to force a backup via command line of the entire devices list? this way maybe I'll be able to pinpoint the issue...

Many thanks
:D

Command line options in next release hopefully.. Is your device "enabled" for backups? If it is not, you would still be able to do the manual backup, but it would be skipped in a poll cycle.. You can run the configstore_poller.php by itself but there will not be much useful output.. Other than that, I am at a loss. Try running the poller by itself (from the command line) and see if you get any errors or anything. Let me know what you find. Thanks.
Hi Vins,
Did you end up finding out why the poller wasn't running automatically?
I'm experiencing the same issue.
Thanks/Regards,
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

oramatel wrote:
chadd wrote:
Vins wrote:I forgot to mention that all other Cacti queries and graphs are still working like usual; I've also verified with a tcpdump that the Cacti server is not even trying to ssh the destination devices (but if I start the backup manually all is working normally)... the destination directory permission should not be the root cause also for this reason, it stops before...

Is there a way to force a backup via command line of the entire devices list? this way maybe I'll be able to pinpoint the issue...

Many thanks
:D

Command line options in next release hopefully.. Is your device "enabled" for backups? If it is not, you would still be able to do the manual backup, but it would be skipped in a poll cycle.. You can run the configstore_poller.php by itself but there will not be much useful output.. Other than that, I am at a loss. Try running the poller by itself (from the command line) and see if you get any errors or anything. Let me know what you find. Thanks.
Hi Vins,
Did you end up finding out why the poller wasn't running automatically?
I'm experiencing the same issue.
Thanks/Regards,

Did you run the poller from the command line? What OS are you running? Are you seeing any errors in the Cacti log, or in your web server logs? Has it ever worked, or are you trying it for the first time? What are the permissions of your "backups" directory? Sorry your having trouble, let me know what you can and I will try to help.

-chadd.
oramatel
Posts: 3
Joined: Mon Apr 06, 2009 11:53 pm

Re: ConfigStore Plugin

Post by oramatel »

chadd wrote:
Did you run the poller from the command line? What OS are you running? Are you seeing any errors in the Cacti log, or in your web server logs? Has it ever worked, or are you trying it for the first time? What are the permissions of your "backups" directory? Sorry your having trouble, let me know what you can and I will try to help.

-chadd.
Hi Chadd,
Find below answer to your questions:
Did you run the poller from the command line? Yes
What OS are you running? Ubuntu 11.04, 64bit
Are you seeing any errors in the Cacti log, or in your web server logs? Nothing
Has it ever worked, or are you trying it for the first time? Never, however manual device backup via the web interface is always successful.
What are the permissions of your "backups" directory? 777 owned by nobody
Thanks for your time,
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

oramatel wrote:
chadd wrote:
Did you run the poller from the command line? What OS are you running? Are you seeing any errors in the Cacti log, or in your web server logs? Has it ever worked, or are you trying it for the first time? What are the permissions of your "backups" directory? Sorry your having trouble, let me know what you can and I will try to help.

-chadd.
Hi Chadd,
Find below answer to your questions:
Did you run the poller from the command line? Yes
What OS are you running? Ubuntu 11.04, 64bit
Are you seeing any errors in the Cacti log, or in your web server logs? Nothing
Has it ever worked, or are you trying it for the first time? Never, however manual device backup via the web interface is always successful.
What are the permissions of your "backups" directory? 777 owned by nobody
Thanks for your time,
When you ran it from the command line, did you get any errors?
Also, did you set up the polling start time in settings?
Did you set up mail server settings?

If you do the following in mysql:
SELECT * FROM settings WHERE name = 'plugin_configstore_running';
What do you get?

If 'value=1' then do the following in mysql:
UPDATE settings SET value = 0 WHERE name = 'plugin_configstore_running';

I guess if it died in a polling cycle before it got a chance to update the run status again, then it would never again run.. Anyway, let me know what you find, and we'll go from there.

-chadd.
oramatel
Posts: 3
Joined: Mon Apr 06, 2009 11:53 pm

Re: ConfigStore Plugin

Post by oramatel »

chadd wrote: When you ran it from the command line, did you get any errors?
Also, did you set up the polling start time in settings?
Did you set up mail server settings?

If you do the following in mysql:
SELECT * FROM settings WHERE name = 'plugin_configstore_running';
What do you get?

If 'value=1' then do the following in mysql:
UPDATE settings SET value = 0 WHERE name = 'plugin_configstore_running';

I guess if it died in a polling cycle before it got a chance to update the run status again, then it would never again run.. Anyway, let me know what you find, and we'll go from there.

-chadd.
Hi Chad,

Answers as follows:
When you ran it from the command line, did you get any errors? nothing
Also, did you set up the polling start time in settings? yes, it is set to 1:00AM
Did you set up mail server settings? yes

If you do the following in mysql:
SELECT * FROM settings WHERE name = 'plugin_configstore_running';
What do you get? 1

As you guessed, once i set the setting back to 0 the poller was able to run and the enabled devices were backed up.
Thanks again for your time to follow this up.
On another note, any chance to get a copy of the new configstore release?
Regards,
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

oramatel wrote:
chadd wrote: When you ran it from the command line, did you get any errors?
Also, did you set up the polling start time in settings?
Did you set up mail server settings?

If you do the following in mysql:
SELECT * FROM settings WHERE name = 'plugin_configstore_running';
What do you get?

If 'value=1' then do the following in mysql:
UPDATE settings SET value = 0 WHERE name = 'plugin_configstore_running';

I guess if it died in a polling cycle before it got a chance to update the run status again, then it would never again run.. Anyway, let me know what you find, and we'll go from there.

-chadd.
Hi Chad,

Answers as follows:
When you ran it from the command line, did you get any errors? nothing
Also, did you set up the polling start time in settings? yes, it is set to 1:00AM
Did you set up mail server settings? yes

If you do the following in mysql:
SELECT * FROM settings WHERE name = 'plugin_configstore_running';
What do you get? 1

As you guessed, once i set the setting back to 0 the poller was able to run and the enabled devices were backed up.
Thanks again for your time to follow this up.
On another note, any chance to get a copy of the new configstore release?
Regards,

Soon. I am swamped at work right now and haven't had the time I need to finish it up. I want to get it done ASAP, and I'll post when there is a working copy available.

-chadd.
spoonman
Cacti User
Posts: 305
Joined: Tue May 03, 2005 8:54 am
Location: GA

Re: ConfigStore Plugin

Post by spoonman »

Can someone post screenshots of their working configstore settings and device settings?? I 'm using v7 and when I add a device/under debug info i see a successful tftp backup to my tftp server...but the file is not on my tftp server .....I can successfully run the copy run tftp from any of my cisco switches and send the config files to the /tftpboot dir on my server...

Thanks
Cliff
CCNA
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests