aerospike/aerospike-prometheus-exporter

By aerospike

Updated 15 days ago

Aerospike Prometheus Exporter

Image

100K+

Aerospike Prometheus Exporter Image

For more details:

Usage

docker run -itd --name exporter1 -e AS_HOST=172.17.0.2 -e AS_PORT=3000 -e METRIC_LABELS="type='development',source='aerospike'" aerospike/aerospike-prometheus-exporter:latest

AS_HOST - Aerospike Server Node IP

AS_PORT - Aerospike Server Client Access Port

Configuration

For any configuration use the corresponding environment variable in docker run command or in docker-compose.yaml file

[Agent]
# Exporter HTTPS (TLS) configuration
# HTTPS between Prometheus and Exporter

# TLS certificates.
# Supports below formats,
# 1. Certificate file path                                      - "file:<file-path>"
# 2. Environment variable containing base64 encoded certificate - "env-b64:<environment-variable-that-contains-base64-encoded-certificate>"
# 3. Base64 encoded certificate                                 - "b64:<base64-encoded-certificate>"
# Applicable to 'root_ca', 'cert_file' and 'key_file' configurations.

# Server certificate
cert_file = "${AGENT_CERT_FILE}"

# Private key associated with server certificate
key_file = "${AGENT_KEY_FILE}"

# Root CA to validate client certificates (for mutual TLS)
root_ca = "${AGENT_ROOT_CA}"

# Passphrase for encrypted key_file. Supports below formats,
# 1. Passphrase directly                                                      - "<passphrase>"
# 2. Passphrase via file                                                      - "file:<file-that-contains-passphrase>"
# 3. Passphrase via environment variable                                      - "env:<environment-variable-that-holds-passphrase>"
# 4. Passphrase via environment variable containing base64 encoded passphrase - "env-b64:<environment-variable-that-contains-base64-encoded-passphrase>"
# 5. Passphrase in base64 encoded form                                        - "b64:<base64-encoded-passphrase>"
key_file_passphrase = "${AGENT_KEY_FILE_PASSPHRASE}"

# labels to add to the prometheus metrics for e.g. labels={zone="asia-south1-a", platform="google compute engine"}
labels = {${METRIC_LABELS}}

bind = "${AGENT_BIND_HOST}:${AGENT_BIND_PORT}"

# metrics server timeout in seconds
timeout = ${AGENT_TIMEOUT}

# Exporter logging configuration
# Log file path (optional, logs to console by default)
# Level can be info|warning,warn|error,err|debug|trace ('info' by default)
log_file = "${AGENT_LOG_FILE}"
log_level = "${AGENT_LOG_LEVEL}"

# Basic HTTP authentication for '/metrics'.
# Supports below formats,
# 1. Credential directly                                                      - "<credential>"
# 2. Credential via file                                                      - "file:<file-that-contains-credential>"
# 3. Credential via environment variable                                      - "env:<environment-variable-that-contains-credential>"
# 4. Credential via environment variable containing base64 encoded credential - "env-b64:<environment-variable-that-contains-base64-encoded-credential>"
# 5. Credential in base64 encoded form                                        - "b64:<base64-encoded-credential>"
basic_auth_username="${BASIC_AUTH_USERNAME}"
basic_auth_password="${BASIC_AUTH_PASSWORD}"

[Aerospike]
db_host="${AS_HOST}"
db_port=${AS_PORT}

# TLS certificates.
# Supports below formats,
# 1. Certificate file path                                      - "file:<file-path>"
# 2. Environment variable containing base64 encoded certificate - "env-b64:<environment-variable-that-contains-base64-encoded-certificate>"
# 3. Base64 encoded certificate                                 - "b64:<base64-encoded-certificate>"
# Applicable to 'root_ca', 'cert_file' and 'key_file' configurations.

# root certificate file
root_ca="${AS_ROOT_CA}"

# certificate file
cert_file="${AS_CERT_FILE}"

# key file
key_file="${AS_KEY_FILE}"

# Passphrase for encrypted key_file. Supports below formats,
# 1. Passphrase directly                                                      - "<passphrase>"
# 2. Passphrase via file                                                      - "file:<file-that-contains-passphrase>"
# 3. Passphrase via environment variable                                      - "env:<environment-variable-that-holds-passphrase>"
# 4. Passphrase via environment variable containing base64 encoded passphrase - "env-b64:<environment-variable-that-contains-base64-encoded-passphrase>"
# 5. Passphrase in base64 encoded form                                        - "b64:<base64-encoded-passphrase>"
key_file_passphrase="${AS_KEY_FILE_PASSPHRASE}"

# node TLS name for authentication
node_tls_name="${AS_NODE_TLS_NAME}"

# Aerospike cluster security credentials.
# Supports below formats,
# 1. Credential directly                                                      - "<credential>"
# 2. Credential via file                                                      - "file:<file-that-contains-credential>"
# 3. Credential via environment variable                                      - "env:<environment-variable-that-contains-credential>"
# 4. Credential via environment variable containing base64 encoded credential - "env-b64:<environment-variable-that-contains-base64-encoded-credential>"
# 5. Credential in base64 encoded form                                        - "b64:<base64-encoded-credential>"
# Applicable to 'user' and 'password' configurations.

# database user
user="${AS_AUTH_USER}"

# database password
password="${AS_AUTH_PASSWORD}"

# authentication mode: internal (for server), external (LDAP, etc.)
auth_mode="${AS_AUTH_MODE}"

# timeout for sending commands to the server node in seconds
timeout=${TICKER_TIMEOUT}

# Number of histogram buckets to export for latency metrics. Bucket thresholds range from 2^0 to 2^16 (17 buckets).
# e.g. latency_buckets_count=5 will export first five buckets i.e. <=1ms, <=2ms, <=4ms, <=8ms and <=16ms.
# Default: 0 (export all threshold buckets).
latency_buckets_count=${LATENCY_BUCKETS_COUNT}

# Metrics Allowlist - If specified, only these metrics will be scraped. An empty list will exclude all metrics.
# Commenting out the below allowlist configs will disable metrics filtering (i.e. all metrics will be scraped).

# Namespace metrics allowlist
# namespace_metrics_allowlist=[${NAMESPACE_METRICS_ALLOWLIST}]

# Set metrics allowlist
# set_metrics_allowlist=[${SET_METRICS_ALLOWLIST}]

# Node metrics allowlist
# node_metrics_allowlist=[${NODE_METRICS_ALLOWLIST}]

# XDR metrics allowlist (only for Aerospike versions 5.0 and above)
# xdr_metrics_allowlist=[${XDR_METRICS_ALLOWLIST}]

# Job (scans/queries) metrics allowlist
# job_metrics_allowlist = [${JOB_METRICS_ALLOWLIST}]

# Secondary index metrics allowlist
# sindex_metrics_allowlist = [${SINDEX_METRICS_ALLOWLIST}]

# Metrics Blocklist - If specified, these metrics will be NOT be scraped.

# Namespace metrics blocklist
# namespace_metrics_blocklist=[${NAMESPACE_METRICS_BLOCKLIST}]

# Set metrics blocklist
# set_metrics_blocklist=[${SET_METRICS_BLOCKLIST}]

# Node metrics blocklist
# node_metrics_blocklist=[${NODE_METRICS_BLOCKLIST}]

# XDR metrics blocklist (only for Aerospike versions 5.0 and above)
# xdr_metrics_blocklist=[${XDR_METRICS_BLOCKLIST}]

# Job (scans/queries) metrics blocklist
# job_metrics_blocklist = [${JOB_METRICS_BLOCKLIST}]

# Secondary index metrics blocklist
# sindex_metrics_blocklist = [${SINDEX_METRICS_BLOCKLIST}]

# Users Statistics (user statistics are available in Aerospike 5.6+)
# Users Allowlist and Blocklist to control for which users their statistics should be collected.
# Note globbing patterns are not supported for this configuration.

# user_metrics_users_allowlist=[${USER_METRICS_USERS_ALLOWLIST}]
# user_metrics_users_blocklist=[${USER_METRICS_USERS_BLOCKLIST}]
Apply own configuration file

Use --config option to specify configuration file path as accessible inside the container.

docker run -itd --name exporter1 -v <PATH_TO_EXPORTER_CONFIG_FILE_ON_HOST>:<PATH_TO_EXPORTER_CONFIG_FILE_IN_CONTAINER> aerospike/aerospike-prometheus-exporter:latest --config <PATH_TO_EXPORTER_CONFIG_FILE_IN_CONTAINER>

Docker Pull Command

docker pull aerospike/aerospike-prometheus-exporter