diff options
Diffstat (limited to 'roles/prometheus')
| -rw-r--r-- | roles/prometheus/README.md | 13 | ||||
| -rw-r--r-- | roles/prometheus/defaults/main.yml | 45 | ||||
| -rw-r--r-- | roles/prometheus/handlers/main.yml | 14 | ||||
| -rw-r--r-- | roles/prometheus/tasks/main.yml | 33 |
4 files changed, 0 insertions, 105 deletions
diff --git a/roles/prometheus/README.md b/roles/prometheus/README.md deleted file mode 100644 index febe029..0000000 --- a/roles/prometheus/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Role "prometheus" - -Installs and configured Prometheus on target servers. - - -## Variables - -- `prometheus_cmdline_options` configures arguments to be added - to the prometheus command line, and changing it will result in - a restart. - -- `prometheus_configuration` is the prometheus configuration, serialized to - YAML by Ansible. If unset, the default Prometheus configuration is used. diff --git a/roles/prometheus/defaults/main.yml b/roles/prometheus/defaults/main.yml deleted file mode 100644 index fbefe91..0000000 --- a/roles/prometheus/defaults/main.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -# Default Prometheus configuration sample -prometheus_configuration: - global: - scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. - # scrape_timeout is set to the global default (10s). - - # Attach these labels to any time series or alerts when communicating with - # external systems (federation, remote storage, Alertmanager). - external_labels: - monitor: 'example' - - # Alertmanager configuration - alerting: - alertmanagers: - - static_configs: - - targets: ['localhost:9093'] - - # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. - rule_files: - # - "first_rules.yml" - # - "second_rules.yml" - - # A scrape configuration containing exactly one endpoint to scrape: - # Here it's Prometheus itself. - scrape_configs: - # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # Override the global default and scrape targets from this job every 5 seconds. - scrape_interval: 5s - scrape_timeout: 5s - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['localhost:9090'] - - - job_name: node - # If prometheus-node-exporter is installed, grab stats about the local - # machine by default. - static_configs: - - targets: ['localhost:9100'] diff --git a/roles/prometheus/handlers/main.yml b/roles/prometheus/handlers/main.yml deleted file mode 100644 index 2031275..0000000 --- a/roles/prometheus/handlers/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- name: Reload the prometheus service - service: - name: prometheus - state: reloaded - tags: - - role::prometheus - -- name: Restart the prometheus service - service: - name: prometheus - state: restarted - tags: - - role::prometheus diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml deleted file mode 100644 index b1bb67a..0000000 --- a/roles/prometheus/tasks/main.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Install prometheus - package: - name: prometheus - state: present - tags: - - role::prometheus - -- name: Configure prometheus command line options - lineinfile: - path: /etc/default/prometheus - regexp: ^ARGS.* - line: ARGS="{{ prometheus_cmdline_options }}" - tags: - - role::prometheus - when: - - prometheus_cmdline_options is defined - notify: - - Restart the prometheus service - -- name: Configure prometheus - copy: - content: | - # Ansible managed - {{ prometheus_configuration | to_nice_yaml }} - dest: /etc/prometheus/prometheus.yml - owner: prometheus - group: prometheus - mode: "0400" - tags: - - role::prometheus - notify: - - Reload the prometheus service |