Skip to main content

Prometheus exporter for Tenable.io metrics

Project description

tenable-exporter

tenable-exporter banner

CI CodeQL PyPI Python License GHCR

A Prometheus exporter for Tenable.io built with pyTenable.

Exports vulnerability, asset, and scan metrics so you can alert on them in Grafana or any Prometheus-compatible stack.

PyPI: pip install tenable-exporter  ·  Image: ghcr.io/polarpoint-io/tenable-exporter:latest  ·  Repo: https://github.com/polarpoint-io/tenable-exporter

Metrics

Vulnerabilities

Metric Labels Description
tenable_vulnerabilities_total severity Total vulnerabilities by severity
tenable_vulnerabilities_by_subscription_total provider, subscription_id, severity Vulns per cloud provider and subscription
tenable_vulnerabilities_by_region_total provider, subscription_id, region, severity Vulns per subscription and region
tenable_vulnerabilities_by_resource_group_total provider, subscription_id, resource_group, severity Vulns per Azure resource group
tenable_vulnerabilities_by_resource_total provider, subscription_id, resource_id, severity Vulns per individual cloud resource
tenable_vulnerabilities_by_plugin_family_total plugin_family, severity Vulns by Tenable plugin family and severity
tenable_vulnerabilities_by_subscription_plugin_total provider, subscription_id, region, plugin_family, severity Cross-dimension vuln count
tenable_vulnerabilities_by_state_total provider, subscription_id, state, severity Vulns by lifecycle state (OPEN, REOPENED, FIXED) — use FIXED to track remediation velocity
tenable_vulnerabilities_by_exploit_risk_total cve_category, severity Vulns by Tenable CVE category: cisa known exploitable, ransomware, emerging threats, persistently exploited, top 50 vpr, recent active exploitation, in the news
tenable_vulnerabilities_by_vpr_band_total provider, subscription_id, vpr_band Vulns by VPR (Vulnerability Priority Rating) band: critical (9–10), high (7–8.9), medium (4–6.9), low (<4)

Assets

Metric Labels Description
tenable_assets_by_subscription_total provider, subscription_id Asset count per cloud provider and subscription
tenable_assets_by_region_total provider, subscription_id, region Asset count per subscription and region
tenable_assets_by_resource_group_total provider, subscription_id, resource_group Asset count per Azure resource group
tenable_assets_by_resource_type_total provider, subscription_id, region, resource_type Asset count by resource type (e.g. t3.medium, Standard_D2s_v3)
tenable_assets_by_source_total source Assets by Tenable discovery source (AWS, AZURE, GCP, NESSUS, WAS, …)
tenable_assets_by_tag_total tag_category, tag_value Assets by Tenable tag or cloud-native resource tag. Use tag_category=asset_type with values like database, container_registry, acr, aks, rds to track specific resource classes

Compliance

Metric Labels Description
tenable_compliance_findings_total provider, subscription_id, audit_name, result CIS/DISA STIG compliance findings by audit and result (PASSED, FAILED, WARNING, SKIPPED)
tenable_compliance_findings_by_region_total provider, subscription_id, region, result Compliance findings per region
tenable_compliance_findings_by_resource_group_total provider, subscription_id, resource_group, result Compliance findings per Azure resource group

Scans & System

Metric Labels Description
tenable_scans_total Total number of scans
tenable_scans_by_status_total status Scans by status (running, completed, aborted, …)
tenable_plugin_set_updated_timestamp Unix timestamp of the last plugin set update

Label values by cloud provider

Label AWS Azure GCP
provider aws azure gcp
subscription_id Account ID Subscription UUID Project ID
region e.g. us-east-1 Azure location GCP zone
resource_group unknown Resource group name unknown
resource_id EC2 instance ID Azure resource / VM ID GCP instance ID
resource_type EC2 instance type VM size Machine type

Targeting databases, ACRs, and other resource types

Tenable doesn't have a dedicated field for resource class (database, container registry, etc.). The recommended approaches:

Option 1 — Tenable tags (most reliable): In the Tenable UI, create a tag category AssetType and assign values like database, acr, aks, rds, cosmos_db to assets. These appear immediately in tenable_assets_by_tag_total{tag_category="assettype"}.

Option 2 — Cloud-native resource tags: Enable include_resource_tags=True (already on). Any AWS tag, Azure tag, or GCP label on the resource appears as a tenable_assets_by_tag_total time series. For example, an Azure ACR tagged {"resource_type": "container_registry"} surfaces as tag_category="resource_type", tag_value="container_registry".

Option 3 — Plugin family: Database vulnerabilities land in the Databases plugin family — visible in tenable_vulnerabilities_by_plugin_family_total{plugin_family="databases"}.

Option 4 — Discovery source filter: Scope the exporter to specific sources via TENABLE_FILTER_PROVIDERS. For ACR-specific scanning, Tenable uses the AZURE source; container-specific findings come from the Containers plugin family.

Quick start

pip

pip install tenable-exporter
export TENABLE_ACCESS_KEY=your_access_key
export TENABLE_SECRET_KEY=your_secret_key

tenable-exporter

Metrics will be available at http://localhost:9190/metrics.

Docker

docker run -p 9190:9190 \
  -e TENABLE_ACCESS_KEY=your_access_key \
  -e TENABLE_SECRET_KEY=your_secret_key \
  ghcr.io/polarpoint-io/tenable-exporter:latest

Docker Compose

cp .env.example .env
# Fill in your Tenable credentials in .env
docker compose up -d

Configuration

Environment variable Default Description
TENABLE_ACCESS_KEY required Tenable.io API access key
TENABLE_SECRET_KEY required Tenable.io API secret key
EXPORTER_PORT 9190 Port to expose metrics on
SCRAPE_INTERVAL 300 Seconds between Tenable API scrapes
TENABLE_FILTER_PROVIDERS (all) Comma-separated providers to include: aws, azure, gcp
TENABLE_FILTER_SUBSCRIPTIONS (all) Comma-separated subscription IDs to include (AWS account IDs, Azure subscription UUIDs, or GCP project IDs)

Docker image tags

Tag When pushed
latest Every merge to main
sha-<short> Every merge to main
1.2.3 / 1.2 On a semantic-release version bump

Required GitHub secrets

Add these at GitHub repo → Settings → Secrets and variables → Actions:

Secret Description
POL_GH_TOKEN Personal access token with repo + write:packages scope
PYPI_TOKEN PyPI API token for the tenable-exporter project

Development

git clone https://github.com/polarpoint-io/tenable-exporter.git
cd tenable-exporter
pip install -e ".[dev]"

export TENABLE_ACCESS_KEY=...
export TENABLE_SECRET_KEY=...

tenable-exporter

License

MIT — see LICENSE.

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

tenable_exporter-1.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

tenable_exporter-1.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file tenable_exporter-1.1.1.tar.gz.

File metadata

  • Download URL: tenable_exporter-1.1.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for tenable_exporter-1.1.1.tar.gz
Algorithm Hash digest
SHA256 257e0e9415f184127f4ac5e2cd867aeecf29a10619cb3df677c24ab2422b803b
MD5 0f1fdafa1d87545ff7d029a77503e061
BLAKE2b-256 0750b3bd5adc512afccddf0be4b3f2fa1bcf92e4825f6d7cfff37c64598c8bfa

See more details on using hashes here.

File details

Details for the file tenable_exporter-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tenable_exporter-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60343b79215686c154d060a5c7bc5926d4db5d211794ccb0f100c61d3528cf84
MD5 b01c680825580095361cdd914d7640c5
BLAKE2b-256 291187b460f61144518c1255d83b584393f2a77716bd78a054ae13d6fdd325ad

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