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

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

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

Post by wentaoyan »

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
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

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

Post by wentaoyan »

Ops it's still not work.


Can I have the raw sql to create the table?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

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

Post by wentaoyan »

It's OK !!!!! :P :P :P :P :P
but the host's cpu and memory is so high :oops:
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

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

Post by wentaoyan »

: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

Post by wentaoyan »

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 4785 times
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

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

Post by cigamit »

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

Post by wentaoyan »

Thanks,

Is there any way I can do the math in Grafana or in the plugin CereusTransport?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
wentaoyan
Posts: 13
Joined: Tue Sep 20, 2016 3:41 am

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

Post by wentaoyan »

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
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

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

Post by phalek »

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 : CereusReporting
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

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

Post by Atreides »

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

Who is online

Users browsing this forum: No registered users and 0 guests