Skip to content

opexnetwork/network-weathermap-influxdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

network-weathermap-influxdb

This a very basic InfluxDB datasource for Network Weathermap. To use, copy WeatherMapDataSource_influxdb.php into $WEATHERMAP/lib/datasources. The TARGET definition is:

influxdb:host:database:username:password:seriesin:seriesout:from:whereclause

NOTE: due to config file limitations, spaces in the where clause must be escaped with %20, see examples below.

This is originally based on guequierre/php-weathermap-influxdb

Assumptions

This code makes several assumptions for simplicity, these may not be valid in your environment:

  • InfluxDB is running on port 8086. If you are using a different port you will have to change the URL in the code
  • All data sources except for ifOperStatus are counters and the derivitive funciton will be used. These derivitives are calcualted assuming "per second" data
  • Data is queried over the last 5 minutes

Examples

TARGET influxdb:localhost:telegraf:::ifOperStatus:ifOperStatus:ifTable:"hostname"='mynetworkdevice'%20AND%20"ifIndex"='{node:this:ifIndex}'

TARGET 8*influxdb:localhost:telegraf:::ifHCInOctets:ifHCOutOctets:ifXTable:"hostname"='mynetworkdevice'%20AND%20"ifAlias"='{link:this:ifAlias}'

Sample Bristle Switch

TODO

  • I still need to figure out a good way to handle OVERLIBGRAPH, probably via. grafana IDs (which is ugly and incredibly manual)

About

InfluxDB datasource for Network Weathermap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%