Table 'cacti.plugin_routerconfigs_devicetypes' doesn't exist

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Table 'cacti.plugin_routerconfigs_devicetypes' doesn't exist

Post by magikk »

Hi,

I try to configure routerconfigs . I have installed the plugin and i try to add a device into Utilities>"Router configs".
The device that i try to test is a cisco firewall "adaptative security appliance".
When i click on "Create" i have O rows..
I tried to write from the cacti database (as advised in a post):
select * from plugin_routerconfigs_devicetypes;
....And indeed the table 'cacti.plugin_routerconfigs_devicetypes' doesn't exist , but maybe it is normal when no devices are created yet , i don't know...

I have also a few doubts concerning the RRD Cleaner Backup directory : the soft has mentionned /usr/share/cacti/rra/backup/ for it automatically.
And for "Backup Directory Path" (The path to where your Configs will be backed up, it must be the path that the local TFTP Server writes to.):
/home/configs/backups (the same in /etc/xinetd.d/tftp).
I can also say that these 2 backups directory are both void for now...(and they exist).

Thank you.
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

I have reinstalled the plugin and I have tried to do this (i am not sure ...):

Code: Select all

mysql -u root -p cacti < /usr/share/cacti/plugins/routerconfigs/routerconfigs.sql
And it seems that there is an error in cacti.sql ?! , i really don't understand:

Code: Select all

ERROR 1064 (42000) at line 53: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 11
Maybe i have done something wrong , because now it is very weird for my directories:
/usr/share/cacti/cacti/cacti/cacti/cacti/cacti , and probably infinitly .
Probably now i have to go to "/usr/share/cacti " and write #rm -rf cacti ?

But that doesn't answer to : how can i import this sql file? (routerconfigs.sql)
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

ok.I have deleted the bad directories.I have succedeed in adding a device, it is just that i have wrote nothing in "Directory
(This is the relative directory structure used to store the configs)." (is it good?) , i don't have tested the backup yet.
Maybe i have to wait tomorrow to see if it is working because now under configs i have : current - backups(0)
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

Here is my question:
how can i import the plugin_routerconfigs_devicetypes table?

I look at my routerconfigs.sql script located at "/usr/share/cacti/plugins/routerconfigs" and my problem is that in phpmyadmin i have the tables :

- plugin_routerconfigs_accounts
- plugin_routerconfigs_backups
- plugin_routerconfigs_devices

I tried to add in phpmyadmin>sql:

Code: Select all

CREATE TABLE plugin_routerconfigs_devicetypes (
  id int(12) NOT NULL auto_increment,
  `name` varchar(128) NOT NULL,
  username varchar(64) NOT NULL default 'sername:',
  `password` varchar(128) NOT NULL default 'assword:',
  copytftp varchar(64) NOT NULL default 'copy tftp run',
  version varchar(64) NOT NULL default 'show version',
  confirm varchar(64) NOT NULL default '',
  forceconfirm int(1) NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

but i have the error:

Code: Select all

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 11
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

I resolved myself this difficult problem:
I deleted myisam and now it works

(it was ENGINE = MYISAM AND NOT TYPE = MYISAM)

(So i guess that i also need to copy in phpmyadmin:
INSERT INTO plugin_routerconfigs_devicetypes (id, name, username, password, copytftp, version, confirm, forceconfirm) VALUES (1, 'Cisco IOS', 'sername:', 'assword:', 'copy run tftp', 'show version', 'y', 0),
(2, 'Cisco CatOS', 'sername:', 'assword:', 'copy config tftp', '', 'y', 1);

?
)
Last edited by magikk on Mon Jan 21, 2013 8:36 am, edited 1 time in total.
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

(i have added also , as the post said:
INSERT INTO plugin_routerconfigs_devicetypes (id, name, username, password, copytftp, version, confirm, forceconfirm) VALUES (3, 'ASA', 'sername:', 'assword:', 'write net', 'show version', 'y', 1)
)
***

I haven't succeed to backup my asa with routerconfigs yet , but i saw an error in the cacti's log (i am unable to interpret it - an id problem?).

(I copied 4 times with small differences of configuration to increase my chances of a backup).

Code: Select all

01/21/2013 01:22:02 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM plugin_routerconfigs_backups WHERE id = " 
Attachments
backup.GIF
backup.GIF (16.67 KiB) Viewed 3769 times
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

I made locate on : "plugin_routerconfigs_backups" , does that mean that the data are well backuped ? (even if it is the wrong directory : /var/lib/mysql/cacti/ )

/var/lib/mysql/cacti/plugin_routerconfigs_backups.MYD
/var/lib/mysql/cacti/plugin_routerconfigs_backups.MYI
/var/lib/mysql/cacti/plugin_routerconfigs_backups.frm

*******
devices types:
Attachments
devTypes.GIF
devTypes.GIF (26.59 KiB) Viewed 3768 times
magikk
Cacti User
Posts: 57
Joined: Sun Dec 23, 2012 9:59 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by magikk »

I have one stupid question: is it necessary to check the device and then click on : "choose an action > backup > go" if we want a backup?

(I forgot to do it at beginning , then i modified my functions.php file like in a post , and now i clicked on : "backup Go" - nothing changed)



************

I rechanged to my default functions.php and clicked on backup , and now i have an intersting message :

Code: Select all

�������� User Access Verification ��Username: Username: �������� User Access Verification ��Username: Username: �������� User Access Verification ��Username: Username: �������� User Access Verification ��Username: Username: �������� User Access Verification ��Username: admin Password: ***************** Username: 192.168.0.253-> ERROR: TELNET login failed
And now ?
ajochope
Posts: 1
Joined: Fri Nov 25, 2016 8:34 am

Re: Table 'cacti.plugin_routerconfigs_devicetypes' doesn't e

Post by ajochope »

This will help,
https://es.piliapp.com/mysql-syntax-check/

Copy and paste this part of the routerconfigs.sql file.

CREATE TABLE plugin_routerconfigs_devicetypes (
id int(12) NOT NULL auto_increment,
`name` varchar(128) NOT NULL,
username varchar(64) NOT NULL default 'sername:',
`password` varchar(128) NOT NULL default 'assword:',
copytftp varchar(64) NOT NULL default 'copy tftp run',
version varchar(64) NOT NULL default 'show version',
confirm varchar(64) NOT NULL default '',
forceconfirm int(1) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;



Cheers
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests