yandex_cloud_monitoring

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 12 Imported by: 0

README

Yandex Cloud Monitoring Output Plugin

This plugin will send custom metrics to Yandex Cloud Monitoring.

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Send aggregated metrics to Yandex.Cloud Monitoring
[[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) SampleConfig

func (*YandexCloudMonitoring) SampleConfig() string

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