Table of Contents

last update: 1980-01-01

Module - Prometheus

Prometheus is a well known and widely used monitoring and time-series database, often used in combination with Grafana.

cachegrand provides a module to expose metrics for Prometheus via an HTTP endpoint that can be configured using the config file.


To enable the module is enough to add the protocol configuration to the protocols section in the config file:

    - type: prometheus
        read_ms: 10000
        write_ms: 10000
        - host:
          port: 9090

The module currently doesn't provide any sort of authentication or https support.


The metrics are exposed on the /metrics endpoint.

The available metrics are:

cachegrand_network_total_received_packetsTotal amount of received packetsCounter
cachegrand_network_total_received_dataTotal amount of received data (in bytes)Counter
cachegrand_network_total_sent_packetsTotal amount of sent packetsCounter
cachegrand_network_total_sent_dataTotal amount of sent dataCounter
cachegrand_network_total_accepted_connectionsTotal amount of accepted connectionsCounter
cachegrand_network_total_active_connectionsTotal amount of active connectionsCounter
cachegrand_storage_total_written_dataTotal amount of data written to diskCounter
cachegrand_storage_total_write_iopsTotal amount of write IOPSCounter
cachegrand_storage_total_read_dataTotal amount of read data from diskCounter
cachegrand_storage_total_read_iopsTotal amount of read IOPSCounter
cachegrand_storage_total_open_filesTotal amount of open filesCounter
cachegrand_network_per_minute_received_packetsPer minute amount of received packetsCounter
cachegrand_network_per_minute_received_dataPer minute amount of received data (in bytes)Counter
cachegrand_network_per_minute_sent_packetsPer minute amount of sent packetsCounter
cachegrand_network_per_minute_sent_dataPer minute amount of sent dataCounter
cachegrand_network_per_minute_accepted_connectionsPer minute amount of accepted connectionsCounter
cachegrand_storage_per_minute_written_dataPer minute amount of data written to diskCounter
cachegrand_storage_per_minute_write_iopsPer minute amount of write IOPSCounter
cachegrand_storage_per_minute_read_dataPer minute amount of read data from diskCounter
cachegrand_storage_per_minute_read_iopsPer minute amount of read IOPSCounter
cachegrand_uptimeUptime in secondsCounter

Metrics labels

It is possible to tag the metrics with any amount of arbitrary labels using environment variables.

If one or more environment variables prefixed with CACHEGRAND_METRIC_ENV_ exist then these will be parsed by cachegrand and the suffix will be converted to lowercase and used as name of the label and the value of the environment variable will be used as value.