Skip to content

Commit

Permalink
Merge branch 'fix-prometheus'
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh committed Mar 4, 2019
2 parents 839925e + eeee46d commit 2faad60
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
21 changes: 14 additions & 7 deletions deploy/aws/provision/files/grafana/dashboards/Host.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"gnetId": 179,
"graphTooltip": 1,
"id": 2,
"iteration": 1550157092295,
"iteration": 1551713243950,
"links": [],
"panels": [
{
Expand Down Expand Up @@ -437,7 +437,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(node_filesystem_size_bytes{job=~\"Qed0-HostMetrics\"})",
"expr": "sum(node_filesystem_size_bytes{job=~\"Qed.*\"})/sum(qed_instances_count)",
"format": "time_series",
"hide": false,
"interval": "2m",
Expand Down Expand Up @@ -542,14 +542,21 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(node_memory_MemTotal_bytes{job=~\"Qed0-HostMetrics\"})",
"expr": "sum(node_memory_MemTotal_bytes{job=~\"Qed.*\"})/sum(qed_instances_count)",
"format": "time_series",
"hide": false,
"interval": "2m",
"intervalFactor": 2,
"legendFormat": "Total",
"legendFormat": "Max-QED",
"refId": "A"
},
{
"expr": "sum(node_memory_MemTotal_bytes{job=~\"Agent.*\"})/(sum(qed_auditor_instances_count)+sum(qed_monitor_instances_count)+sum(qed_publisher_instances_count))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Max-Agent",
"refId": "C"
},
{
"expr": "sum(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) by (job)",
"format": "time_series",
Expand All @@ -564,7 +571,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Node Mermory",
"title": "Node Memory",
"tooltip": {
"shared": true,
"sort": 0,
Expand Down Expand Up @@ -813,5 +820,5 @@
"timezone": "browser",
"title": "Hosts Monitoring",
"uid": "64nrElFmk",
"version": 250
}
"version": 1
}
6 changes: 5 additions & 1 deletion deploy/aws/provision/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
tasks:
- name: Gather facts
setup:
tags:
- prometheus

- hosts: type_aws_instance
remote_user: ec2-user
Expand Down Expand Up @@ -88,6 +90,8 @@
- vars.yml
tasks:
- include: tasks/prometheus/main.yml
tags:
- prometheus

- hosts: role_qed
remote_user: ec2-user
Expand Down Expand Up @@ -161,4 +165,4 @@
- /var/qed/exporter-start.sh
tags:
- start-prometheus

- prometheus
28 changes: 21 additions & 7 deletions deploy/aws/provision/templates/prometheus-config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,47 @@ scrape_configs:
static_configs:
- targets: ['localhost:9090']
{% for host in groups['role_qed'] %}
- job_name: 'Qed{{loop.index}}-HostMetrics'
- job_name: 'Qed{{loop.index}}-Metrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}
{% for host in groups['role_qed'] %}
- job_name: 'Qed{{loop.index}}-QedMetrics'
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:8600']
- job_name: 'Qed{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:8600']
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}
{% for host in groups['role_publisher'] %}
- job_name: 'Agent-Publisher{{loop.index}}-Metrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:18300']
- job_name: 'Agent-Publisher{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}
{% for host in groups['role_monitor'] %}
- job_name: 'Agent-Monitor{{loop.index}}-Metrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:18200']
- job_name: 'Agent-Monitor{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}
{% for host in groups['role_auditor'] %}
- job_name: 'Agent-Auditor{{loop.index}}-Metrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:18100']
- job_name: 'Agent-Auditor{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}
{% for host in groups['role_riot'] %}
- job_name: 'Riot{{loop.index}}-Metrics'
- job_name: 'Riot{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
Expand All @@ -63,4 +73,8 @@ scrape_configs:
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:18888']
- job_name: 'Storage{{loop.index}}-HostMetrics'
scrape_interval: 10s
static_configs:
- targets: ['{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}:9100']
{% endfor %}

0 comments on commit 2faad60

Please sign in to comment.