bigiq-discovery


Namebigiq-discovery JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/thenodon/temp-discovery
SummaryA Prometheus file and http discovery for .......
upload_time2023-08-17 12:58:09
maintainer
docs_urlNone
authorthenodon
requires_python>=3.8
licenseGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Python application](https://github.com/thenodon/bigiq-discovery//actions/workflows/python-app.yml/badge.svg)](https://github.com/thenodon/bigiq-discovery//actions/workflows/python-app.yml)
[![PyPI version](https://badge.fury.io/py/bigiq-discovery.svg)](https://badge.fury.io/py/bigiq-discovery)

biqiq-discovery a Prometheus service discovery for F5 BigIQ management platform 
------------------------
# Overview
biqiq-discovery is a Prometheus service discovery for F5 devices managed through BigIQ management platform.

# Labels naming (since 0.2.0)
All labels are returned prefixed as `__meta_bigip_`

# Configuration

Example:

```yaml
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
```shell
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
```shell
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

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


# Prometheus job configuration

Example using the discovery with blackbox exporter

```yaml

- 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:
      - __meta_bigip_platform
      action: replace
      target_label: product
    - source_labels:
        - __meta_bigip_version
      action: replace
      target_label: version
    - source_labels:
        - __meta_bigip_clustered
      action: replace
      target_label: clustered
    - source_labels:
        - __meta_bigip_virtual
      action: replace
      target_label: virtual

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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thenodon/temp-discovery",
    "name": "bigiq-discovery",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "thenodon",
    "author_email": "aha@ingby.com",
    "download_url": "https://files.pythonhosted.org/packages/10/10/a39e39e8c022c59a2c9a30b4863aa4f694151b8b50ccaccf4f1e45774799/bigiq-discovery-0.2.0.tar.gz",
    "platform": null,
    "description": "[![Python application](https://github.com/thenodon/bigiq-discovery//actions/workflows/python-app.yml/badge.svg)](https://github.com/thenodon/bigiq-discovery//actions/workflows/python-app.yml)\n[![PyPI version](https://badge.fury.io/py/bigiq-discovery.svg)](https://badge.fury.io/py/bigiq-discovery)\n\nbiqiq-discovery a Prometheus service discovery for F5 BigIQ management platform \n------------------------\n# Overview\nbiqiq-discovery is a Prometheus service discovery for F5 devices managed through BigIQ management platform.\n\n# Labels naming (since 0.2.0)\nAll labels are returned prefixed as `__meta_bigip_`\n\n# Configuration\n\nExample:\n\n```yaml\nbigiq:\n  host: www.bigiq.io\n  port: 443\n  username: user\n  password: password\n\n```\n\n## Environment variables\n\n- BIGIQ_DISCOVERY_CONFIG - the path to the above config file, default is `./config.yml`\n- BIGIQ_DISCOVERY_PROMETHEUS_SD_FILE_DIRECTORY - the output directory for the file discovery files used in your Prometheus\nconfiguration. Each adom will have its own file.\n- BIGIQ_DISCOVERY_LOG_LEVEL - the log level, default `WARNING`\n- BIGIQ_DISCOVERY_LOG_FILE - the log file, default `stdout`\n- BIGIQ_DISCOVERY_HOST - the ip to expose the exporter on, default `0.0.0.0` - only applicable if running in server mode\n- BIGIQ_DISCOVERY_PORT - the port to expose the exporter on, default `9694`\n- BIGIQ_DISCOVERY_BASIC_AUTH_ENABLED - use basic auth if set to anything, default `false`\n- BIGIQ_DISCOVERY_BASIC_AUTH_USERNAME - the username \n- BIGIQ_DISCOVERY_BASIC_AUTH_PASSWORD - the password \n- BIGIQ_DISCOVERY_CACHE_TTL - the ttl in seconds to keep the result from Fortimanager in cache, default `60`\n\n# Run \n\n## File service discovery\n```shell\npip install temp-discovery\nBIGIQ_DISCOVERY_CONFIG=config.yml\nBIGIQ_DISCOVERY_PROMETHEUS_SD_FILE_DIRECTORY=/etc/prometheus/file_sd/fortigate\npython -m bigiq_discovery\n```\n\n## Http service discovery\n```shell\npip install temp-discovery\nBIGIQ_DISCOVERY_CONFIG=config.yml\nBIGIQ_DISCOVERY_BASIC_AUTH_ENABLED=true\nBIGIQ_DISCOVERY_BASIC_AUTH_USERNAME=foo\nBIGIQ_DISCOVERY_BASIC_AUTH_PASSWORD=bar\nBIGIQ_DISCOVERY_LOG_LEVEL=INFO\npython -m temp_discovery --server\n```\nTest discovery by curl\n\n```shell\ncurl -ufoo:bar localhost:9694/prometheus-sd-targets\n```\n\n\n# Prometheus job configuration\n\nExample using the discovery with blackbox exporter\n\n```yaml\n\n- job_name: 'f5-cluster-ping'\n  metrics_path: /probe\n  params:\n    module: [icmp]\n  http_sd_configs:\n    - url: http://localhost:9694/prometheus-sd-targets\n      refresh_interval: 60s\n      basic_auth:\n        username: foo\n        password: bar\n\n  relabel_configs:\n    - source_labels:\n      - __meta_bigip_platform\n      action: replace\n      target_label: product\n    - source_labels:\n        - __meta_bigip_version\n      action: replace\n      target_label: version\n    - source_labels:\n        - __meta_bigip_clustered\n      action: replace\n      target_label: clustered\n    - source_labels:\n        - __meta_bigip_virtual\n      action: replace\n      target_label: virtual\n\n    - source_labels: [ __address__ ]\n      regex: '(.+):.*'\n      target_label: __param_target\n    - source_labels: [ __param_target ]\n      target_label: instance\n    - target_label: __address__\n      replacement: 'localhost:9115'\n    \n```\n\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A Prometheus file and http discovery for .......",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/thenodon/temp-discovery"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1f7ad4e80201a4c86a334455151987b6a0af453853f5886d17cf5fa6d65dfd6",
                "md5": "7b62fbbd6e51e46068c41973516c27da",
                "sha256": "7f0adf2606c9eb2ee0443e67c10801b9d80311dc51fee4cfc8cfa43314922429"
            },
            "downloads": -1,
            "filename": "bigiq_discovery-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b62fbbd6e51e46068c41973516c27da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 31068,
            "upload_time": "2023-08-17T12:58:08",
            "upload_time_iso_8601": "2023-08-17T12:58:08.195474Z",
            "url": "https://files.pythonhosted.org/packages/c1/f7/ad4e80201a4c86a334455151987b6a0af453853f5886d17cf5fa6d65dfd6/bigiq_discovery-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1010a39e39e8c022c59a2c9a30b4863aa4f694151b8b50ccaccf4f1e45774799",
                "md5": "b7a96f7a4deb71cb23b7b1c7540ef51b",
                "sha256": "ce1bdcabd501e8f793829906d5ea1b09f0e3fb27ec50187a12b4758d07869470"
            },
            "downloads": -1,
            "filename": "bigiq-discovery-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b7a96f7a4deb71cb23b7b1c7540ef51b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24253,
            "upload_time": "2023-08-17T12:58:09",
            "upload_time_iso_8601": "2023-08-17T12:58:09.717236Z",
            "url": "https://files.pythonhosted.org/packages/10/10/a39e39e8c022c59a2c9a30b4863aa4f694151b8b50ccaccf4f1e45774799/bigiq-discovery-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-17 12:58:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thenodon",
    "github_project": "temp-discovery",
    "github_not_found": true,
    "lcname": "bigiq-discovery"
}
        
Elapsed time: 0.11298s