pl-emulation

module
v0.0.0-...-5958e81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: MIT

README

Example Docker Compose project for Telegraf, InfluxDB and Grafana

This an example project to show the TIG (Telegraf, InfluxDB and Grafana) stack.

Example Screenshot

Start the stack with docker compose

$ docker-compose up

Services and Ports

Grafana
Telegraf
  • Port: 8125 UDP (StatsD input)
InfluxDB
  • Port: 8086 (HTTP API)
  • User: admin
  • Password: admin
  • Database: influx

Run the influx client:

$ docker-compose exec influxdb influx -execute 'SHOW DATABASES'

Run the influx interactive console:

$ docker-compose exec influxdb influx

Connected to http://localhost:8086 version 1.8.0
InfluxDB shell version: 1.8.0
>

Import data from a file with -import

$ docker-compose exec -w /imports influxdb influx -import -path=data.txt -precision=s

Run the PHP Example

The PHP example generates random example metrics. The random metrics are beeing sent via UDP to the telegraf agent using the StatsD protocol.

The telegraf agents aggregates the incoming data and perodically persists the data into the InfluxDB database.

Grafana connects to the InfluxDB database and is able to visualize the incoming data.

$ cd php-example
$ composer install
$ php example.php
Sending Random metrics. Use Ctrl+C to stop.
..........................^C
Runtime:	0.88382697105408 Seconds
Ops:		27 
Ops/s:		30.548965899738 
Killed by Ctrl+C

License

The MIT License (MIT). Please see License File for more information.

Directories

Path Synopsis
telegraf
etc/plugins/inputs
https://pkg.go.dev/github.com/bndr/gojenkins?utm_source=godoc#Jenkins.GetJob https://www.influxdata.com/blog/collecting-data-from-chess-com-writing-your-own-telegraf-plugin/
https://pkg.go.dev/github.com/bndr/gojenkins?utm_source=godoc#Jenkins.GetJob https://www.influxdata.com/blog/collecting-data-from-chess-com-writing-your-own-telegraf-plugin/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL