metrics

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExposeMetrics

func ExposeMetrics(ctx context.Context, eventChan <-chan event.SaltEvent, watchChan <-chan event.WatchEvent, config Config)

Types

type Config added in v0.7.0

type Config struct {
	// HealtMinions enable/disable the health functions/states metrics
	HealthMinions bool `mapstructure:"health-minions"`

	Global struct {
		Filters struct {
			IgnoreTest bool `mapstructure:"ignore-test"`
			IgnoreMock bool `mapstructure:"ignore-mock"`
		}
	}

	SaltNewJobTotal struct {
		Enabled bool
	} `mapstructure:"salt_new_job_total"`

	SaltExpectedResponsesTotal struct {
		Enabled bool
	} `mapstructure:"salt_expected_responses_total"`

	SaltFunctionResponsesTotal struct {
		Enabled        bool
		AddMinionLabel bool `mapstructure:"add-minion-label"`
	} `mapstructure:"salt_function_responses_total"`

	SaltScheduledJobReturnTotal struct {
		Enabled        bool
		AddMinionLabel bool `mapstructure:"add-minion-label"`
	} `mapstructure:"salt_scheduled_job_return_total"`

	SaltResponsesTotal struct {
		Enabled bool
	} `mapstructure:"salt_responses_total"`

	SaltFunctionStatus struct {
		Enabled bool
		Filters struct {
			Functions []string
			States    []string
		}
	} `mapstructure:"salt_function_status"`
}

type Registry added in v0.7.0

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

func NewRegistry added in v0.7.0

func NewRegistry(config Config) Registry

func (*Registry) AddObservableMinion added in v0.9.0

func (r *Registry) AddObservableMinion(minion string)

func (*Registry) DeleteObservableMinion added in v0.9.0

func (r *Registry) DeleteObservableMinion(minion string)

func (*Registry) IncreaseExpectedResponsesTotal added in v0.7.0

func (r *Registry) IncreaseExpectedResponsesTotal(function, state string, value float64)

func (*Registry) IncreaseFunctionResponsesTotal added in v0.7.0

func (r *Registry) IncreaseFunctionResponsesTotal(function, state, minion string, success bool)

func (*Registry) IncreaseNewJobTotal added in v0.7.0

func (r *Registry) IncreaseNewJobTotal(function, state string)

func (*Registry) IncreaseResponseTotal added in v0.7.0

func (r *Registry) IncreaseResponseTotal(minion string, success bool)

func (*Registry) IncreaseScheduledJobReturnTotal added in v0.7.0

func (r *Registry) IncreaseScheduledJobReturnTotal(function, state, minion string, success bool)

func (*Registry) SetFunctionStatus added in v0.7.0

func (r *Registry) SetFunctionStatus(minion, function, state string, success bool)

func (*Registry) UpdateLastHeartbeat added in v0.9.0

func (r *Registry) UpdateLastHeartbeat(minion string)

Jump to

Keyboard shortcuts

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