Skip to main content

A Prometheus file and http discovery for infoblox

Project description

infoblox-discovery

Overview

The infoblox-discovery service collect different data from a Infloblox master server about different objects that can be monitored by Prometheus using different exporters as the blackbox-exporter and infoblox-exporter. The current supporter objects are:

  • members
  • nodes
  • dns_servers
  • dhcp_ranges
  • zones
  • web_endpoints

Labels naming (since 0.2.0)

All labels are returned prefixed as __meta_infoblox_

Design

The infoblox-discovery can run in 2 modes, as file discovery or as http discovery. In http discovery mode the infoblox-discovery will run as a http service that Prometheus can access using http_discovery. In file discovery the infoblox-discovery will just create Prometheus file discovery files.

When running in http discovery mode the collection of data is done on an interval, default every 3600 sec, and the data is cached. The main reason is to limit a high number of calls to the infoblox master server.

Zones

The query is based on object 'zone_auth' with the query where 'view' is 'External'. The logic detect reverse and fqdn based zones.

Web endpoints

These fqdn "hosts" that are based on networks, e.g. 192.91.218.0/24. The result is based on two queries.

  1. Get all ipv4address from the network where type is HOST
  2. For all the above get all dns_aliases from record:host and check if External is in the _ref string

The networks that are subject to be scraped is based on the networks defined in the configuration file, see below.

Configuration

See the example_config.yml file.

Run

Environment variables

  • INFOBLOX_DISCOVERY_CONFIG - the configuration file, default to config.yml
  • INFOBLOX_DISCOVERY_PROMETHEUS_SD_FILE_DIRECTORY - the directory where file discovery based will be created, no default only used when run for file discovery
  • INFOBLOX_DISCOVERY_HOST - the host to run the discovery service, default 0.0.0.0
  • INFOBLOX_DISCOVERY_PORT - the port to run the discovery service, default 9694
  • INFOBLOX_DISCOVERY_BASIC_AUTH_USERNAME - the basic auth username to the discovery service, no default.
  • INFOBLOX_DISCOVERY_BASIC_AUTH_PASSWORD - the basic auth username to the discovery service, no default.
  • INFOBLOX_DISCOVERY_LOG_FILE - log file, default stdout
  • INFOBLOX_DISCOVERY_LOG_LEVEL - the log level, default INFO
  • INFOBLOX_DISCOVERY_CACHE_TTL - the discovered data ttl in seconds, must be higher than INFOBLOX_DISCOVERY_FETCH_INTERVAL, default 7200
  • INFOBLOX_DISCOVERY_FETCH_INTERVAL - the interval to collect discover data, default 3600

INFOBLOX_DISCOVERY_BASIC_AUTH_USERNAME and INFOBLOX_DISCOVERY_BASIC_AUTH_PASSWORD must be set - the discovery can not run without basic authentication.

File discovery mode

python -m infoblox_discovery

Http discovery mode

python -m infoblox_discovery --server

Test

curl -s 'localhost:9694/prometheus-sd-targets?master=infoblox.foo.com&type=members'

The master must match the master entry in the configuration file. The type can be:

  • members
  • nodes
  • dns_servers
  • dhcp_ranges
  • zones
  • web_endpoints

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

infoblox_discovery-0.3.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infoblox_discovery-0.3.0-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

Details for the file infoblox_discovery-0.3.0.tar.gz.

File metadata

  • Download URL: infoblox_discovery-0.3.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for infoblox_discovery-0.3.0.tar.gz
Algorithm Hash digest
SHA256 33ca91e7c674d6c4d0bc954ca6b97f3972657f9f868fbee0ccca2586528c07b3
MD5 38da0aaaae9cd399796bb28956ea1288
BLAKE2b-256 12e319ecbfdc937fca9bc99519e9f673b6b5cb82f7a6158132532dfefe3b3637

See more details on using hashes here.

File details

Details for the file infoblox_discovery-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for infoblox_discovery-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0372f4289d3c48222ec23cb9c065cb5950cafa3043e7558bd8d44c4d72c7f42e
MD5 2114c9e1babbde978158e618c154183f
BLAKE2b-256 dd9886c4953ffde6ef201f2ac955a92840a5de27926694384bcd6afe53acf55b

See more details on using hashes here.

Supported by

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