Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 22, 2017 10:00 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Thu Jan 19, 2017 7:38 pm 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
Hi

I am struggling with this because I am not a coder.
So far, I have got the plugin installed, and I can see data being written to the MySQL db table for the plugin.

I have influxdb installed, and created a db called "influx" (because I am boring). I have not set up any authentication or anything, and I have the plugin set up to http://localhost:8086/influx as per instructions. However, when it writes to the influxDB i get this error:

01/20/2017 01:30:40 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1054', SQL:" 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 ,host.polling_time as polling_time 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"
01/20/2017 01:30:39 PM - CereusTransporter: Poller[0] INFO: Adding data to influxdb

This error has been posted before but nothing suggested has worked for me.

For the record:
[email protected]:/usr/share/cacti/site/plugins/CereusTransporter# influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 1.1.1
InfluxDB shell version: 1.1.1
> create database influx
> use influx
Using database influx
>

I'd really appreciate some help if possible


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Fri Jan 20, 2017 5:11 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
go to your mysql comannd interface and execute the sql statement:

Code:
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 ,host.polling_time as polling_time 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


It should provide a bit more information on what is wrong here.

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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: Sat Jan 21, 2017 2:35 am 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
I had tried this before with no additional info, but this time i got:

Quote:
#1054 - Unknown column 'host.polling_time' in 'field list'


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Mon Jan 23, 2017 1:39 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
This is fixed on 0.8.8, if you're using anything earlier, you will execute the following on your DB:

Code:
alter table host ADD COLUMN polling_time decimal(10,5) NOT NULL DEFAULT '0.00000' AFTER `avg_time`;


Look here for details: http://bugs.cacti.net/bug_view_page.php?bug_id=1550

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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 Jan 23, 2017 2:31 am 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
thanks, I'll give that a go


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Tue Feb 07, 2017 4:31 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
Updated to 0.65 with Cacti 1.0 support. Please test it.

https://www.urban-software.com/products ... ansporter/

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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: Tue Feb 14, 2017 8:36 am 
Offline

Joined: Thu Mar 16, 2006 12:02 pm
Posts: 26
Where can I donwload 0.64 version? I've Cacti 0.8.8h and the latest version doesn't works.

Thanks
X.


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Tue Feb 14, 2017 8:44 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
Go here:

https://www.urban-software.com/products ... ansporter/

I've added the link to the 0.64 there.

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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: Tue Feb 14, 2017 8:45 am 
Offline

Joined: Thu Mar 16, 2006 12:02 pm
Posts: 26
phalek wrote:
Go here:

https://www.urban-software.com/products ... ansporter/

I've added the link to the 0.64 there.


Thanks!!!!


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Sun Feb 19, 2017 3:25 pm 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
Hi

since updating to .65 I am getting this error:

2017-02-20 09:20:02 - ERROR PHP NOTICE in Plugin 'CereusTransporter': Undefined index: pass in file: /usr/share/cacti/site/plugins/CereusTransporter/vendor/influxdb/influxdb-php/src/InfluxDB/Client.php on line: 277
2017-02-20 09:20:02 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 717 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 CereusTransporter_poller_bottom)(/plugins/CereusTransporter/setup.php: 292 CereusTransporter_send_data)(/plugins/CereusTransporter/setup.php: 83 CereusTransporter_influxdb_send_data)(/plugins/CereusTransporter/includes/influxdb.php: 27 fromDSN)(/plugins/CereusTransporter/vendor/influxdb/influxdb-php/src/InfluxDB/Client.php: 277 CactiErrorHandler)(/lib/functions.php: 4242 cacti_debug_backtrace)

I am using cacti 1.03 and php 7.1


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Mon Feb 20, 2017 3:18 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
The InfluxDB URL should be in this form:
Code:
influxdb://user:[email protected]:port/dbname


Can you check what you did set in the settings page ?

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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 Feb 20, 2017 3:41 am 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
Is that a new requirement for this version? I didnt have to do that previously, as far as I remember.

Seems to have resolved it as I now get:
Code:
PHP Notice:  Undefined index: index_type in /usr/share/cacti/site/plugins/CereusTransporter/setup.php on line 179

this is my poller error log - its full of it. I know its only a notice, but I thought I would bring it to your attention


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Mon Mar 06, 2017 5:30 pm 
Offline

Joined: Sun Jun 30, 2013 11:03 pm
Posts: 32
Hi Phalek

I have got a number of graphs now working, but I am finding there is a number of them which are not being populated from cacti.

For example, I have a number of MSSQL graphs which have data in cacti, but do not appear in influx at all. That is, when I query the influx db, I get results from the host, but none for these graphs, for example "Z-DB" is an MSSQL server for which I use the MSSQL template and have mssql cacti graphs for, but this is all there is in influx:

Code:
> SELECT * FROM /.*/ WHERE "host" = '192.168.2.1' limit 1
name: host.mib.cpu.utilization
time                cacti_data_id collector description host        host_type            hostname    index_type index_value metric_text                namecache                         polling_time rate  type units   value
----                ------------- --------- ----------- ----        ---------            --------    ---------- ----------- -----------                ---------                         ------------ ----  ---- -----   -----
1487532013000000000 1061          cacti     Z-Aquira    192.168.2.1 Windows 2000/XP Host 192.168.2.1                        Host MIB - CPU Utilization Z-Aquira - CPU Utilization - CPU0              gauge cpu  percent 3

name: host.mib.hard.drive.space
time                cacti_data_id collector description host        host_type            hostname    index_type index_value metric_text                 namecache                  polling_time rate  type      units value
----                ------------- --------- ----------- ----        ---------            --------    ---------- ----------- -----------                 ---------                  ------------ ----  ----      ----- -----
1487532013000000000 1056          cacti     Z-Aquira    192.168.2.1 Windows 2000/XP Host 192.168.2.1                        Host MIB - Hard Drive Space Z-Aquira - Used Space - A:              gauge hdd_total bytes 0

name: host.mib.logged.in.users
time                cacti_data_id collector description host        host_type            hostname    index_type index_value metric_text                namecache                  polling_time rate  type  units value
----                ------------- --------- ----------- ----        ---------            --------    ---------- ----------- -----------                ---------                  ------------ ----  ----  ----- -----
1487305806000000000 1054          cacti     Z-Aquira    192.168.2.1 Windows 2000/XP Host 192.168.2.1                        Host MIB - Logged in Users Z-Aquira - Logged in Users              gauge users users 6

name: host.mib.processes
time                cacti_data_id collector description host        host_type            hostname    index_type index_value metric_text          namecache            polling_time rate  type units     value
----                ------------- --------- ----------- ----        ---------            --------    ---------- ----------- -----------          ---------            ------------ ----  ---- -----     -----
1487305806000000000 1055          cacti     Z-Aquira    192.168.2.1 Windows 2000/XP Host 192.168.2.1                        Host MIB - Processes Z-Aquira - Processes              gauge proc processes 59

name: interface.errors.discards
time                cacti_data_id collector description host        host_type            hostname    index_type index_value metric_text                 namecache                                     polling_time rate    type        units      value
----                ------------- --------- ----------- ----        ---------            --------    ---------- ----------- -----------                 ---------                                     ------------ ----    ----        -----      -----
1487305806000000000 1063          cacti     Z-Aquira    192.168.2.1 Windows 2000/XP Host 192.168.2.1                        Interface - Errors/Discards Z-Aquira - Errors - 192.168.2.1 - ethernet_10              counter discards_in errors/sec 0



dont know if this error from the log helps:
Code:
2017-03-07 12:12:32 - CereusTransporter STATS: Time:7.73 LookupTableSize:2609 LookupUnitsTableSize:2576 MetricsCount:6391 AverageHostTime:0.14 SlowestHostnames:[192.168.2.43: 0.529s, 192.168.2.44: 0.421s, 192.168.2.33: 0.369s, 192.168.2.40: 0.340s]
2017-03-07 12:12:32 - CereusTransporter Finished adding [382] of data points for [192.168.2.40]
[url] http://localhost:8086/write?db=cacti&precision=s
[reason phrase] Bad Request
[status code] 400
2017-03-07 12:12:32 - CereusTransporter ERROR: Writing has failed, exception: Client error response
2017-03-07 12:12:31 - CereusTransporter DEBUG: Adding [382] of data points for [192.168.2.40]


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Thu Apr 06, 2017 4:19 am 
Offline

Joined: Wed Oct 27, 2010 5:40 am
Posts: 20
Location: Espoo, Finland
Seems to be working quite fine for me after the upgrade (after I got around the problem of no user/pass not being provided).

However I'm also seeing these in the logs:

Code:
2017-04-06 11:36:18 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php: 717 api_plugin_hook)(/lib/plugins.php: 68 api_plugin_run_plugin_hook)(/lib/plugins.php: 161 CereusTransporter_poller_bottom)(/plugins/CereusTransporter/setup.php: 179 CactiErrorHandler)(/lib/functions.php: 4295 cacti_debug_backtrace)
2017-04-06 11:36:18 - ERROR PHP NOTICE in Plugin 'CereusTransporter': Undefined index: index_type in file: /usr/share/cacti-1.1.2/plugins/CereusTransporter/setup.php on line: 179


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Thu Apr 06, 2017 4:34 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2597
Location: Kressbronn, Germany
Thanks for reporting. Please try 0.66: https://www.urban-software.com/products ... ansporter/

_________________
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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