Skip to content
Prometheus monitoring server
Branch: master
Clone or download
Latest commit 4ae8df1 Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
defaults Add expert vars for prometheus component versions Jun 12, 2018
files Switch to new yml rules. Configure instance_down time May 1, 2018
meta Upgrade role metadata following OME migration Jun 17, 2019
tasks Add expert vars for prometheus component versions Jun 12, 2018
templates Fix rules wildcard file selection May 1, 2018
tests Upgrade role metadata following OME migration Jun 17, 2019
.travis.yml Cap Python to 2.7 Jun 17, 2019
README.md Update Galaxy role link Jun 17, 2019
molecule.yml
playbook.yml Upgrade role metadata following OME migration Jun 17, 2019

README.md

Prometheus

Build Status Ansible Role

Prometheus monitoring server, includes prometheus, alertmanager and blackbox-exporter. This requires docker to be running (not handled by this role).

This role is still in development.

Parameters

  • prometheus_targets: Optional list of dictionaries of targets:

    • group: A list of Ansible groups (optional)
    • hosts: A list of hosts (optional)
    • port: The port to be monitored
    • jobname: The prometheus job-name
    • scrape_interval: Prometheus scrape interval (optional)
    • metrics_path: Path to metrics (optional)
  • prometheus_sd_targets: Optional list of dictionaries of additional targets:

    • groupname: The name of the configuration target file, used to name a configuration file so must be unique
    • group: A list of Ansible groups (optional)
    • hosts: A list of hosts (optional)
    • port: The port to be monitored
    • jobname: The prometheus job-name This is intended to be an example. In practice these configuration files could be dynamically generated outside this role, prometheus will automatically reload them. External ports, set to 0 to disable
  • prometheus_port: External Prometheus port, set to 0 to disable, default 9090

  • prometheus_alertmanager_port: External Alertmanager port, set to 0 to disable, default 9093

  • prometheus_blackboxexporter_port: External Blackbox-exporter port, set to 0 to disable, default 9115

  • prometheus_additional_command_args: Additional command line arguments for prometheus

  • prometheus_alertmanager_additional_command_args: Additional command line arguments for alertmanager

  • prometheus_docker_network: Docker network for prometheus Docker applications, default prometheus

Example playbook

- hosts: localhost
  roles:
  - role: ome.docker
  - role: ome.prometheus

Testing Slack alerts (manual)

Change prometheus_alertmanager_slack_webhook in playbook.yml to a real Slack webhook. Run:

molecule test --destroy never
molecule login
docker stop fake-metrics

Wait a few minutes, a Slack alert should be generated.

If this fails try creating a manual alert:

curl -H "Content-Type: application/json" -d '[{"labels":{"alertname":"TestAlert1"}}]' localhost:9093/api/v1/alerts

Author Information

ome-devel@lists.openmicroscopy.org.uk

You can’t perform that action at this time.