date

package
v0.0.0-...-535192b Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2019 License: MIT Imports: 2 Imported by: 0

README

Date Processor Plugin

Use the date processor to add the metric timestamp as a human readable tag.

A common use is to add a tag that can be used to group by month or year.

A few example usecases include:

  1. consumption data for utilities on per month basis
  2. bandwith capacity per month
  3. compare energy production or sales on a yearly or monthly basis
Configuration
[[processors.date]]
  ## New tag to create
  tag_key = "month"

  ## Date format string, must be a representation of the Go "reference time"
  ## which is "Mon Jan 2 15:04:05 -0700 MST 2006".
  date_format = "Jan"
Example
- throughput lower=10i,upper=1000i,mean=500i 1560540094000000000
+ throughput,month=Jun lower=10i,upper=1000i,mean=500i 1560540094000000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	TagKey     string `toml:"tag_key"`
	DateFormat string `toml:"date_format"`
}

func (*Date) Apply

func (d *Date) Apply(in ...telegraf.Metric) []telegraf.Metric

func (*Date) Description

func (d *Date) Description() string

func (*Date) SampleConfig

func (d *Date) SampleConfig() string

Jump to

Keyboard shortcuts

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