Getting started Prometheus tutorial

This commit is contained in:
Kris Lamoureux 2020-03-21 02:38:35 -04:00
parent b2c6a71519
commit 94749f1b06
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,10 @@
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']

View File

@ -1,8 +1,15 @@
- name: Install Prometheus configuration
template:
src: prometheus-config.yml
dest: /home/{{ docker_user }}/prometheus.yml
- name: Start Prometheus container - name: Start Prometheus container
docker_container: docker_container:
name: "{{ prom_name }}" name: "{{ prom_name }}"
image: prom/prometheus:{{ prom_version }} image: prom/prometheus:{{ prom_version }}
state: started state: started
restart_policy: always restart_policy: always
volumes:
- /home/{{ docker_user }}/prometheus.yml:/etc/prometheus/prometheus.yml
ports: ports:
- "80:9090" - "80:9090"