fluentbit

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

Fluent Bit CLI

CI Status
CI Workflow Status
Unit Tests (main) CI/Unit Tests

Fluent Bit Client UI Tool.

asciicast

Build instructions

Requires Go 1.16 to be installed.

make common-build
Running the cli

Built binary

./fluent-bit-cli

Via snap

sudo snap install fluent-bit-cli --edge
Running Tests
make test

Keyboard shortcuts

Move with arrow keys up and down to select the chart you want to see.
Hit Ctrl+C to exit.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	FluentBit struct {
		Version string   `json:"version"`
		Edition string   `json:"edition"`
		Flags   []string `json:"flags"`
	} `json:"fluent-bit"`
}

BuildInfo payload returned by GET /

type Client

type Client struct {
	HTTPClient *http.Client
	BaseURL    string
}

Client for Fluent Bit Monitoring HTTP API.

func (*Client) BuildInfo

func (c *Client) BuildInfo(ctx context.Context) (BuildInfo, error)

func (*Client) Metrics

func (c *Client) Metrics(ctx context.Context) (Metrics, error)

func (*Client) UpTime

func (c *Client) UpTime(ctx context.Context) (UpTime, error)

type InputSeries

type InputSeries struct {
	Records []uint64
	Bytes   []uint64
}

func (InputSeries) InstantRates

func (ss InputSeries) InstantRates() InputSeries

InstantRates converts the series counters into rates.

type MetricInput

type MetricInput struct {
	Records uint64 `json:"records"`
	Bytes   uint64 `json:"bytes"`
}

type MetricOutput

type MetricOutput struct {
	ProcRecords   uint64 `json:"proc_records"`
	ProcBytes     uint64 `json:"proc_bytes"`
	Errors        uint64 `json:"errors"`
	Retries       uint64 `json:"retries"`
	RetriesFailed uint64 `json:"retries_failed"`
}

type Metrics

type Metrics struct {
	Input  map[string]MetricInput  `json:"input"`
	Output map[string]MetricOutput `json:"output"`
}

Metrics payload returned by GET /api/v1/metrics Maps keyed by metric name.

type OutputSeries

type OutputSeries struct {
	ProcRecords   []uint64
	ProcBytes     []uint64
	Errors        []uint64
	Retries       []uint64
	RetriesFailed []uint64
}

func (OutputSeries) InstantRates

func (ss OutputSeries) InstantRates() OutputSeries

InstantRates converts the series counters into rates.

type Series

type Series struct {
	Input  map[string]InputSeries
	Output map[string]OutputSeries
	// contains filtered or unexported fields
}

func (*Series) InputNames

func (ss *Series) InputNames() []string

func (*Series) OutputNames

func (ss *Series) OutputNames() []string

func (*Series) Push

func (ss *Series) Push(metrics func() (Metrics, error)) error

type UpTime

type UpTime struct {
	UpTimeSec uint64 `json:"uptime_sec"`
	// UpTimeHr is the human readable representation of uptime.
	UpTimeHr string `json:"uptime_hr"`
}

UpTime paylaod returned by GET /api/v1/uptime

Directories

Path Synopsis
cmd
fluent-bit-cli command

Jump to

Keyboard shortcuts

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