Skip to content

Prometheus Setup

The flexFS metadata server, proxy server, and mount client expose Prometheus metrics on an HTTP /metrics endpoint. This page covers how to configure Prometheus to scrape these targets.

ServerDefault endpointProtocol
meta.flexfshttps://<meta-addr>/metricsHTTPS (unless --noSSL)
proxy.flexfshttps://<proxy-addr>/metricsHTTPS (unless --noSSL)
mount.flexfshttp://<mount-host>:6075/metricsHTTP

On the metadata and proxy servers the metrics endpoint is served on the same bind address and port as the main server. The mount client is different: it serves metrics only when started with --metrics, on a dedicated port (--metricsPort, default 6075), over plain HTTP.

Add the following jobs to your prometheus.yml:

scrape_configs:
- job_name: "flexfs-meta"
scheme: https
tls_config:
insecure_skip_verify: true
static_configs:
- targets:
- "meta-server-1:8443"
labels:
instance: "meta-server-1"
- job_name: "flexfs-proxy"
scheme: https
tls_config:
insecure_skip_verify: true
static_configs:
- targets:
- "proxy-server-1:9443"
- "proxy-server-2:9443"
labels:
region: "us-east-1"
scrape_configs:
- job_name: "flexfs-meta"
scheme: https
tls_config:
ca_file: /path/to/ca.pem
static_configs:
- targets:
- "meta-server-1:8443"

If the servers are running with --noSSL:

scrape_configs:
- job_name: "flexfs-meta"
scheme: http
static_configs:
- targets:
- "meta-server-1:8443"

The port matches the server’s --bindAddr. The examples use the installer defaults, 8443 for the metadata server and 9443 for proxy servers; a server started without --bindAddr listens on 443. --noSSL disables TLS but does not change the port.

The mount client serves metrics over plain HTTP on --metricsPort (default 6075) on all interfaces, and only when started with --metrics. Give each mount on a host its own --metricsPort: a mount whose port is already in use serves no metrics and keeps retrying until the port is free, logging address already in use; retrying. Because mounts are per-host and may come and go, prefer file-based or node-level service discovery over a static target list where practical:

- job_name: "flexfs-mount"
scheme: http
file_sd_configs:
- files:
- /etc/prometheus/flexfs-mounts/*.yml

For a fixed set of mount hosts, a static list also works:

- job_name: "flexfs-mount"
scheme: http
static_configs:
- targets:
- "app-host-1:6075"
- "app-host-2:6075"

If flexFS servers are running inside Kubernetes, use kubernetes_sd_configs or a ServiceMonitor (with Prometheus Operator):

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: flexfs-meta
labels:
app: flexfs-meta
spec:
selector:
matchLabels:
app: flexfs-meta
endpoints:
- port: https
scheme: https
tlsConfig:
insecureSkipVerify: true
interval: 15s

To attach labels such as environment or region to every series scraped from a target, set them under labels in static_configs:

scrape_configs:
- job_name: "flexfs-meta"
scheme: https
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ["meta-1:8443"]
labels:
environment: "production"
region: "us-east-1"

A 15-second scrape interval works well for most deployments. For high-throughput environments, you may reduce it to 10 seconds. Avoid intervals shorter than 5 seconds to minimize overhead.

scrape_configs:
- job_name: "flexfs-meta"
scrape_interval: 15s
scrape_timeout: 10s
# ...

Test that metrics are reachable:

Terminal window
# Metadata server
curl -sk https://meta-server-1:8443/metrics | head -20
# Proxy server
curl -sk https://proxy-server-1:9443/metrics | head -20
# Mount client (plain HTTP on the metrics port)
curl -s http://app-host-1:6075/metrics | head -20

You should see lines like:

# HELP flexfs_meta_rpc_ops_total Total RPC operations by method and status.
# TYPE flexfs_meta_rpc_ops_total counter
flexfs_meta_rpc_ops_total{method="Lookup",status="OK",volume_id="abc123"} 42