Documentation ¶
Index ¶
- Constants
- type Exporter
- func (e *Exporter) AuthenticateWallixAPI(metricsChannel chan<- prometheus.Metric, client *http.Client) (err error)
- func (e *Exporter) Collect(metricsChannel chan<- prometheus.Metric)
- func (e *Exporter) Describe(metricsChannel chan<- *prometheus.Desc)
- func (e *Exporter) FetchWallixMetrics(metricsChannel chan<- prometheus.Metric, client *http.Client)
Constants ¶
View Source
const (
// prometheus exporter Namespace.
Namespace = "wallix_bastion"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
func NewExporter ¶
func (*Exporter) AuthenticateWallixAPI ¶
func (e *Exporter) AuthenticateWallixAPI(metricsChannel chan<- prometheus.Metric, client *http.Client) (err error)
The first request done to wallix API. It allows to: - determine "up" metric for the exporter - prevent trying to fetch other metrics if down - retrieve the cookie to not have to authenticate subsequent requests Notice it uses "POST" methode in contrast to all other requests.
func (*Exporter) Collect ¶
func (e *Exporter) Collect(metricsChannel chan<- prometheus.Metric)
func (*Exporter) Describe ¶
func (e *Exporter) Describe(metricsChannel chan<- *prometheus.Desc)
func (*Exporter) FetchWallixMetrics ¶
func (e *Exporter) FetchWallixMetrics( metricsChannel chan<- prometheus.Metric, client *http.Client, )
All other metrics fetched from the API essentially by counting the number of elements of list returned by different routes.
Click to show internal directories.
Click to hide internal directories.