BOSH TSDB Prometheus Exporter [](https://travis-ci.org/bosh-prometheus/boshtsdbexporter)

December 27, 2017 ยท View on GitHub

A Prometheus exporter for BOSH OpenTSDB Health Monitor plugin metrics. Please refer to the FAQ for general questions about this exporter.

Architecture overview

Installation

Binaries

Download the already existing binaries for your platform:

$ ./bosh_tsdb_exporter <flags>

From source

Using the standard go install (you must have Go already installed in your local machine):

$ go install github.com/bosh-prometheus/bosh_tsdb_exporter
$ bosh_tsdb_exporter <flags>

Docker

To run the BOSH TSDB exporter as a Docker container, run:

docker run -p 9194:9194 -p 13321:13321 boshprometheus/bosh-tsdb-exporter <flags>

BOSH

This exporter can be deployed using the Prometheus BOSH Release.

Usage

Flags

Flag / Environment VariableRequiredDefaultDescription
metrics.namespace
BOSH_TSDB_EXPORTER_METRICS_NAMESPACE
Nobosh_tsdbMetrics Namespace
metrics.environment
BOSH_TSDB_EXPORTER_METRICS_ENVIRONMENT
YesEnvironment label to be attached to metrics
tsdb.listen-address
BOSH_TSDB_EXPORTER_TSDB_LISTEN_ADDRESS
No:13321Address to listen on for the TSDB collector
web.listen-address
BOSH_TSDB_EXPORTER_WEB_LISTEN_ADDRESS
No:9194Address to listen on for web interface and telemetry
web.telemetry-path
BOSH_TSDB_EXPORTER_WEB_TELEMETRY_PATH
No/metricsPath under which to expose Prometheus metrics
web.auth.username
BOSH_TSDB_EXPORTER_WEB_AUTH_USERNAME
NoUsername for web interface basic auth
web.auth.password
BOSH_TSDB_EXPORTER_WEB_AUTH_PASSWORD
NoPassword for web interface basic auth
web.tls.cert_file
BOSH_TSDB_EXPORTER_WEB_TLS_CERTFILE
NoPath to a file that contains the TLS certificate (PEM format). If the certificate is signed by a certificate authority, the file should be the concatenation of the server's certificate, any intermediates, and the CA's certificate
web.tls.key_file
BOSH_TSDB_EXPORTER_WEB_TLS_KEYFILE
NoPath to a file that contains the TLS private key (PEM format)

Metrics

The exporter returns the following metrics:

MetricDescriptionLabels
metrics.namespace_received_tsdb_messages_totalTotal number of BOSH HM TSDB received messagesenvironment
metrics.namespace_invalid_tsdb_messages_totalTotal number of BOSH HM TSDB invalid messagesenvironment
metrics.namespace_discarded_tsdb_messages_totalTotal number of BOSH HM TSDB discarded messagesenvironment
metrics.namespace_last_tsdb_received_message_timestampNumber of seconds since 1970 since last received message from BOSH HM TSDBenvironment
metrics.namespace_last_hm_tsdb_scrape_timestampNumber of seconds since 1970 since last scrape of BOSH HM TSDB collectorenvironment
metrics.namespace_last_hm_tsdb_scrape_duration_secondsDuration of the last scrape of BOSH HM TSDB collectorenvironment

The exporter returns the following Job metrics:

MetricDescriptionLabels
metrics.namespace_job_healthyBOSH Job Healthy (1 for healthy, 0 for unhealthy)environment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_load_avg01BOSH Job Load avg01environment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_cpu_sysBOSH Job CPU Systemenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_cpu_userBOSH Job CPU Userenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_cpu_waitBOSH Job CPU Waitenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_mem_kbBOSH Job Memory KBenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_mem_percentBOSH Job Memory Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_swap_kbBOSH Job Swap KBenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_swap_percentBOSH Job Swap Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_system_disk_inode_percentBOSH Job System Disk Inode Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_system_disk_percentBOSH Job System Disk Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_ephemeral_disk_inode_percentBOSH Job Ephemeral Disk Inode Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_ephemeral_disk_percentBOSH Job Ephemeral Disk Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_persistent_disk_inode_percentBOSH Job Persistent Disk Inode Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index
metrics.namespace_job_persistent_disk_percentBOSH Job Persistent Disk Percentenvironment, bosh_deployment, bosh_job_name, bosh_job_id, bosh_job_index

Contributing

Refer to the contributing guidelines.

License

Apache License 2.0, see LICENSE.