Skip to content

Commit a10ac2f

Browse files
committed
refactoring: moved application name in replication metric names
1 parent 78f2229 commit a10ac2f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

mamonsu/plugins/pgsql/replication.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,36 +142,36 @@ def discovery_rules(self, template, dashboard=False):
142142
}]
143143
items = [
144144
{"key": self.right_type(self.key_send, var_discovery="{#APPLICATION_NAME},"),
145-
"name": "PostgreSQL Replication: Send Lag - Time elapsed sending recent WAL locally on {#APPLICATION_NAME}",
145+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Send Lag - Time elapsed sending recent WAL locally",
146146
"value_type": Plugin.VALUE_TYPE.numeric_float,
147147
"delay": self.plugin_config("interval"),
148148
"drawtype": 2},
149149
{"key": self.right_type(self.key_receive, var_discovery="{#APPLICATION_NAME},"),
150-
"name": "PostgreSQL Replication: Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that "
151-
"this standby server {#APPLICATION_NAME} has flushed it",
150+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Receive Lag - Time elapsed between receiving recent WAL locally and receiving notification that "
151+
"this standby server has flushed it",
152152
"value_type": Plugin.VALUE_TYPE.numeric_float,
153153
"delay": self.plugin_config("interval"),
154154
"drawtype": 2},
155155
{"key": self.right_type(self.key_write, var_discovery="{#APPLICATION_NAME},"),
156-
"name": "PostgreSQL Replication: Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
157-
"this standby server {#APPLICATION_NAME} has written it",
156+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Write Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
157+
"this standby server has written it",
158158
"value_type": Plugin.VALUE_TYPE.numeric_float,
159159
"delay": self.plugin_config("interval"),
160160
"drawtype": 2},
161161
{"key": self.right_type(self.key_flush, var_discovery="{#APPLICATION_NAME},"),
162-
"name": "PostgreSQL Replication: Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
163-
"this standby server {#APPLICATION_NAME} has written and flushed it",
162+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Flush Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
163+
"this standby server has written and flushed it",
164164
"value_type": Plugin.VALUE_TYPE.numeric_float,
165165
"delay": self.plugin_config("interval"),
166166
"drawtype": 2},
167167
{"key": self.right_type(self.key_replay, var_discovery="{#APPLICATION_NAME},"),
168-
"name": "PostgreSQL Replication: Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
169-
"this standby server {#APPLICATION_NAME} has written, flushed and applied",
168+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Replay Lag - Time elapsed between flushing recent WAL locally and receiving notification that "
169+
"this standby server has written, flushed and applied",
170170
"value_type": Plugin.VALUE_TYPE.numeric_float,
171171
"delay": self.plugin_config("interval"),
172172
"drawtype": 2},
173173
{"key": self.right_type(self.key_total_lag, var_discovery="{#APPLICATION_NAME},"),
174-
"name": "PostgreSQL Replication: Delta of Total Lag for {#APPLICATION_NAME}",
174+
"name": "PostgreSQL Replication: {#APPLICATION_NAME} Delta of Total Lag",
175175
"value_type": Plugin.VALUE_TYPE.numeric_float,
176176
"delay": self.plugin_config("interval"),
177177
"drawtype": 2}

0 commit comments

Comments
 (0)