2018/monitoring/graphite/conf/rewrite-rules.conf

37 lines
981 B
Plaintext

# This file defines regular expression patterns that can be used to
# rewrite metric names in a search & replace fashion. It consists of two
# sections, [pre] and [post]. The rules in the pre section are applied to
# metric names as soon as they are received. The post rules are applied
# after aggregation has taken place.
#
# The general form of each rule is as follows:
#
# regex-pattern = replacement-text
#
# For example:
#
# [post]
# _sum$ =
# _avg$ =
#
# These rules would strip off a suffix of _sum or _avg from any metric names
# after aggregation.
[pre]
\) = _
\( = _
# temperature-Temp_1_system_internal_expansion_board_16_5_/value.wsp
temperature-Temp_([0-9]+)_([a-zA-Z0-9_]+)__(.*)\. = Temp-\1_\2.
# nest under common port
if_errors-(.*).(rx|tx)$ = \1.errors.\2
if_octets-(.*).(rx|tx)$ = \1.octets.\2
# expand cisco naming
Vl([0-9]+) = Vlan\1
# rename tplink ports
port_([0-9]+)__Gigabit_(Fiber|Copper) = Gi\1
# rename tplink vlans
Vlan-interface([0-9]+) = Vlan\1