RouterConfigs Plugin Working on Ubuntu 16.04

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
chartech
Posts: 1
Joined: Thu May 11, 2017 8:08 am

RouterConfigs Plugin Working on Ubuntu 16.04

Post by chartech »

I have successfully debugged the code on routerconfigs plugins version .3 and got it working with the latest versions of PHP7 and Mysql 5.7.17 all running on Ubuntu 16.04 64 bit. Here are the versions of my setup:

Ubuntu 16.04 64 bit
Cacti 8.8f
PA 3.1
mysql 5.7.17
PHP 7.0.15-0ubuntu0.16.04.4
RRDtool 1.5.5
tftpd-hpa

I had to modify the syntax of a few of the PHP modules to support mysqli commands and other commands that were deprecated in PHP 7 and mysql5.5.

functions.php
router-accounts.php
router-devices.php
/Text/Diff/Renderer.php
/Text/Diff/Renderer/table.php

In functions.php, I had to add "mysqli_connect" for mysqli_real_escape_string to work and load the configs into mysql. It is in function plugin_routerconfigs_download_config.
$link = mysqli_connect("localhost", "root", "cacti123", "cacti");

If you keep the default password for the cacti mysql database you won't have to change it. If you deviate from the default password in the mysql cacti database, you will need to update the password in this line of the function. I'm sure there is a more fancier way, but this is what worked for me.

I have attached my zip of the updated files. Be sure to look in my tftpd-hpa-help folder.

As far as everything else, I followed the original readme except I tried to install tftp-server in the file but I couldn't get it working. So I installed tftpd-hpa and had it working in minutes.

Also, I don't think it is clear but you need to add the tables from the "routerconfigs.sql" file into the mysql cacti database.
Attachments
routerconfigs.zip
(69.06 KiB) Downloaded 99 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Re: RouterConfigs Plugin Working on Ubuntu 16.04

Post by rony »

[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests