Timelion (part of Kibana) provides a plugin mechanism by which you can create your own connectors to external datasets.
This plugin allows rendering data from the InfluxDB queries in Timelion, without having to duplicate timeseries into Elasticsearch.
git clone https://github.com/lmangani/timelion-influxdb && cd timelion-influxdb
VERSION="6.2.4" ./release.sh
kibana-plugin install ./timelion-influxdb-1.0.0.zip
- All parameters including hostname can be defined inside the Timelion function
- OPTIONAL static InfluxDB parameters can be stored in
src/core_plugins/timelion/timelion.json
, e.g.
"influxdb": {
"hostname": "my.influx.db",
"port": 8086,
"username": "username",
"password": "password"
},
- restart Kibana
.influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system")
.influxdb(hostname='my.influx.db', db='telegraf', label='used',metric='mem', groupBy="1m", policy="autogen", field="used").cusum().derivative().mvavg(5).multiply(8).divide(1048576).lines(fill=2,width=1).color(#00FF00)
This simplified example is instpired by rmoff
$thres=0.02, .influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system").lines(1).if(eq, 0, null).holt(0.9, 0.1, 0.9, 0.5h).color(#eee).lines(10).label('Prediction'), .influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system").color(#666).lines(1).label(Actual), .influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system").lines(1).if(eq, 0, null).holt(0.9, 0.1, 0.9, 0.5h).subtract(.influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system")).abs().if(lt, $thres, null, .influxdb(hostname='my.influx.db', db='telegraf', label='mem',metric='cpu', groupBy="1m", policy="autogen", field="usage_system")).points(10,3,0).color(#c66).label('Anomaly')
The plugin is intended for use with Kibana 5 and 6
If you are using a version of Kibana, you will need to edit kibana.version in the "package.json" file.
- Prometheus - query and display Prometheus data in Timelion
- Random (by the author of Timelion) - A demo showing how to create a timelion plugin
- USAFacts (by the author of Timelion) - grabs series data from usafacts.org
- Google Analytics - brings Google Analytics data to Timelion
- Mathlion (from Fermium Labs) - enables equation parsing and advanced maths
The timelion-InfluxDB plugin is sponsored by QXIP BV
Elasticsearch and Kibana are trademarks of Elasticsearch BV, registered in the U.S. and in other countries.