Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Aug 20, 2017 10:37 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Tue Sep 20, 2016 5:44 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2598
Location: Kressbronn, Germany
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 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 Sep 21, 2016 12:20 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Sep 21, 2016 12:25 am 
Offline
Cacti Guru User
User avatar

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

_________________
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


Last edited by phalek on Wed Sep 21, 2016 12:37 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Sep 21, 2016 12:34 am 
Offline

Joined: Tue Sep 20, 2016 3:41 am
Posts: 13
Ops it's still not work.


Can I have the raw sql to create the table?


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Sep 21, 2016 12:38 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2598
Location: Kressbronn, Germany
Here you go:

Code:
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 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 Sep 21, 2016 1:00 am 
Offline

Joined: Tue Sep 20, 2016 3:41 am
Posts: 13
It's OK !!!!! :P :P :P :P :P
but the host's cpu and memory is so high :oops:


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Sep 21, 2016 1:02 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2598
Location: Kressbronn, Germany
You can try changing this:

Code:
ENGINE=MEMORY

to this:

Code:
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 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 Sep 21, 2016 2:46 am 
Offline

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

Thanks!!!


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Oct 19, 2016 8:30 pm 
Offline

Joined: Tue Sep 20, 2016 3:41 am
Posts: 13
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 1678 times ]
Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Oct 19, 2016 8:54 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2610
Location: B/CS Texas
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.

_________________
CactiEZ CD


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Wed Oct 19, 2016 9:06 pm 
Offline

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

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


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Thu Oct 20, 2016 1:44 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2598
Location: Kressbronn, Germany
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 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 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: Thu Oct 20, 2016 9:57 pm 
Offline

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


Top
 Profile  
 
 Post subject: Re: InfluxDB/Grafana/Bosun + Cacti = CereusTransport - Upda
PostPosted: Fri Oct 21, 2016 5:16 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Jan 31, 2008 6:39 am
Posts: 2598
Location: Kressbronn, Germany
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 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 Oct 22, 2016 12:45 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 127
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?.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 109 posts ]  Go to page Previous  1 ... 3, 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