-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathprometheus.yml
More file actions
22 lines (22 loc) · 853 Bytes
/
prometheus.yml
File metadata and controls
22 lines (22 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
global:
scrape_interval: 1s
scrape_configs:
- job_name: 'modbus'
metrics_path: /modbus
static_configs:
- targets:
# The port must be specified, the standard modbus port is 502
- 127.0.0.1:1502 # Modbus device.
params:
# url parameters, module and sub_target are both required
module: ["fake"]
sub_target: ["1"] # Modbus unit identifier, e.g. when using Modbus TCP as a gateway.
relabel_configs:
# Hit the modbus exporter instead of the actual device
# Use the target address as the target parameter and instance label
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9602 # The modbus exporter's real hostname:port.