InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Updated!

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#76 Post by phalek » Tue Sep 20, 2016 5:44 am

If you have cacti running, the you already have everything set. What permissions did you give the user that is configured in your /include/config.php from Cacti ?

If that user does not have permissions to create tables, then the plugin is not able to create them.

Do you have other plugins 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: Select all

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

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#77 Post by wentaoyan » Wed Sep 21, 2016 12:20 am

Yes I have run Monitor, Flowview, Weathermap, Syslog , Thold.

And The CereusTransporter is in the plugin Management. Now I added the creat table permission to the database user, but it's still error:

09/21/2016 01:19:10 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"INSERT INTO `plugin_CereusTransporter_data` (`timestamp`, `local_data_id`, `key`, `value`) VALUES ('1474435141',7127,'traffic_in','1792766948065') '

When the creation of tables triggered?

User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#78 Post by phalek » Wed Sep 21, 2016 12:25 am

I guess it may have something to do with the type of table being created.

The table creation only occurs during the installation of the plugin. It also creates a table of type "Memory".

Maybe this is causing your issue.

UPDATE: Removed setup.php file ( not fixing issue )
Last edited by phalek on Wed Sep 21, 2016 12:37 am, edited 1 time in total.
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: Select all

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

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#79 Post by wentaoyan » Wed Sep 21, 2016 12:34 am

Ops it's still not work.


Can I have the raw sql to create the table?

User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#80 Post by phalek » Wed Sep 21, 2016 12:38 am

Here you go:

Code: Select all

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=MEMORY
;
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: Select all

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

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#81 Post by wentaoyan » Wed Sep 21, 2016 1:00 am

It's OK !!!!! :P :P :P :P :P
but the host's cpu and memory is so high :oops:

User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#82 Post by phalek » Wed Sep 21, 2016 1:02 am

You can try changing this:

Code: Select all

ENGINE=MEMORY
to this:

Code: Select all

ENGINE=MyISAM
That should reduce memory ( and maybe CPU if that was caused by swapping ).
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: Select all

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

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#83 Post by wentaoyan » Wed Sep 21, 2016 2:46 am

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

Thanks!!!

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#84 Post by wentaoyan » Wed Oct 19, 2016 8:30 pm

Hi phalek,

I find the value from influxdb is not the same as in Cacti. Is that I missed to to decode the value from Cacti?
Attachments
捕获.PNG
捕获.PNG (69.77 KiB) Viewed 2832 times

cigamit
Developer
Posts: 2796
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#85 Post by cigamit » Wed Oct 19, 2016 8:54 pm

That appears to be the raw counter values. Cacti does the math for you and subtracts the current counter value from the previous counter value to give you the actual bits within that time period. Bits per second would be then dividing that number by 60.

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#86 Post by wentaoyan » Wed Oct 19, 2016 9:06 pm

Thanks,

Is there any way I can do the math in Grafana or in the plugin CereusTransport?

User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#87 Post by phalek » Thu Oct 20, 2016 1:44 am

Yes, cigamit is right. INfluxDB contains the raw data and everything else needs to be done in the Graphing system.

In the example Dashboard provided I am using the following calculation for the interface data:

Code: Select all

SELECT 8*derivative(mean("value"),60s) AS "traffic_in" FROM "interface.traffic" WHERE "namecache" =~ /$title$/ AND "type" =~ /traffic_in/ AND $timeFilter GROUP BY time(5m)
I got that from this page:

https://lkhill.com/using-influxdb-grafa ... tatistics/
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: Select all

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

wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#88 Post by wentaoyan » Thu Oct 20, 2016 9:57 pm

Thanks :D :D 。 That's right now!!

but my query is:

SELECT derivative(mean("value"), 1m) /8 FROM "interface.traffic" WHERE "namecache" = '**********' AND "type" = 'traffic_in' AND $timeFilter GROUP BY time(1m)

User avatar
phalek
Cacti Guru User
Posts: 2729
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#89 Post by phalek » Fri Oct 21, 2016 5:16 am

wentaoyan if you have a nice Cacti Dashboard finished, it would be nice if you can post that here, or sent it to me so I can provide it as a download along with the plugin.
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: Select all

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

Atreides
Cacti User
Posts: 151
Joined: Mon May 31, 2010 9:26 am

Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda

#90 Post by Atreides » Sat Oct 22, 2016 12:45 pm

Hello,
I've installed influxdb, grafana, plugin, made change in MISC tab...And then? :) I dont quite know how to add/make graphs, or create dashboard, etc. I've tried to import the sample dashboard got this error :
Dashboard init failed
Template variables could not be initialized: b.metricFindQuery is not a function

Anyone have a guide or some tips on how to "glue" all together?.

Post Reply