Config Backup plugin help

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Author
Message
DarkLogix
Posts: 29
Joined: Thu Apr 19, 2018 1:08 pm

Re: Config Backup plugin help

#31 Post by DarkLogix » Tue May 08, 2018 10:14 am

Sorry for taking so long to get back I came down with a bit of a cold.

So I downloaded the new file from
https://docs.cacti.net/plugin:routerconfigs

Extracted it's contents and renamed the folder from "plugin_routerconfigs-develop" to "routerconfigs" then I uploaded that folder to the server.
Stopped Cacti via "systemctl stop httpd"
copied the new contents to the routerconfigs plugin folder via
"cp -Rf /home/(myusename)/routerconfigs/* /usr/share/cacti/plugins/routerconfigs/"
started cacti via "systmctl start httpd"

Then in the utilities section I no longer see router configs, but under plugin management I see it there, so i tried uninstall/reinstall via the plugin management (I figure only one devices ATM so should be easy to recreate) but now it gives the error
Plugin directory is not correct. Should be " but is 'routerconfigs'

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#32 Post by netniV » Tue May 08, 2018 6:04 pm

Can you get me a listing of your plugins directory and the routerconfigs directory?

DarkLogix
Posts: 29
Joined: Thu Apr 19, 2018 1:08 pm

Re: Config Backup plugin help

#33 Post by DarkLogix » Wed May 09, 2018 10:28 am

See attached.
Attachments
Rconfig.png
Rconfig.png (22.76 KiB) Viewed 868 times
Cacti-Plugin.png
Cacti-Plugin.png (5.8 KiB) Viewed 868 times

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#34 Post by netniV » Wed May 09, 2018 3:29 pm

OK, looks OK so far. Two more bits of information, can you get me the contents of the INFO file and run the following SQL command:

Code: Select all

select * from plugin_config

DarkLogix
Posts: 29
Joined: Thu Apr 19, 2018 1:08 pm

Re: Config Backup plugin help

#35 Post by DarkLogix » Wed May 09, 2018 3:40 pm

I had to add the command "USE cacti" for the DB part.
Attachments
info.png
info.png (7.68 KiB) Viewed 865 times
MySQL.png
MySQL.png (3.58 KiB) Viewed 865 times

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#36 Post by netniV » Wed May 09, 2018 6:27 pm

OK so you haven't got the plugin installed and you can't actually install it. Does your cacti DB user have rights to modify the schema (ie, create temporary tables etc?) if not, that could be messing things up

User avatar
camerabob
Cacti User
Posts: 275
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: Config Backup plugin help

#37 Post by camerabob » Thu May 10, 2018 8:20 am

DarkLogix wrote: Extracted it's contents and renamed the folder from "plugin_routerconfigs-develop" to "routerconfigs" then I uploaded that folder to the server.
Stopped Cacti via "systemctl stop httpd"
copied the new contents to the routerconfigs plugin folder via
"cp -Rf /home/(myusename)/routerconfigs/* /usr/share/cacti/plugins/routerconfigs/"
started cacti via "systmctl start httpd"
The one thing I would have done differently would have been to rename the old routerconfigs folder (to routerconfigs.old or .version), then renamed the new folder to 'routerconfigs'. This way you have a complete install without any of the old code hanging around inadvertently. That's what I did when I updated all my plugins, and I haven't had a single hiccup.
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.4 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

DarkLogix
Posts: 29
Joined: Thu Apr 19, 2018 1:08 pm

Re: Config Backup plugin help

#38 Post by DarkLogix » Thu May 10, 2018 9:46 am

netniV wrote:OK so you haven't got the plugin installed and you can't actually install it. Does your cacti DB user have rights to modify the schema (ie, create temporary tables etc?) if not, that could be messing things up
I think the cacti DB user has the needed rights, because previously it was able to load the prior version of the plugin.

DarkLogix
Posts: 29
Joined: Thu Apr 19, 2018 1:08 pm

Re: Config Backup plugin help

#39 Post by DarkLogix » Thu May 10, 2018 11:41 am

camerabob wrote: The one thing I would have done differently would have been to rename the old routerconfigs folder (to routerconfigs.old or .version), then renamed the new folder to 'routerconfigs'. This way you have a complete install without any of the old code hanging around inadvertently. That's what I did when I updated all my plugins, and I haven't had a single hiccup.
Ok so now I removed the routerconfigs directory and all files in it, then copied the directory from the zip (the newer one) did chown to give the dir and all it's files to root, and chmod to set the perms to 766 (hope that's good) and restarted httpd.

Now Cacti isn't showing any plug-in.

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#40 Post by netniV » Thu May 10, 2018 3:56 pm

Sorry, I'm away at the moment so I will have to look again at this once I'm back. There is a word of warning from 1.4, there is a Backups folder placed in the routerconfigs folder. This is the default archive location of the plugin. You can change that, but if you don't renaming or removing the current folder will result in a loss of being able to view backups as they are no longer stored in the database.

wazw
Posts: 4
Joined: Thu Jan 17, 2019 7:08 am

Re: Config Backup plugin help

#41 Post by wazw » Thu Jan 17, 2019 7:15 am

Hi,

I'm working to setup Rconfig on cacti 1.1.38, I'm stacking with the error below.
It seems that it coudln't find a prompt after the login. Any ideas how to fix this please?

019/01/17 12:54:21 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Attempt 1 of 10 to find prompt
2019/01/17 12:54:21 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Timeout of 10 seconds has been reached
2019/01/17 12:54:11 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: -->
2019/01/17 12:54:11 - RCONFIG 10.234.130.231 (SSH) -> NOTICE: Ensuring process is enabled
2019/01/17 12:54:11 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Connected via ssh
2019/01/17 12:54:11 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: okay: logged in...
2019/01/17 12:54:09 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Setting sleep time to 125000 microsecond(s)
2019/01/17 12:54:09 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Setting timeout to 10 second(s)
2019/01/17 12:54:09 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Creating SSH(Server: (IP), User: , Password: (Not Set), Enablepw: (Not Set), Devicetype: {"username":"username:","password":"password:","copytftp":"copy start tftp","version":"show version","sleep":"125000","timeout":"1","forceconfirm":"","checkendinconfig":"on"}

Thanks.

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#42 Post by netniV » Thu Jan 17, 2019 1:23 pm

You haven't set any SSH credential details as they are all blank. Even the password shows as (not set) to highlight this :)

wazw
Posts: 4
Joined: Thu Jan 17, 2019 7:08 am

Re: Config Backup plugin help

#43 Post by wazw » Mon Jan 21, 2019 3:35 am

netniV wrote:You haven't set any SSH credential details as they are all blank. Even the password shows as (not set) to highlight this :)
Hi, I had to check the functions.php, now I can see the credentials, however it still stacking on the prompt. any ideas, please?

2019/01/21 09:32:42 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Attempt 2 of 10 to find prompt
2019/01/21 09:32:42 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Timeout of 10 seconds has been reached
2019/01/21 09:32:32 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: -->
2019/01/21 09:32:32 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Attempt 1 of 10 to find prompt
2019/01/21 09:32:32 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Timeout of 10 seconds has been reached
2019/01/21 09:32:22 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: -->
2019/01/21 09:32:22 - RCONFIG 10.234.130.231 (SSH) -> NOTICE: Ensuring process is enabled
2019/01/21 09:32:22 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Connected via ssh
2019/01/21 09:32:22 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: okay: logged in...
2019/01/21 09:32:21 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Setting sleep time to 125000 microsecond(s)
2019/01/21 09:32:21 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Setting timeout to 10 second(s)
2019/01/21 09:32:21 - RCONFIG 10.234.130.231 (SSH) -> DEBUG: Creating SSH(Server: HOST, User: Username, Password: (11 chars), Enablepw: (11 chars), Devicetype: {"username":"username:","password":"password:","copytftp":"copy running-config tftp","version":"show version","sleep":"125000","timeout":"1","forceconfirm":"","checkendinconfig":"on"}
2019/01/21 09:32:21 - RCONFIG 10.234.130.231 -> DEBUG: Attempting to connect via SSH

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: Config Backup plugin help

#44 Post by netniV » Mon Jan 21, 2019 5:27 am

That is expecting to find a "#" or ">" prompt. What is the prompt when you connect manually?

wazw
Posts: 4
Joined: Thu Jan 17, 2019 7:08 am

Re: Config Backup plugin help

#45 Post by wazw » Mon Jan 21, 2019 5:31 am

netniV wrote:That is expecting to find a "#" or ">" prompt. What is the prompt when you connect manually?
I'm getting "Press any key to continue" when I try to connect manually, then I'm having "#"

Post Reply