Version: v0.0.0-...-12ddfe4 Latest Latest

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 12 Imported by: 0


PostgreSQL Output Plugin

This output plugin writes all metrics to PostgreSQL.

# Send metrics to postgres
  address = "host=localhost user=postgres sslmode=verify-full"

  ## A list of tags to exclude from storing. If not specified, all tags are stored.
  # ignored_tags = ["foo", "bar"]

  ## Store tags as foreign keys in the metrics table. Default is false.
  # tags_as_foreignkeys = false




This section is empty.


This section is empty.


This section is empty.


type InsertItem

type InsertItem struct {
	TableName string
	Columns   []string
	Values    []interface{}
	Types     map[string]string

type InsertKey

type InsertKey struct {
	// contains filtered or unexported fields

type MetricGroup

type MetricGroup struct {
	Metrics   []telegraf.Metric
	Timestamp time.Time

type Oracle

type Oracle struct {
	Address           string
	TagsAsForeignkeys bool
	TagsAsJsonb       bool
	FieldsAsJsonb     bool
	Timestamp         string
	TableTemplate     string
	TagTableSuffix    string
	Tables            map[string]bool
	QueueDataDir      string
	Connections       int
	MaxItems          uint64
	TagKey            []string
	Strategy          string
	Exclude           []string
	// contains filtered or unexported fields

func (*Oracle) AddColumn

func (p *Oracle) AddColumn(table string, column string) error

func (*Oracle) Close

func (p *Oracle) Close() error

func (*Oracle) ColumnExists

func (p *Oracle) ColumnExists(err error) (bool, string, string)

func (*Oracle) Connect

func (p *Oracle) Connect() error

func (*Oracle) Description

func (p *Oracle) Description() string

func (*Oracle) HandleInserts_Batch

func (p *Oracle) HandleInserts_Batch(i int, insertItems map[string]InsertItem) error

func (*Oracle) PostgreSQL_Batch

func (p *Oracle) PostgreSQL_Batch(txn *sql.Tx, insertItems map[string]InsertItem) error

func (*Oracle) SampleConfig

func (p *Oracle) SampleConfig() string

func (*Oracle) Write

func (p *Oracle) Write(metrics []telegraf.Metric) error

func (*Oracle) WriteMetrics

func (p *Oracle) WriteMetrics(id int)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL