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 »

tbo34 wrote:thanks for reply,
i have gone to one step further;
my first router's config goes to its config-subdirectory with its date-time in filename; does not give fail - no problem here.
(interestingly it also goes under main scp directory without date-time - is it supposed to be so?).

but the second router i added gives fail; it goes under main scp directory like the first one; but it doesn't go to subdirectory i pointed.
it gives RETURN CODE=1
spawn /usr/bin/ssh admin@192.168.100.242
admin@192.168.100.242's password:

Router_4507#copy run scp://192.168.2.200
Address or name of remote host [192.168.2.200]? 192.168.2.200
Destination username [admin]? mrtg
Destination filename [router_4507-confg]? Router_4507.cfg
Writing Router_4507.cfg
Password:
!!RETURN CODE: 1
Well, this is what I would do first. SSH to your device and run the command : copy run scp://192.168.2.200. Then answer the same on all the prompts and see what happens. Also, just as a suggestion. I normally use the hostnames of my devices as the "directory" label. That way I end up with a folder of configs that belong to a device, named for that device (just less confusion I think). Just keep in mind, the expect script that you are seeing the output of is just issuing the same commands in the same order that you see in the debug (nothing magic). It is likely that the problem will come clear when you go through a manual backup and see the actual error from the device. As far as having the directory sent for one router and not the other...that one baffles me.. I have never had that happen. If you configure a directory, it should specify a directory when uploading the config to your box. Hope this helps, and let me know what you find out please. If you indeed find a bug, also let me know. Thanks,

-chadd.
tbo34
Posts: 3
Joined: Thu Jul 21, 2011 7:05 am

Re: ConfigStore Plugin

Post by tbo34 »

Hi,
when i run the command "copy run scp://192.168.2.200" in 4507 device;
it sends the config to the configstore server, but it stucks somewhere and continues sending so slow that is unusual.

the config file is in the home directory correctly, but not in the subdirectory pointed in configstore; so it gives fail...

i think the problem is the router itself (maybe a bug in ios about scp); i tried with another cisco switch and no problem there.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

tbo34 wrote:Hi,
when i run the command "copy run scp://192.168.2.200" in 4507 device;
it sends the config to the configstore server, but it stucks somewhere and continues sending so slow that is unusual.

the config file is in the home directory correctly, but not in the subdirectory pointed in configstore; so it gives fail...

i think the problem is the router itself (maybe a bug in ios about scp); i tried with another cisco switch and no problem there.

Yes I have several Cisco switches that I am forced to use TFTP with, due to a bug in the SCP client. You can upgrade the code, but if your shop is like mine, you may not get the opportunity.. Good luck, and thanks for the update.

-chadd.
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: ConfigStore Plugin

Post by Vins »

Hi chadd,
I've noticed that the backups are working manually, but they don't start automatically for the daily backup... haven't found any issues nor strange logs... any hints?

By the way, many thanks for this plugin :)
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

Vins wrote:Hi chadd,
I've noticed that the backups are working manually, but they don't start automatically for the daily backup... haven't found any issues nor strange logs... any hints?

By the way, many thanks for this plugin :)

Well, don't know exactly what that might be, but the poller is run by the Cacti poller, so if you don't have Cacti polling going then the ConfigStore poller will not run. Next thing would be the settings for ConfigStore. Make sure that you have set a "Start Time for Backups". The last thing to check (that I can think of) would be permissions. If the user running the Cacti poller in cron is "cactiuser", and the cacti/plugins/configstore/backups directory is owned by the www user, then your going to run into issues. Make sure that the user running the cron job has write permissions to the backups directory. I run the cacti cron job with the web server user, just to keep things simple. Hope this helps, and I hope to have the next version of ConfigStore out soon.

-chadd.
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: ConfigStore Plugin

Post by Vins »

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
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

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.
BrentW
Posts: 2
Joined: Thu Jul 14, 2011 5:20 am

Re: ConfigStore Plugin

Post by BrentW »

chadd wrote:
BrentW wrote:Hi there

Maybe some else will find this usefull...
We still have CatOS switches that require backing up......
So ammended some files and created a CatOS backup script
Put then into the ../configstore/lib/ folder.....
Files are:
- cisco_Catos-ssh.exp
- cisco_Catos-telnet.exp
- cisco-Catos.php

Thanks for configstore

Brent
Thank you! I am working on 0.8 right now, and will roll your changes into that version.

Hi there

I have added a few more devices to our configstore in CACTI.
We have Cisco SAN switch, Cisco LocalDirectors & Cisco CSS so if anyone finds a use for it... Enjoy.
-cisco_ios-telnet-ld.exp
-cisco-ios-ld.php
-cisco_ios-telnet-css.exp
-cisco-ios-css.php
-cisco-ios-SAN.php

Been testing this for the since July 2011 and working 100% fine.

Thanks

Brent
Attachments
cisco-Catos-SAN-CSS-LD.zip
LD SAN Catos and CSS
(22.47 KiB) Downloaded 192 times
andrewpaulb
Posts: 13
Joined: Fri Apr 29, 2011 2:06 am

Re: ConfigStore Plugin

Post by andrewpaulb »

Hi all,

Thanks a lot for this superb plugin.. It completes our monitoring system :D

I would like to know how to repair the Current Config Option - Its giving me a Validation Error.

Other than that everything is working perfectly including daily backups :)

Regards
Andrew Paul Buttigieg
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Re: ConfigStore Plugin

Post by chadd »

andrewpaulb wrote:Hi all,

Thanks a lot for this superb plugin.. It completes our monitoring system :D

I would like to know how to repair the Current Config Option - Its giving me a Validation Error.

Other than that everything is working perfectly including daily backups :)

Regards
Andrew Paul Buttigieg

What version of the plugin are you using currently? I thought that I had fixed that, but I might not have published that code for whatever reason.. Let me know and I will post a patch for that version.

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

Re: ConfigStore Plugin

Post by chadd »

Here is a patch for .07 to fix the "Current Config" problem. I will update the one on the first page of this thread as well.

To apply the patch go into the directory that the file is in (in this case configstore) and apply the patch as follows:

patch < [path_to_patch_file]/configstore_devices.patch

So, given the attached configstore_devices.patch file is in your configstore directory, the command would be:

patch < configstore_devices.patch

Not sure how this process works in Windows, but you get the idea.

Had to tar the file to upload it to the forums, so you much untag first.

-chadd.
Attachments
configstore_devices.patch.tar
(3.5 KiB) Downloaded 212 times
andrewpaulb
Posts: 13
Joined: Fri Apr 29, 2011 2:06 am

Re: ConfigStore Plugin

Post by andrewpaulb »

I am using version 0.7.. Thanks the patch worked perfectly :)) Thanks a lot chadd .. ur a life saver.. the plugin is awesome ...
andrewpaulb
Posts: 13
Joined: Fri Apr 29, 2011 2:06 am

Re: ConfigStore Plugin

Post by andrewpaulb »

By any chance do you have a template for Cisco ACE ?

Best Regards
Andrew
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: ConfigStore Plugin

Post by Vins »

andrewpaulb wrote:By any chance do you have a template for Cisco ACE ?

Best Regards
Andrew
If the Cisco ACE configuration is text based and can be obtained the same way you gain a router configuration (this means "show run"), then the answer could be yes... I've slightly modified the expect script to reroute the "sh run" command done via ssh cli to a text file, so probably it can be done also for this kind of device... still ongoing but should works, let me know.
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: ConfigStore Plugin

Post by Vins »

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests