promtail

package
v0.0.0-...-18e2791 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const LOG_ENTRIES_CHAN_SIZE = 5000

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClientProto

func NewClientProto(conf ClientConfig) (*Client, error)

func (*Client) Debug

func (c *Client) Debug(data map[string]interface{})

func (*Client) Error

func (c *Client) Error(data map[string]interface{})

func (*Client) Info

func (c *Client) Info(data map[string]interface{})

func (*Client) Shutdown

func (c *Client) Shutdown()

func (*Client) Warn

func (c *Client) Warn(data map[string]interface{})

type ClientConfig

type ClientConfig struct {
	// E.g. http://localhost:3100/api/prom/push
	PushURL string
	// E.g. "{job=\"somejob\"}"
	Labels             string
	BatchWait          time.Duration
	BatchEntriesNumber int
	// Logs are sent to Promtail if the entry level is >= SendLevel
	SendLevel LogLevel
	// Logs are printed to stdout if the entry level is >= PrintLevel
	PrintLevel LogLevel
}

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO  LogLevel = iota
	WARN  LogLevel = iota
	ERROR LogLevel = iota
	// Maximum level, disables sending or printing
	DISABLE LogLevel = iota
)

Jump to

Keyboard shortcuts

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