SlideShare a Scribd company logo
Noah Crowley / Developer Advocate
How to Build a Telegraf
Plugin
© 2018 InfluxData. All rights reserved.
What we’ll be covering
✔ Telegraf overview

✔ Examples of Telegraf plugins

✔ Telegraf plugin architecture

✔ How to a write a Telegraf plugin
Telegraf Overview
© 2018 InfluxData. All rights reserved.
© 2018 InfluxData. All rights reserved.
Telegraf Overview
• Telegraf is an open source, plugin-driven agent for collecting
and reporting metrics

• “Push” or “Pull”

• Large collection of plugins: 192 (as of 3/13/2019)

• Inputs: 149

• Outputs: 30

• Aggregators: 9

• Processors: 4
© 2018 InfluxData. All rights reserved.
Telegraf Overview
• Can act as:

• Agent

• Collector

• Part of an Ingest Pipeline
© 2018 InfluxData. All rights reserved.
Telegraf Plugins
• Outputs

• Allows you to send metrics to a variety of datastores

• Plugins for both InfluxDB 1.x and 2.0

• Supports Kafka, MQTT, NSQ, OpenMetrics, and more

• Aggregators and Processors allow you to manipulate data as it
flows through Telegraf

• Transform tags, convert types, calculate histograms
© 2018 InfluxData. All rights reserved.
Telegraf Input Plugins
• Metrics ingestion from host system: CPU, I/O, Network…

• Common Applications like NGINX, Postgres, Redis…

• Third Party APIs: Mailchimp, Cloudwatch, Google Analytics…

• General-Purpose Protocols: HTTP, Socket, MQTT…

• …and more!
© 2018 InfluxData. All rights reserved.
Telegraf Benefits
• Minimal memory footprint

• Tagging of metrics

• Batching of metrics to reduce the number of atomic writes

• Easy contribution of functionality thanks to Go

• Static Binary

• Strong Community Contributions
Examples of Plugins
© 2018 InfluxData. All rights reserved.
statsd
• Listens for incoming data
• Acts as a statsd instance
• Outputs to any configured output
© 2018 InfluxData. All rights reserved.
postgresql
• Collects performance data
• Uses data from built-in views:
• pg_stat_database
• pg_stat_bgwriter
© 2018 InfluxData. All rights reserved.
apache
• Connects over HTTP
• Reads data from:
• /server-status?auto
© 2018 InfluxData. All rights reserved.
win_perf_counters
• Collects performance data from
Windows machines
© 2018 InfluxData. All rights reserved.
Input Plugin Considerations
• Where does the data exist?

• How can it be collected?

• What shape is the data?
© 2018 InfluxData. All rights reserved.
prometheus_client
• Output plugin
• Exposes metrics in Prometheus
(now OpenMetrics) format.
© 2018 InfluxData. All rights reserved.
mqtt
• Output half of the MQTT plugins
• Allows you to write messages to
an MQTT broker.
© 2018 InfluxData. All rights reserved.
Output Plugin Considerations
• How should the data be shaped?

• How is the data output?

• Where is the data output to?
Plugin Architecture
© 2018 InfluxData. All rights reserved.
Plugin Architecture
• Built to be extensible from the beginning

• Make use of interfaces in Go

• Each plugin type has an interface
© 2018 InfluxData. All rights reserved.
© 2018 InfluxData. All rights reserved.
package simple
// simple.go
import (
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
)
type Simple struct {
Ok bool
}
func (s *Simple) Description() string {
return "a demo plugin"
}
func (s *Simple) SampleConfig() string {
return `
## Indicate if everything is fine
ok = true
`
}
func (s *Simple) Gather(acc telegraf.Accumulator) error {
if s.Ok {
acc.AddFields("state", map[string]interface{}{"value":
"pretty good"}, nil)
} else {
acc.AddFields("state", map[string]interface{}{"value":
"not great"}, nil)
}
return nil
}
func init() {
inputs.Add("simple", func() telegraf.Input { return
&Simple{} })
}
Building a Plugin
© 2018 InfluxData. All rights reserved.
Getting started…
• Recommend using Go 1.11

• Understanding of Git & Pull Requests

• What is our plugin going to do?

• Generate data using “sine” and “cosine” trigonometric
functions

• Read the CONTRIBUTING.md file to ensure you can build & test
Telegraf before continuing
© 2018 InfluxData. All rights reserved.
Getting started…
• Set up your workspace, get the code, and create a branch:

• Create the required directories and files:

• Add boilerplate…
$ go get github.com/influxdata/telegraf

$ cd $GOPATH/github.com/influxdata/telegraf

$ git checkout -b trig-demo
$ cd plugins/inputs
$ mkdir trig
$ touch trig/trig.go
© 2018 InfluxData. All rights reserved.
package trig



import (

    "github.com/influxdata/telegraf"

    "github.com/influxdata/telegraf/plugins/inputs"

)



type Trig struct {

}



func (s *Trig) SampleConfig() string {

    return ""

}



func (s *Trig) Description() string {

    return ""

}



func (s *Trig) Gather(acc telegraf.Accumulator) error {

    return nil

}



func init() {

    inputs.Add("trig", func() telegraf.Input { return &Trig{} })

}
trig.go
© 2018 InfluxData. All rights reserved.
Import your plugin
• Add the following to telegraf/plugins/inputs/all/all.go

• This will your plugin into the main Telegraf package and ensure
that it can run.
_ "github.com/influxdata/telegraf/plugins/inputs/trig"
© 2018 InfluxData. All rights reserved.
Add configuration variables
• Each plugin has a struct

• There must be a property on the struct to hold any
configuration variables

• Any other variables should be unexported

• We’ll add two variables:

• “x” will hold the state of the plugin between collection intervals

• “Amplitude” will hold the amplitude value for the sin wave
© 2018 InfluxData. All rights reserved.
package trig



import (

    "github.com/influxdata/telegraf"

    "github.com/influxdata/telegraf/plugins/inputs"

)



type Trig struct {
    x         float64
    Amplitude float64

}



func (s *Trig) SampleConfig() string {

    return ""

}



func (s *Trig) Description() string {

    return ""

}



func (s *Trig) Gather(acc telegraf.Accumulator) error {

trig.go
© 2018 InfluxData. All rights reserved.
Add sample configuration
• Telegraf can dynamically construct configuration files

• Aggregates sample configs for all plugins

• The CLI allows you to provide arguments to filter which plugins
are included

• In 2.0, InfluxDB will use this info to generate Telegraf configs
© 2018 InfluxData. All rights reserved.
package trig



import (

    "github.com/influxdata/telegraf"

    "github.com/influxdata/telegraf/plugins/inputs"

)



type Trig struct {
    x         float64
    Amplitude float64

}



var TrigConfig = `

 ## Set the amplitude

 amplitude = 10.0

`



func (s *Trig) SampleConfig() string {

    return TrigConfig

}


trig.go
© 2018 InfluxData. All rights reserved.
Add a simple description
• This description is included above the plugin configuration and
should briefly describe what your plugin does
© 2018 InfluxData. All rights reserved.
type Trig struct {
    x         float64
    Amplitude float64

}



var TrigConfig = `

 ## Set the amplitude

 amplitude = 10.0

`



func (s *Trig) SampleConfig() string {

    return TrigConfig

}


func (s *Trig) Description() string {

    return "Inserts sine and cosine waves for demonstration
purposes"

}



func (s *Trig) Gather(acc telegraf.Accumulator) error {

trig.go
© 2018 InfluxData. All rights reserved.
Test your config!
• First, build Telegraf

• Generate a config:
$ make telegraf
$ telegraf -sample-config -input-filter trig
-output-filter influxdb -debug
© 2018 InfluxData. All rights reserved.
...

###############################################################################
# INPUT PLUGINS #
###############################################################################
# Inserts sine and cosine waves for demonstration purposes
[[inputs.trig]]
## Set the amplitude
amplitude = 10.0
© 2018 InfluxData. All rights reserved.
The “Gather” function
• The heart of the plugin, it is run every time telegraf collects
metrics

• This is where you’ll do the majority of the work

• We’ll generate sine and cosine values

• At the end of the function, we add any data we’ve collected
and to the Telegraf “Accumulator” by
calling .AddFields(measurement, tags, fields). 

• This defines a new point in InfluxDB with the timestamp being
the collection time.
© 2018 InfluxData. All rights reserved.
    return "Inserts sine and cosine waves for demonstration
purposes"

}



func (s *Trig) Gather(acc telegraf.Accumulator) error {

    sinner := math.Sin((s.x*math.Pi)/5.0) * s.Amplitude

    cosinner := math.Cos((s.x*math.Pi)/5.0) * s.Amplitude



    fields := make(map[string]interface{})

    fields["sine"] = sinner

    fields["cosine"] = cosinner



    tags := make(map[string]string)



    s.x += 1.0

    acc.AddFields("trig", fields, tags)



    return nil

}
trig.go
© 2018 InfluxData. All rights reserved.
Add initial state
• In our boilerplate, we added an init() function

• Called when the plugin is first initialized

• Makes the plugin available to the Telegraf agent

• We can define starting state as part of this function

• We need to initialize our “x” variable
© 2018 InfluxData. All rights reserved.
    cosinner := math.Cos((s.x*math.Pi)/5.0) * s.Amplitude



    fields := make(map[string]interface{})

    fields["sine"] = sinner

    fields["cosine"] = cosinner



    tags := make(map[string]string)



    s.x += 1.0

    acc.AddFields("trig", fields, tags)



    return nil

}




func init() {
    inputs.Add("trig", func() telegraf.Input { return &Trig{x: 0.0} })
}
trig.go
© 2018 InfluxData. All rights reserved.
Compile and test
• Once again, build Telegraf:

• Generate a config and write it to a file:
$ make telegraf
$ ./telegraf -sample-config -input-filter
trig -output-filter influxdb -debug >>
telegraf.conf.test
• Run Telegraf with the new config:
$ ./telegraf -config telegraf.conf.test
-debug
© 2018 InfluxData. All rights reserved.
$ ./telegraf -config telegraf.conf.test -debug
2019-03-14T06:32:12Z I! Starting Telegraf
2019-03-14T06:32:12Z I! Loaded inputs: trig
2019-03-14T06:32:12Z I! Loaded aggregators:
2019-03-14T06:32:12Z I! Loaded processors:
2019-03-14T06:32:12Z I! Loaded outputs: influxdb
2019-03-14T06:32:12Z I! Tags enabled: host=noah-mbp.local
2019-03-14T06:32:12Z I! [agent] Config: Interval:10s, Quiet:false,
Hostname:"noah-mbp.local", Flush Interval:10s
2019-03-14T06:32:12Z D! [agent] Connecting outputs
2019-03-14T06:32:12Z D! [agent] Attempting connection to output: influxdb
2019-03-14T06:32:12Z D! [agent] Successfully connected to output: influxdb
2019-03-14T06:32:12Z D! [agent] Starting service inputs
2019-03-14T06:32:30Z D! [outputs.influxdb] wrote batch of 1 metrics in
23.857525ms
2019-03-14T06:32:30Z D! [outputs.influxdb] buffer fullness: 1 / 10000 metrics.
© 2018 InfluxData. All rights reserved.
Final steps before submitting
• Add a few things to your plugin…

• a README.md

• a LICENSE

• A sample of the input/output format

• Tests!
© 2018 InfluxData. All rights reserved.
package trig



import (

    "math"

    "testing"

    "github.com/influxdata/telegraf/testutil"

)



func TestTrig(t *testing.T) {



    s := &Trig{



        Amplitude: 10.0,

    }



    for i := 0.0; i < 10.0; i++ {

        var acc testutil.Accumulator

        sine := math.Sin((i*math.Pi)/5.0) * s.Amplitude

        cosine := math.Cos((i*math.Pi)/5.0) * s.Amplitude

        s.Gather(&acc)

        fields := make(map[string]interface{})

        fields["sine"] = sine

        fields["cosine"] = cosine



        acc.AssertContainsFields(t, "trig", fields)



    }



}
trig_test.go
© 2018 InfluxData. All rights reserved.
Final steps before submitting
• Add a few things to your plugin…

• a README.md

• a LICENSE

• A sample of the input/output format

• Tests!

• …and submit! 

• github.com/influxdata/telegraf/pulls
Thank You!

More Related Content

What's hot

PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
NTT DATA Technology & Innovation
 
2015 Future of Open Source Survey Results
2015 Future of Open Source Survey Results2015 Future of Open Source Survey Results
2015 Future of Open Source Survey Results
Black Duck by Synopsys
 
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Masahito Zembutsu
 
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Lee Myring
 
What's new in Spring Batch 5
What's new in Spring Batch 5What's new in Spring Batch 5
What's new in Spring Batch 5
ikeyat
 
Exadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティスExadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティス
オラクルエンジニア通信
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
Agile Testing Alliance
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
Marco Pracucci
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
Calvin French-Owen
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
NETWAYS
 
Cassandraのしくみ データの読み書き編
Cassandraのしくみ データの読み書き編Cassandraのしくみ データの読み書き編
Cassandraのしくみ データの読み書き編
Yuki Morishita
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
Kevin Brockhoff
 
Hashicorp Corporate and Product Overview
Hashicorp Corporate and Product OverviewHashicorp Corporate and Product Overview
Hashicorp Corporate and Product Overview
Stenio Ferreira
 
KubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdfKubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdf
Hitachi, Ltd. OSS Solution Center.
 
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
NTT DATA Technology & Innovation
 
Intro to Telegraf
Intro to TelegrafIntro to Telegraf
Intro to Telegraf
InfluxData
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
Flink Forward
 
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetupこれで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
Masatoshi Tada
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
Kohei Tokunaga
 
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
NTT DATA Technology & Innovation
 

What's hot (20)

PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
PostgreSQL開発コミュニティに参加しよう! ~2022年版~(Open Source Conference 2022 Online/Kyoto 発...
 
2015 Future of Open Source Survey Results
2015 Future of Open Source Survey Results2015 Future of Open Source Survey Results
2015 Future of Open Source Survey Results
 
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編 Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
Rancher/Kubernetes入門ハンズオン資料~第2回さくらとコンテナの夕べ #さくらの夕べ 番外編
 
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
Log aggregation: using Elasticsearch, Fluentd/Fluentbit and Kibana (EFK)
 
What's new in Spring Batch 5
What's new in Spring Batch 5What's new in Spring Batch 5
What's new in Spring Batch 5
 
Exadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティスExadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティス
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
 
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
OSMC 2022 | The Power of Metrics, Logs & Traces with Open Source by Emil-Andr...
 
Cassandraのしくみ データの読み書き編
Cassandraのしくみ データの読み書き編Cassandraのしくみ データの読み書き編
Cassandraのしくみ データの読み書き編
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
 
Hashicorp Corporate and Product Overview
Hashicorp Corporate and Product OverviewHashicorp Corporate and Product Overview
Hashicorp Corporate and Product Overview
 
KubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdfKubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdf
 
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
Apache Bigtopによるオープンなビッグデータ処理基盤の構築(オープンデベロッパーズカンファレンス 2021 Online 発表資料)
 
Intro to Telegraf
Intro to TelegrafIntro to Telegraf
Intro to Telegraf
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetupこれで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
これで怖くない!?コードリーディングで学ぶSpring Security #中央線Meetup
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
 
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
 

Similar to How to Build a Telegraf Plugin by Noah Crowley

Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataSensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
InfluxData
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & Telegraf
InfluxData
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
Finding OOMS in Legacy Systems with the Syslog Telegraf PluginFinding OOMS in Legacy Systems with the Syslog Telegraf Plugin
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
InfluxData
 
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
InfluxData
 
Webinar - Building Custom Extensions With AppDynamics
Webinar - Building Custom Extensions With AppDynamicsWebinar - Building Custom Extensions With AppDynamics
Webinar - Building Custom Extensions With AppDynamics
Todd Radel
 
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
InfluxData
 
Python and trending_data_ops
Python and trending_data_opsPython and trending_data_ops
Python and trending_data_ops
chase pettet
 
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
apidays
 
P4 Introduction
P4 Introduction P4 Introduction
P4 Introduction
Netronome
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integration
Márton Balassi
 
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB | InfluxDays...
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB  | InfluxDays...Sam Dillard [InfluxData] | Performance Optimization in InfluxDB  | InfluxDays...
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB | InfluxDays...
InfluxData
 
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
InfluxData
 
Why Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps MonitoringWhy Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps Monitoring
DevOps.com
 
Helm Charts Security 101
Helm Charts Security 101Helm Charts Security 101
Helm Charts Security 101
Deep Datta
 
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
InfluxData
 
Monitoring InfluxEnterprise
Monitoring InfluxEnterpriseMonitoring InfluxEnterprise
Monitoring InfluxEnterprise
InfluxData
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
InfluxData
 
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
InfluxData
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
InfluxData
 

Similar to How to Build a Telegraf Plugin by Noah Crowley (20)

Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataSensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
 
Virtual training Intro to InfluxDB & Telegraf
Virtual training  Intro to InfluxDB & TelegrafVirtual training  Intro to InfluxDB & Telegraf
Virtual training Intro to InfluxDB & Telegraf
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
 
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
Finding OOMS in Legacy Systems with the Syslog Telegraf PluginFinding OOMS in Legacy Systems with the Syslog Telegraf Plugin
Finding OOMS in Legacy Systems with the Syslog Telegraf Plugin
 
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
Nicolas Steinmetz [CérénIT] | Sustain Your Observability from Bare Metal TICK...
 
Webinar - Building Custom Extensions With AppDynamics
Webinar - Building Custom Extensions With AppDynamicsWebinar - Building Custom Extensions With AppDynamics
Webinar - Building Custom Extensions With AppDynamics
 
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
 
Python and trending_data_ops
Python and trending_data_opsPython and trending_data_ops
Python and trending_data_ops
 
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
 
P4 Introduction
P4 Introduction P4 Introduction
P4 Introduction
 
The Flink - Apache Bigtop integration
The Flink - Apache Bigtop integrationThe Flink - Apache Bigtop integration
The Flink - Apache Bigtop integration
 
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB | InfluxDays...
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB  | InfluxDays...Sam Dillard [InfluxData] | Performance Optimization in InfluxDB  | InfluxDays...
Sam Dillard [InfluxData] | Performance Optimization in InfluxDB | InfluxDays...
 
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
InfluxDB 101 – Concepts and Architecture by Michael DeSa, Software Engineer |...
 
Why Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps MonitoringWhy Open Source Works for DevOps Monitoring
Why Open Source Works for DevOps Monitoring
 
Helm Charts Security 101
Helm Charts Security 101Helm Charts Security 101
Helm Charts Security 101
 
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
 
Monitoring InfluxEnterprise
Monitoring InfluxEnterpriseMonitoring InfluxEnterprise
Monitoring InfluxEnterprise
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
 
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
Samantha Wang [InfluxData] | Data Collection Overview | InfluxDays 2022
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
 

More from InfluxData

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
InfluxData
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow Ecosystem
InfluxData
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
InfluxData
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDB
InfluxData
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
InfluxData
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING Stack
InfluxData
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using Rust
InfluxData
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud Dedicated
InfluxData
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB
InfluxData
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
InfluxData
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
InfluxData
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage Engine
InfluxData
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena
InfluxData
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage Engine
InfluxData
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
InfluxData
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
InfluxData
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
InfluxData
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
InfluxData
 

More from InfluxData (20)

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow Ecosystem
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDB
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING Stack
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using Rust
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud Dedicated
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage Engine
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage Engine
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
 

Recently uploaded

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 

Recently uploaded (20)

How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 

How to Build a Telegraf Plugin by Noah Crowley

  • 1. Noah Crowley / Developer Advocate How to Build a Telegraf Plugin
  • 2. © 2018 InfluxData. All rights reserved. What we’ll be covering ✔ Telegraf overview ✔ Examples of Telegraf plugins ✔ Telegraf plugin architecture ✔ How to a write a Telegraf plugin
  • 4. © 2018 InfluxData. All rights reserved.
  • 5. © 2018 InfluxData. All rights reserved. Telegraf Overview • Telegraf is an open source, plugin-driven agent for collecting and reporting metrics • “Push” or “Pull” • Large collection of plugins: 192 (as of 3/13/2019) • Inputs: 149 • Outputs: 30 • Aggregators: 9 • Processors: 4
  • 6. © 2018 InfluxData. All rights reserved. Telegraf Overview • Can act as: • Agent • Collector • Part of an Ingest Pipeline
  • 7. © 2018 InfluxData. All rights reserved. Telegraf Plugins • Outputs • Allows you to send metrics to a variety of datastores • Plugins for both InfluxDB 1.x and 2.0 • Supports Kafka, MQTT, NSQ, OpenMetrics, and more • Aggregators and Processors allow you to manipulate data as it flows through Telegraf • Transform tags, convert types, calculate histograms
  • 8. © 2018 InfluxData. All rights reserved. Telegraf Input Plugins • Metrics ingestion from host system: CPU, I/O, Network… • Common Applications like NGINX, Postgres, Redis… • Third Party APIs: Mailchimp, Cloudwatch, Google Analytics… • General-Purpose Protocols: HTTP, Socket, MQTT… • …and more!
  • 9. © 2018 InfluxData. All rights reserved. Telegraf Benefits • Minimal memory footprint • Tagging of metrics • Batching of metrics to reduce the number of atomic writes • Easy contribution of functionality thanks to Go • Static Binary • Strong Community Contributions
  • 11. © 2018 InfluxData. All rights reserved. statsd • Listens for incoming data • Acts as a statsd instance • Outputs to any configured output
  • 12. © 2018 InfluxData. All rights reserved. postgresql • Collects performance data • Uses data from built-in views: • pg_stat_database • pg_stat_bgwriter
  • 13. © 2018 InfluxData. All rights reserved. apache • Connects over HTTP • Reads data from: • /server-status?auto
  • 14. © 2018 InfluxData. All rights reserved. win_perf_counters • Collects performance data from Windows machines
  • 15. © 2018 InfluxData. All rights reserved. Input Plugin Considerations • Where does the data exist? • How can it be collected? • What shape is the data?
  • 16. © 2018 InfluxData. All rights reserved. prometheus_client • Output plugin • Exposes metrics in Prometheus (now OpenMetrics) format.
  • 17. © 2018 InfluxData. All rights reserved. mqtt • Output half of the MQTT plugins • Allows you to write messages to an MQTT broker.
  • 18. © 2018 InfluxData. All rights reserved. Output Plugin Considerations • How should the data be shaped? • How is the data output? • Where is the data output to?
  • 20. © 2018 InfluxData. All rights reserved. Plugin Architecture • Built to be extensible from the beginning • Make use of interfaces in Go • Each plugin type has an interface
  • 21. © 2018 InfluxData. All rights reserved.
  • 22. © 2018 InfluxData. All rights reserved. package simple // simple.go import ( "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/plugins/inputs" ) type Simple struct { Ok bool } func (s *Simple) Description() string { return "a demo plugin" } func (s *Simple) SampleConfig() string { return ` ## Indicate if everything is fine ok = true ` } func (s *Simple) Gather(acc telegraf.Accumulator) error { if s.Ok { acc.AddFields("state", map[string]interface{}{"value": "pretty good"}, nil) } else { acc.AddFields("state", map[string]interface{}{"value": "not great"}, nil) } return nil } func init() { inputs.Add("simple", func() telegraf.Input { return &Simple{} }) }
  • 24. © 2018 InfluxData. All rights reserved. Getting started… • Recommend using Go 1.11 • Understanding of Git & Pull Requests • What is our plugin going to do? • Generate data using “sine” and “cosine” trigonometric functions • Read the CONTRIBUTING.md file to ensure you can build & test Telegraf before continuing
  • 25. © 2018 InfluxData. All rights reserved. Getting started… • Set up your workspace, get the code, and create a branch: • Create the required directories and files: • Add boilerplate… $ go get github.com/influxdata/telegraf
 $ cd $GOPATH/github.com/influxdata/telegraf
 $ git checkout -b trig-demo $ cd plugins/inputs $ mkdir trig $ touch trig/trig.go
  • 26. © 2018 InfluxData. All rights reserved. package trig
 
 import (
     "github.com/influxdata/telegraf"
     "github.com/influxdata/telegraf/plugins/inputs"
 )
 
 type Trig struct {
 }
 
 func (s *Trig) SampleConfig() string {
     return ""
 }
 
 func (s *Trig) Description() string {
     return ""
 }
 
 func (s *Trig) Gather(acc telegraf.Accumulator) error {
     return nil
 }
 
 func init() {
     inputs.Add("trig", func() telegraf.Input { return &Trig{} })
 } trig.go
  • 27. © 2018 InfluxData. All rights reserved. Import your plugin • Add the following to telegraf/plugins/inputs/all/all.go • This will your plugin into the main Telegraf package and ensure that it can run. _ "github.com/influxdata/telegraf/plugins/inputs/trig"
  • 28. © 2018 InfluxData. All rights reserved. Add configuration variables • Each plugin has a struct • There must be a property on the struct to hold any configuration variables • Any other variables should be unexported • We’ll add two variables: • “x” will hold the state of the plugin between collection intervals • “Amplitude” will hold the amplitude value for the sin wave
  • 29. © 2018 InfluxData. All rights reserved. package trig
 
 import (
     "github.com/influxdata/telegraf"
     "github.com/influxdata/telegraf/plugins/inputs"
 )
 
 type Trig struct {     x         float64     Amplitude float64
 }
 
 func (s *Trig) SampleConfig() string {
     return ""
 }
 
 func (s *Trig) Description() string {
     return ""
 }
 
 func (s *Trig) Gather(acc telegraf.Accumulator) error {
 trig.go
  • 30. © 2018 InfluxData. All rights reserved. Add sample configuration • Telegraf can dynamically construct configuration files • Aggregates sample configs for all plugins • The CLI allows you to provide arguments to filter which plugins are included • In 2.0, InfluxDB will use this info to generate Telegraf configs
  • 31. © 2018 InfluxData. All rights reserved. package trig
 
 import (
     "github.com/influxdata/telegraf"
     "github.com/influxdata/telegraf/plugins/inputs"
 )
 
 type Trig struct {     x         float64     Amplitude float64
 }
 
 var TrigConfig = `
  ## Set the amplitude
  amplitude = 10.0
 `
 
 func (s *Trig) SampleConfig() string {
     return TrigConfig
 } 
 trig.go
  • 32. © 2018 InfluxData. All rights reserved. Add a simple description • This description is included above the plugin configuration and should briefly describe what your plugin does
  • 33. © 2018 InfluxData. All rights reserved. type Trig struct {     x         float64     Amplitude float64
 }
 
 var TrigConfig = `
  ## Set the amplitude
  amplitude = 10.0
 `
 
 func (s *Trig) SampleConfig() string {
     return TrigConfig
 } 
 func (s *Trig) Description() string {
     return "Inserts sine and cosine waves for demonstration purposes"
 }
 
 func (s *Trig) Gather(acc telegraf.Accumulator) error {
 trig.go
  • 34. © 2018 InfluxData. All rights reserved. Test your config! • First, build Telegraf • Generate a config: $ make telegraf $ telegraf -sample-config -input-filter trig -output-filter influxdb -debug
  • 35. © 2018 InfluxData. All rights reserved. ...
 ############################################################################### # INPUT PLUGINS # ############################################################################### # Inserts sine and cosine waves for demonstration purposes [[inputs.trig]] ## Set the amplitude amplitude = 10.0
  • 36. © 2018 InfluxData. All rights reserved. The “Gather” function • The heart of the plugin, it is run every time telegraf collects metrics • This is where you’ll do the majority of the work • We’ll generate sine and cosine values • At the end of the function, we add any data we’ve collected and to the Telegraf “Accumulator” by calling .AddFields(measurement, tags, fields). • This defines a new point in InfluxDB with the timestamp being the collection time.
  • 37. © 2018 InfluxData. All rights reserved.     return "Inserts sine and cosine waves for demonstration purposes"
 }
 
 func (s *Trig) Gather(acc telegraf.Accumulator) error {
     sinner := math.Sin((s.x*math.Pi)/5.0) * s.Amplitude
     cosinner := math.Cos((s.x*math.Pi)/5.0) * s.Amplitude
 
     fields := make(map[string]interface{})
     fields["sine"] = sinner
     fields["cosine"] = cosinner
 
     tags := make(map[string]string)
 
     s.x += 1.0
     acc.AddFields("trig", fields, tags)
 
     return nil
 } trig.go
  • 38. © 2018 InfluxData. All rights reserved. Add initial state • In our boilerplate, we added an init() function • Called when the plugin is first initialized • Makes the plugin available to the Telegraf agent • We can define starting state as part of this function • We need to initialize our “x” variable
  • 39. © 2018 InfluxData. All rights reserved.     cosinner := math.Cos((s.x*math.Pi)/5.0) * s.Amplitude
 
     fields := make(map[string]interface{})
     fields["sine"] = sinner
     fields["cosine"] = cosinner
 
     tags := make(map[string]string)
 
     s.x += 1.0
     acc.AddFields("trig", fields, tags)
 
     return nil
 } 
 
 func init() {     inputs.Add("trig", func() telegraf.Input { return &Trig{x: 0.0} }) } trig.go
  • 40. © 2018 InfluxData. All rights reserved. Compile and test • Once again, build Telegraf: • Generate a config and write it to a file: $ make telegraf $ ./telegraf -sample-config -input-filter trig -output-filter influxdb -debug >> telegraf.conf.test • Run Telegraf with the new config: $ ./telegraf -config telegraf.conf.test -debug
  • 41. © 2018 InfluxData. All rights reserved. $ ./telegraf -config telegraf.conf.test -debug 2019-03-14T06:32:12Z I! Starting Telegraf 2019-03-14T06:32:12Z I! Loaded inputs: trig 2019-03-14T06:32:12Z I! Loaded aggregators: 2019-03-14T06:32:12Z I! Loaded processors: 2019-03-14T06:32:12Z I! Loaded outputs: influxdb 2019-03-14T06:32:12Z I! Tags enabled: host=noah-mbp.local 2019-03-14T06:32:12Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"noah-mbp.local", Flush Interval:10s 2019-03-14T06:32:12Z D! [agent] Connecting outputs 2019-03-14T06:32:12Z D! [agent] Attempting connection to output: influxdb 2019-03-14T06:32:12Z D! [agent] Successfully connected to output: influxdb 2019-03-14T06:32:12Z D! [agent] Starting service inputs 2019-03-14T06:32:30Z D! [outputs.influxdb] wrote batch of 1 metrics in 23.857525ms 2019-03-14T06:32:30Z D! [outputs.influxdb] buffer fullness: 1 / 10000 metrics.
  • 42.
  • 43. © 2018 InfluxData. All rights reserved. Final steps before submitting • Add a few things to your plugin… • a README.md • a LICENSE • A sample of the input/output format • Tests!
  • 44. © 2018 InfluxData. All rights reserved. package trig
 
 import (
     "math"
     "testing"
     "github.com/influxdata/telegraf/testutil"
 )
 
 func TestTrig(t *testing.T) {
 
     s := &Trig{
 
         Amplitude: 10.0,
     }
 
     for i := 0.0; i < 10.0; i++ {
         var acc testutil.Accumulator
         sine := math.Sin((i*math.Pi)/5.0) * s.Amplitude
         cosine := math.Cos((i*math.Pi)/5.0) * s.Amplitude
         s.Gather(&acc)
         fields := make(map[string]interface{})
         fields["sine"] = sine
         fields["cosine"] = cosine
 
         acc.AssertContainsFields(t, "trig", fields)
 
     }
 
 } trig_test.go
  • 45. © 2018 InfluxData. All rights reserved. Final steps before submitting • Add a few things to your plugin… • a README.md • a LICENSE • A sample of the input/output format • Tests! • …and submit! • github.com/influxdata/telegraf/pulls