giuto commited on
Commit
a94143c
·
1 Parent(s): 2f249da

Add Grafana dashboard and Prometheus datasource configurations

Browse files
monitoring/grafana/provisioning/dashboards/dashboard.yml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: 1
2
+
3
+ providers:
4
+ - name: 'Hopcroft Dashboards'
5
+ orgId: 1
6
+ folder: ''
7
+ type: file
8
+ disableDeletion: false
9
+ updateIntervalSeconds: 10
10
+ allowUiUpdates: true
11
+ options:
12
+ path: /var/lib/grafana/dashboards
13
+ foldersFromFilesStructure: true
monitoring/grafana/provisioning/datasources/prometheus.yml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ apiVersion: 1
2
+
3
+ datasources:
4
+ - name: Prometheus
5
+ type: prometheus
6
+ access: proxy
7
+ url: http://prometheus:9090
8
+ isDefault: true
9
+ editable: true
10
+ jsonData:
11
+ httpMethod: POST
12
+ timeInterval: "15s"
monitoring/prometheus/prometheus.yml CHANGED
@@ -1,6 +1,9 @@
1
  global:
2
  scrape_interval: 15s
3
  evaluation_interval: 15s
 
 
 
4
 
5
  rule_files:
6
  - "alert_rules.yml"
@@ -15,3 +18,18 @@ scrape_configs:
15
  - job_name: 'hopcroft-api'
16
  static_configs:
17
  - targets: ['hopcroft-api:8080']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  global:
2
  scrape_interval: 15s
3
  evaluation_interval: 15s
4
+ external_labels:
5
+ monitor: 'hopcroft-monitor'
6
+ environment: 'development'
7
 
8
  rule_files:
9
  - "alert_rules.yml"
 
18
  - job_name: 'hopcroft-api'
19
  static_configs:
20
  - targets: ['hopcroft-api:8080']
21
+ - job_name: 'prometheus'
22
+ static_configs:
23
+ - targets: ['localhost:9090']
24
+
25
+ - job_name: 'hopcroft-api'
26
+ metrics_path: '/metrics'
27
+ static_configs:
28
+ - targets: ['hopcroft-api:8080']
29
+ scrape_interval: 10s
30
+
31
+ - job_name: 'pushgateway'
32
+ honor_labels: true
33
+ static_configs:
34
+ - targets: ['pushgateway:9091']
35
+ scrape_interval: 30s