sansay_exporter

command module
v0.0.0-...-fd42aa6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

README

sansay exporter

The sansay exporter allows sansay probing of endpoints over HTTP, HTTPS. Much of this code was taken from snmp_exporter.

Running this software

From binaries

Download the most suitable binary from the releases tab

Then:

./sansay_exporter <flags>
Using the docker image

Note: You may want to enable ipv6 in your docker configuration

docker run --rm -d -p 9116:9116 --name sansay_exporter
Checking the results

Visiting http://localhost:9116/sansay?target=localhost:8888 will return metrics against localhost:8888.

Building the software

Local Build

IMPORTANT NOTE: For the SOAP interface to work correctly took a modification to the gowsdl library, which was made in the vendored version.
Therefore, to build and run successfully you MUST use the vendored version:

$ go build -mod=vendor -ldflags '-X main.Version=x.x'
Building with Docker

After a successful local build:

docker build  -t sansay_exporter .

Configuration

sansay exporter is configured via command-line flags (such as what port to listen on, and the logging format and level).

To view all available command-line flags, run ./sansay_exporter -h.

The timeout of each probe is automatically determined from the scrape_timeout in the Prometheus config, slightly reduced to allow for network delays. If not specified, it defaults to 10 seconds.

Prometheus Configuration

The sansay exporter needs to be passed the target as a parameter, this can be done with relabelling.

Example config:

scrape_configs:
  - job_name: 'sansay'
    metrics_path: /sansay
    params:
      username: ['user']
      password: ['password']
    static_configs:
      - targets:
        - localhost:8888    
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9116  # The sansay exporter's real hostname:port.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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