Prometheus Grok Exporter

Channel Revision Published Runs on
latest/stable 15 01 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/stable 12 03 May 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/stable 8 31 Aug 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/stable 4 13 Oct 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 15 12 Oct 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 12 03 May 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 8 19 Aug 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 4 11 Oct 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge 15 12 Oct 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge 13 14 Aug 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge 8 03 Aug 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
juju deploy prometheus-grok-exporter
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04

Getting Started

Deploy as a subordinate charm of an existing charm.

    juju deploy ubuntu --series focal
    juju deploy prometheus2 prometheus --series focal
    juju deploy prometheus-grok-exporter --series focal
    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

Configuration

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:

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

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 data source 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.


Help improve this document in the forum (guidelines). Last updated 1 year, 3 months ago.