Skip to content

A docker-compose environment for building InfluxDB Telegraf from source

Notifications You must be signed in to change notification settings

nickscript0/build-telegraf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build InfluxDB Telegraf

Overview

A docker-compose environment for building and developing InfluxDB Telegraf

Usage

Build and run telegraf from source

Warning: If you're on a limited internet connection, running this the first time will download about 200MB of dependencies

# The following command will "go get" and build telegraf (and startup an influxdb instance to test against)
docker-compose up -d
# All the telegraf go src and dependencies are now available on your host in
# folder docker_build_telegraf/src

# Run telegraf
docker-compose run buildtelegraf /bin/bash
cd /go/src/github.com/nickscript0/telegraf/
./telegraf -config /etc/opt/telegraf/telegraf.conf

Dev workflow

docker-compose run buildtelegraf /bin/bash

# Instead of updating the go library to use nickscript0/telegraf, just replace in the tree
cd /go/src/github.com/influxdb
rm -rf telegraf
git clone https://github.com/nickscript0/telegraf.git
cd telegraf
make

# Make a change to the source, the build and run it
make
./telegraf -config /etc/opt/telegraf/telegraf.conf

Sample InfluxDB queries

select * from cpu_system where cpu = 'cpu-total' AND time > now() - 2m

About

A docker-compose environment for building InfluxDB Telegraf from source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages