-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprometheus.yml
More file actions
114 lines (113 loc) · 3.85 KB
/
prometheus.yml
File metadata and controls
114 lines (113 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
## Copyright 2023 Red Hat Inc.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
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).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager: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:
# this is the configuration to poll metrics from WildFly 15
- job_name: 'metrics'
metrics_path: /metrics
scrape_interval: 5s
static_configs:
- targets:
# Add hosts to collect JBoss metrics and the appropriate port
- '192.168.100.10:9990'
- '192.168.100.15:9990'
- '192.168.100.20:9990'
relabel_configs:
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.10:(.*)'
replacement: 'jboss01'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.15:(.*)'
replacement: 'jboss02'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.20:(.*)'
replacement: 'jboss03'
target_label: instance
# this is the configuration to poll metrics from the host OS
- job_name: 'host'
metrics_path: /metrics
scrape_interval: 5s
static_configs:
- targets:
# Add hosts to collect OS metrics and the appropriate port
- '192.168.100.10:9100'
- '192.168.100.15:9100'
- '192.168.100.20:9100'
- '192.168.100.60:9100'
- '192.168.100.70:9100'
relabel_configs:
# Add relabelling if desired (Can be used to convert IP addresses to human-readable names)
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.10:(.*)'
replacement: 'jboss01'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.15:(.*)'
replacement: 'jboss02'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.20:(.*)'
replacement: 'jboss03'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.60:(.*)'
replacement: 'lb01'
target_label: instance
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.70:(.*)'
replacement: 'pg01'
target_label: instance
- job_name: 'haproxy'
metrics_path: /metrics
scrape_interval: 5s
static_configs:
- targets:
# Add hosts for HAProxy Metrics
- '192.168.100.60:8004'
relabel_configs:
# Add relabelling if desired (Can be used to convert IP addresses to human-readable names)
- source_labels: [__address__]
separator: ':'
regex: '192\.168\.100\.60:(.*)'
replacement: 'lb01'
target_label: instance
# The job name is added as a label `job=` to any timeseries scraped from this config.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']