Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Nov 20, 2018 8:47 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9
Author Message
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Tue Aug 07, 2018 4:27 pm 
Offline

Joined: Fri Jan 06, 2017 4:17 pm
Posts: 1
Hi!

Cacti version 0.8.8a
Plugin CereusTransporter version 0.64
There is a problem when the plugin works with the database.

In log file Cacti error code 1114:
08/08/2018 02:41:09 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1114', SQL:"INSERT INTO `plugin_CereusTransporter_data` (`timestamp`, `local_data_id`, `key`, `value`) VALUES ('1533728465',8225,'unicast_in','0') '
08/08/2018 02:41:09 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1114', SQL:"INSERT INTO `plugin_CereusTransporter_data` (`timestamp`, `local_data_id`, `key`, `value`) VALUES ('1533728465',8225,'unicast_out','0') '
08/08/2018 02:41:10 PM - CMDPHP: Poller[0] WARNING: SNMP Get Timeout for Host:'192.168.40.252', and OID:'.1.3.6.1.2.1.1.3.0'

mysql -u cacti -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1796
Server version: 5.5.60-0+deb7u1 (Debian)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| cacti_dev |
+--------------------+
3 rows in set (0.00 sec)

mysql> use cacti;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------------------+
| Tables_in_cacti |
+-------------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_CereusTransporter_data |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_realms |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+-------------------------------+
53 rows in set (0.00 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 1204 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 1642 |
+----------+
1 row in set (0.01 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 5334 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 5334 |
+----------+
1 row in set (0.00 sec)

mysql> select * from plugin_CereusTransporter_data limit 10;
+------------+---------------+----------------+----------+
| timestamp | local_data_id | key | value |
+------------+---------------+----------------+----------+
| 1533803703 | 9054 | cpu | 1 |
| 1533803703 | 9053 | cpu | 1 |
| 1533803703 | 6840 | nonunicast_out | 0 |
| 1533803703 | 6840 | nonunicast_in | 192 |
| 1533803703 | 9052 | unicast_in | 62713 |
| 1533803703 | 9052 | unicast_out | 21268 |
| 1533803703 | 6839 | unicast_in | 31351229 |
| 1533803703 | 6839 | unicast_out | 30143511 |
| 1533803703 | 6838 | errors_in | 0 |
| 1533803703 | 6838 | discards_out | 0 |
+------------+---------------+----------------+----------+
10 rows in set (0.00 sec)

mysql> select count(*) from plugin_CereusTransporter_data;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

mysql> select * from plugin_CereusTransporter_data limit 10;
Empty set (0.00 sec)

mysql> describe plugin_CereusTransporter_data;
+---------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+---------------+------+-----+---------+-------+
| timestamp | varchar(1024) | NO | | 0 | |
| local_data_id | int(11) | NO | MUL | 0 | |
| key | varchar(1024) | NO | MUL | 0 | |
| value | varchar(1024) | NO | | 0 | |
+---------------+---------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> SHOW TABLE STATUS like '%CereusTransporter%';
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+-----------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+-----------------------------+
| plugin_CereusTransporter_data | MEMORY | 10 | Fixed | 0 | 3082 | 0 | 16571914 | 0 | 0 | NULL | 2018-08-09 09:57:46 | NULL | NULL | latin1_swedish_ci | NULL | | NMID CereusTransporter Data |
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+-----------------------------+
1 row in set (0.01 sec)
On misc settings:
influxdb://cacti:********@localhost:8086/cacti

influx
Connected to http://localhost:8086 version 1.6.1
InfluxDB shell version: 1.6.1
> auth
username: cacti
password:
> show databases;
name: databases
name
----
cacti
> use cacti
Using database cacti
> show MEASUREMENTS;
name: measurements
name
----
cisco.router.5.minute.cpu
cisco.router.sb.5.minute.cpu.utilization
host.mib.cpu.utilization
host.mib.hrsystemuptime
interface.errors.discards
interface.non.unicast.packets
interface.traffic
interface.unicast.packets
linux.hard.drive.space
linux.memory.free
linux.memory.free.swap
snmp.linux.uptime
ucd.net.cpu.usage.nice
ucd.net.cpu.usage.system
ucd.net.cpu.usage.user
ucd.net.load.average.1.minute
ucd.net.load.average.15.minute
ucd.net.load.average.5.minute
ucd.net.memory.buffers
ucd.net.memory.cache
ucd.net.memory.free
unix.hard.drive.space
unix.logged.in.users
unix.ping.host
unix.processes

SOLUTION:
-------------

mysql> drop table plugin_CereusTransporter_data;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE `plugin_CereusTransporter_data` (`timestamp` VARCHAR(1024) NOT NULL DEFAULT '0',`local_data_id` INT(11) NOT NULL DEFAULT '0',`key` VARCHAR(1024) NOT NULL DEFAULT '0',`value` VARCHAR(1024) NOT NULL DEFAULT '0',INDEX `local_data_id` (`local_data_id`),INDEX `key` (`key`)) COMMENT='NMID CereusTransporter Data' COLLATE='latin1_swedish_ci' ENGINE=MyISAM;
Query OK, 0 rows affected, 1 warning (0.06 sec)

mysql> SHOW TABLE STATUS like '%CereusTransporter%';
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------+
| plugin_CereusTransporter_data | MyISAM | 10 | Dynamic | 729 | 36 | 26336 | 281474976710655 | 17408 | 0 | NULL | 2018-08-09 12:20:20 | 2018-08-09 12:20:24 | NULL | latin1_swedish_ci | NULL | | NMID CereusTransporter Data |
+-------------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------+
1 row in set (0.00 sec)


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Aug 29, 2018 7:05 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2698
Location: Kressbronn, Germany
Thanks for reporting this. I'll have a look into the setup/update routine which looks like it fails to setup that table correctly.


Issues can also be reported here: https://bitbucket.org/thurban/cereustra ... tatus=open

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Fri Oct 19, 2018 1:50 am 
Offline

Joined: Fri Oct 19, 2018 1:28 am
Posts: 3
Hello,

I have installed the cacti 1.1.38 with CereustTransporter 0.66 and influxdb.
The configuration of the misc tab is influxdb://cacti:[email protected]:8086/cacti.
In influxdb I have created the cacti user and the cacti database.
I always get the same error. "CereusTransporter ERROR: is not a valid scheme"

Can you help me?

2018/10/19 08:13:08 - CereusTransporter DEBUG: Finished adding the data to influxdb: [10.x.x.x] [Time: 0.0001]
2018/10/19 08:13:08 - CereusTransporter ERROR: is not a valid scheme
2018/10/19 08:13:08 - CereusTransporter DEBUG: Adding the following data to influxdb: [1539929583] [10.13.1.1]
2018/10/19 08:13:08 - CereusTransporter DEBUG: Finished adding the data to influxdb: [10.x.x.x] [Time: 0.0001]
2018/10/19 08:13:08 - CereusTransporter ERROR: is not a valid scheme
2018/10/19 08:13:08 - CereusTransporter DEBUG: Adding the following data to influxdb: [1539929582] [10.56.7.11]
2018/10/19 08:13:08 - CereusTransporter DEBUG: Finished adding the data to influxdb: [10.x.x.x] [Time: 0.0001]
2018/10/19 08:13:08 - CereusTransporter ERROR: is not a valid scheme
2018/10/19 08:13:08 - CereusTransporter DEBUG: Adding the following data to influxdb: [1539929582] [10.11.80.1]
2018/10/19 08:13:08 - CereusTransporter DEBUG: Finished adding the data to influxdb: [localhost] [Time: 0.0015]
2018/10/19 08:13:08 - CereusTransporter ERROR: is not a valid scheme
2018/10/19 08:13:08 - CereusTransporter DEBUG: Adding the following data to influxdb: [1539929582] [localhost]
2018/10/19 08:13:08 - CereusTransporter DEBUG: Finished adding the data to influxdb: [] [Time: 0.0001]
2018/10/19 08:13:08 - CereusTransporter DEBUG: Adding the following data to influxdb: [1539929581] []
2018/10/19 08:13:08 - DBCALL DEVEL: SQL Exec: "DELETE FROM `plugin_CereusTransporter_data`"

2018/10/19 08:13:08 - DBCALL DEVEL: SQL Assoc: "SELECT `timestamp`, `local_data_id`, `key`, `value` FROM plugin_CereusTransporter_data ORDER BY `timestamp`,`local_data_id`,`key`"

2018/10/19 08:13:08 - DBCALL DEVEL: SQL Cell: "SELECT COUNT(local_data_id) FROM plugin_CereusTransporter_data"

2018/10/19 08:13:08 - CereusTransporter DEBUG: influxdb Units lookup table size: [152]

2018/10/19 08:13:08 - DBCALL DEVEL: SQL Assoc: " SELECT DISTINCT rrd.local_data_id ,rrd.data_source_name ,gtg.vertical_label FROM graph_templates_item gti INNER JOIN
data_template_rrd rrd ON rrd.id=gti.task_item_id INNER JOIN graph_templates_graph gtg ON gtg.local_graph_id=gti.local_graph_id WHERE gti.local_graph_template_item_id
<> 0 AND gtg.vertical_label <> ''"

2018/10/19 08:13:08 - CereusTransporter DEBUG: influxdb Lookup table size: [158]

2018/10/19 08:13:08 - DBCALL DEVEL: SQL Assoc: " SELECT ds.id ,host.hostname ,host.description ,data.name_cache ,(CASE WHEN rrd.data_source_type_id=1 THEN
'gauge' WHEN rrd.data_source_type_id=2 THEN 'counter' WHEN rrd.data_source_type_id=3 THEN 'counter' WHEN rrd.data_source_type_id=4 THEN 'counter' END) AS
rate ,data_template.name AS metric ,host_template.name AS host_type FROM data_template_data data INNER JOIN data_local ds ON ds.id=data.local_data_id INNER
JOIN host ON host.id=ds.host_id INNER JOIN host_template ON host_template.id=(CASE host.host_template_id WHEN 0 THEN (SELECT id FROM host_template ORDER BY id LIMIT 1)
ELSE host.host_template_id END) INNER JOIN data_template ON data_template.id=data.data_template_id INNER JOIN data_template_rrd rrd ON rrd.local_data_id=data.local_data_id
WHERE data.local_data_template_data_id <> 0 AND host.disabled <> 'on' GROUP BY ds.id"

2018/10/19 08:13:08 - DBCALL DEVEL: SQL Assoc: " SELECT ds.id ,MAX(CASE WHEN type_code='index_type' THEN input.value END) index_type ,MAX(CASE WHEN type_code='index_value'
THEN input.value END) index_value FROM data_template_data data INNER JOIN data_local ds ON ds.id=data.local_data_id INNER JOIN data_input_fields field ON
field.data_input_id=data.data_input_id AND field.input_output='in' AND field.type_code IN ('index_type', 'index_value') INNER JOIN data_input_data input ON
input.data_template_data_id=data.id AND input.data_input_field_id=field.id WHERE data.local_data_template_data_id <> 0"
2018/10/19 08:13:08 - CereusTransporter INFO: Adding data to influxdb


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Fri Oct 19, 2018 2:05 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2698
Location: Kressbronn, Germany
Can yuo check and confirm that you can access the influxdb using that username and password ?
Is influxdb really running on your cacti box (localhost) ?

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Mon Oct 22, 2018 5:48 am 
Offline

Joined: Fri Oct 19, 2018 1:28 am
Posts: 3
phalek wrote:
Can yuo check and confirm that you can access the influxdb using that username and password ?
Is influxdb really running on your cacti box (localhost) ?


Hi phalek,

I think that the connection to database is correct.

-- > show grants for cacti
database privilege
cacti ALL PRIVILEGES

> quit
[email protected]:~$ curl -G http://localhost:8086/query --data-urlencode "u=cacti" --data-urlencode "p=password" --data-urlencode "q=SHOW DATABASES"
{"results":[{"series":[{"name":"databases","columns":["name"],"values":[["_internal"],["cacti"]]}]}]}

-- Yes, database and cacti are in the same host.
I attached two pictures

Best regards.


Attachments:
cacti.jpg
cacti.jpg [ 165.52 KiB | Viewed 79 times ]
influxdb.jpg
influxdb.jpg [ 26 KiB | Viewed 79 times ]
Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Mon Oct 22, 2018 5:53 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2698
Location: Kressbronn, Germany
Maybe the influx client isn't compatible with your influxdb version. What version are of InfluxDB are you running ?

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code:
CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Oct 31, 2018 10:24 am 
Offline

Joined: Fri Oct 19, 2018 1:28 am
Posts: 3
Hi,

Request-Id: c9c0d89b-dd20-11e8-8005-000000000000
X-Influxdb-Version: 1.0.2
Date: Wed, 31 Oct 2018 15:22:32 GMT


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 127 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group