Skip to main content

A Prometheus file and http discovery for .......

Project description

Python application PyPI version

biqiq-discovery a Prometheus service discovery for F5 BigIQ management platform

Overview

Configuration

Example:

bigiq:
  host: www.bigiq.io
  port: 443
  username: user
  password: password

Environment variables

  • BIGIQ_DISCOVERY_CONFIG - the path to the above config file, default is ./config.yml
  • BIGIQ_DISCOVERY_PROMETHEUS_SD_FILE_DIRECTORY - the output directory for the file discovery files used in your Prometheus configuration. Each adom will have its own file.
  • BIGIQ_DISCOVERY_LOG_LEVEL - the log level, default WARNING
  • BIGIQ_DISCOVERY_LOG_FILE - the log file, default stdout
  • BIGIQ_DISCOVERY_HOST - the ip to expose the exporter on, default 0.0.0.0 - only applicable if running in server mode
  • BIGIQ_DISCOVERY_PORT - the port to expose the exporter on, default 9694
  • BIGIQ_DISCOVERY_BASIC_AUTH_ENABLED - use basic auth if set to anything, default false
  • BIGIQ_DISCOVERY_BASIC_AUTH_USERNAME - the username
  • BIGIQ_DISCOVERY_BASIC_AUTH_PASSWORD - the password
  • BIGIQ_DISCOVERY_CACHE_TTL - the ttl in seconds to keep the result from Fortimanager in cache, default 60

Run

File service discovery

pip install temp-discovery
BIGIQ_DISCOVERY_CONFIG=config.yml
BIGIQ_DISCOVERY_PROMETHEUS_SD_FILE_DIRECTORY=/etc/prometheus/file_sd/fortigate
python -m bigiq_discovery

Http service discovery

pip install temp-discovery
BIGIQ_DISCOVERY_CONFIG=config.yml
BIGIQ_DISCOVERY_BASIC_AUTH_ENABLED=true
BIGIQ_DISCOVERY_BASIC_AUTH_USERNAME=foo
BIGIQ_DISCOVERY_BASIC_AUTH_PASSWORD=bar
BIGIQ_DISCOVERY_LOG_LEVEL=INFO
python -m temp_discovery --server

Test discovery by curl

curl -ufoo:bar localhost:9694/prometheus-sd-targets

Prometheus job configuration

Example using the discovery with blackbox exporter

- job_name: 'f5-cluster-ping'
  metrics_path: /probe
  params:
    module: [icmp]
  http_sd_configs:
    - url: http://localhost:9694/prometheus-sd-targets
      refresh_interval: 60s
      basic_auth:
        username: foo
        password: bar

  relabel_configs:
    - source_labels: [ __address__ ]
      regex: '(.+):.*'
      target_label: __param_target
    - source_labels: [ __param_target ]
      target_label: instance
    - target_label: __address__
      replacement: 'localhost:9115'
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bigiq-discovery-0.1.2.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

bigiq_discovery-0.1.2-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file bigiq-discovery-0.1.2.tar.gz.

File metadata

  • Download URL: bigiq-discovery-0.1.2.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for bigiq-discovery-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5969b272c62514a56b595e53db18eba9b0e43f656f9abbb2755cea153ec20012
MD5 37f095fe77de669ac05b286beae97d82
BLAKE2b-256 fe667e7e953a7e6099cb4da9f84f90e3924e39dad5ab08945e37fbc6bc1e3c75

See more details on using hashes here.

File details

Details for the file bigiq_discovery-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for bigiq_discovery-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad993b9b5aeb959e855f07d7b0ba4ff6b78c884f90d70090eb798547516ff916
MD5 120ef8382b159fdd5d0f71eb52e86ff1
BLAKE2b-256 581b9145d3dca1bbef5cf510b295bae4848ba4756c2610c1e3c341b6d5a53318

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page