yandex_cloud_monitoring

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 10 Imported by: 0

README

Yandex Cloud Monitoring

This plugin will send custom metrics to Yandex Cloud Monitoring. https://cloud.yandex.com/services/monitoring

Configuration:
[[outputs.yandex_cloud_monitoring]]
  ## Timeout for HTTP writes.
  # timeout = "20s"

  ## Yandex.Cloud monitoring API endpoint. Normally should not be changed
  # endpoint_url = "https://monitoring.api.cloud.yandex.net/monitoring/v2/data/write"

  ## All user metrics should be sent with "custom" service specified. Normally should not be changed
  # service = "custom"
Authentication

This plugin currently support only YC.Compute metadata based authentication.

When plugin is working inside a YC.Compute instance it will take IAM token and Folder ID from instance metadata.

Other authentication methods will be added later.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataIamToken

type MetadataIamToken struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int64  `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

type YandexCloudMonitoring

type YandexCloudMonitoring struct {
	Timeout     config.Duration `toml:"timeout"`
	EndpointURL string          `toml:"endpoint_url"`
	Service     string          `toml:"service"`

	Log telegraf.Logger

	MetadataTokenURL       string
	MetadataFolderURL      string
	FolderID               string
	IAMToken               string
	IamTokenExpirationTime time.Time

	MetricOutsideWindow selfstat.Stat
	// contains filtered or unexported fields
}

YandexCloudMonitoring allows publishing of metrics to the Yandex Cloud Monitoring custom metrics service

func (*YandexCloudMonitoring) Close

func (a *YandexCloudMonitoring) Close() error

Close shuts down an any active connections

func (*YandexCloudMonitoring) Connect

func (a *YandexCloudMonitoring) Connect() error

Connect initializes the plugin and validates connectivity

func (*YandexCloudMonitoring) Description

func (a *YandexCloudMonitoring) Description() string

Description provides a description of the plugin

func (*YandexCloudMonitoring) SampleConfig

func (a *YandexCloudMonitoring) SampleConfig() string

SampleConfig provides a sample configuration for the plugin

func (*YandexCloudMonitoring) Write

func (a *YandexCloudMonitoring) Write(metrics []telegraf.Metric) error

Write writes metrics to the remote endpoint

Jump to

Keyboard shortcuts

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