forked from RichiH/modbus_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodbus.yml
45 lines (42 loc) · 1.47 KB
/
modbus.yml
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
modules:
# Module name, needs to be passed as parameter by Prometheus.
- name: "fake"
protocol: 'tcp/ip'
metrics:
# Name of the metric.
- name: "power_consumption_total"
# Help text of the metric.
help: "represents the overall power consumption by phase"
# Labels to be added to the time series.
labels:
phase: "1"
# Register address.
# The first digit of the address is the function code
# Supported codes are: 1, 2, 3, 4
address: 300022
# Datatypes allowed: bool, int16, int32, int64, uint16, uint32, uint64,
# float16, float32, float64
# One register holds 16 bits.
dataType: int16
# Endianness allowed: big, little, mixed, yolo
# Optional. If not defined: big.
endianness: big
# Prometheus metric type: https://prometheus.io/docs/concepts/metric_types/.
metricType: counter
# Factor can be specified to represent metric value.
# Examples: 1, 2, 1.543, 0.01 etc
# Factor is multiplied with the scraped value to produce the metric value
# Optional.
factor: 3.1415926535
- name: "some_gauge"
help: "some help for some gauge"
address: 30023
dataType: int16
metricType: gauge
factor: 2
- name: "coil"
help: "some help for some coil"
address: 124
dataType: bool
bitOffset: 0
metricType: gauge