Llama Charmers Next Prometheus Grok Exporter

juju deploy llama-charmers-next-prometheus-grok-exporter
Show information
You will need Juju 2.9 to be able to run this command. Learn how to upgrade to Juju 2.9.
Channel Version Revision Published Runs on
latest/stable 4 4 19 Mar 2021
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04


20.04 18.04 16.04


Export Prometheus metrics from arbitrary unstructured log data. Read more

Relevant links

Discuss this charm

Share your thoughts on this charm with the community on discourse.

Join the discussion

Juju prometheus-grok-exporter charm

grok_exporter allows to export Prometheus metrics from arbitrary unstructured log data.

This charm can be related to the prometheus2 charm, to nrpe charm and to grafana


Optionally export the CHARM_BUILD_DIR env var or the default /tmp/charm-builds will be used.

To build the charm run:

make build 


Using the default configuration of the charm, prometheus-grok-exporter won't start until the metrics and global paths are set.

  • global_paths is comma separated list of files to monitor. All metrics not specifying an individual path are applied to all log files defined by this option.

  • metrics is a yaml file defining valid metrics for the prometheus-grok-exporter. Refer to the metrics documentation from the grok_exporter git repository.

Example of a valid configuration:

      global-paths: "/var/log/syslog"
      metrics: |
        - type: counter
          name: syslog_msgs_total
          help: Total number of syslog msgs, by program (ie daemon)
          match: '%{SYSLOGBASE}'
            program: '{{.program}}'


Add as subordinate of an existing charm.


    juju deploy cs:ubuntu --series bionic
    juju deploy cs:prometheus2 prometheus --series bionic
    juju deploy cs:prometheus-grok-exporter --series bionic
    juju add-relation ubuntu prometheus-grok-exporter
    juju add-relation prometheus-grok-exporter:prometheus-client prometheus:target
    juju add-relation prometheus:grafana-source grafana:grafana-source
    juju add-relation prometheus-grok-exporter grafana

Grafana Dashboard

The charm will send a default dashboard to Grafana stored in files/grafana-dashboards/grok-exporter-dashboard.json. The dashboard assumes that in Grafana is set a datasource called prometheus - Juju generated source.

If the datasource is called differently in grafana (i.e. prometheus2 - Juju generated source), you will need to provide a new dashboard through Grafana.

Then you can proceed with deleting the old dashboard manually from the Grafana web interface.


Juju should be installed and bootstrapped on the system to run functional tests.

    export MODEL_SETTINGS=<semicolon-separated list of "juju model-config" settings>
    make test

NOTE: If you are behind a proxy, be sure to export a MODEL_SETTINGS variable as described above. Note that you will need to use the juju-http-proxy, juju-https-proxy, juju-no-proxy and similar settings.

Contact Information