exporter

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectJobInfos added in v0.4.0

func CollectJobInfos(ch chan<- prometheus.Metric, f *Fetcher)

func CollectMaster added in v0.4.0

func CollectMaster(ch chan<- prometheus.Metric, f *Fetcher)

func CollectMinions added in v0.4.0

func CollectMinions(ch chan<- prometheus.Metric, f *Fetcher)

Types

type Exporter

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

func NewExporter

func NewExporter(saltUrl string, saltUser string, saltPassword string) *Exporter

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

type Fetcher

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

func NewFetcher

func NewFetcher(saltUrl string, saltUser string, saltPassword string) *Fetcher

* Builder of new Fetcher pseudo-object * Get the saltstack url, user, password * Return the fetch structure initialized

func (*Fetcher) JobStatus added in v0.3.8

func (f *Fetcher) JobStatus(jobId string, jobStatusChan chan<- JobStatus)

func (*Fetcher) Jobs added in v0.2.1

func (f *Fetcher) Jobs(jobsChan chan<- []Job)

* Functions that retrieve the lasts terminated jobs * Returning Job list with : * - id: the job id * - function: state.apply, state.single, ... * - target_type: (grains, pcre, ...) * - user: the user that run the job * - startTime: the date of the beginning of the job

func (*Fetcher) Login

func (f *Fetcher) Login() error

* Function associated to the Fetcher pseudo-object to login into the saltstack API * Return an error if it's occuring, nil otherwise

func (*Fetcher) Masters

func (f *Fetcher) Masters(masterChan chan<- Masters)

* Function that return a list of minion masters * Get a list of minions in parameters * Return a list of master

func (*Fetcher) Minions

func (f *Fetcher) Minions(minionsChan chan<- Minions)

* Function associated to the Fetcher pseudo-object that fetch information about minions * Return a couple of Minion struct and error if it happens, nil otherwise

type Job added in v0.2.1

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

type JobStatus added in v0.3.8

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

type Masters

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

type Minions

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

Jump to

Keyboard shortcuts

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