ccache exporter for Prometheus
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/ccache_exporter
docker
.dockerignore
.editorconfig
.gitignore
Dockerfile
LICENSE
Makefile
README.rst
collector.go
dashboard.jpg
docker-compose.yml
go.mod
go.sum

README.rst

ccache exporter

A Prometheus exporter that exposes ccache metrics.

Metrics exposed

Counters:

  • ccache_call_total
  • ccache_call_hit_total
  • ccache_called_for_link_total
  • ccache_called_for_preprocessing_total
  • ccache_unsupported_code_directive_total
  • ccache_no_input_file_total
  • ccache_cleanups_performed_total

Gauges:

  • ccache_cache_hit_ratio
  • ccache_cache_size_bytes
  • ccache_cache_size_max_bytes
  • ccache_cached_files

Building

# get the sources
$ git clone https://github.com/virtualtam/ccache_exporter.git

# go >= 1.11: enable module support
$ export GO111MODULE=on

# build ccache_exporter
$ make build

Running with Docker Compose

The provided docker-compose.yml script defines the following monitoring stack:

  • ccache-exporter service bind-mounted on the user's (hint: that's you \o/) $HOME directory;
  • node-exporter service to gather system metrics;
  • prometheus database, preconfigured to scrap exported ccache metrics;
  • grafana dashboard, preconfigured to use prometheus as a data source and display ccache metrics in the corresponding dashboard.

To pull Docker images and start the services:

$ docker-compose pull
$ docker-compose up -d

Once the stack is up, the following services will be exposed:

Then, login to Grafana with the default credentials (admin/admin) and load the ccache dashboard:

dashboard.jpg