Skip to content

Commit 7a0573e

Browse files
author
alexander popov
committed
fix: change catalog to dir
1 parent 4763353 commit 7a0573e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mamonsu/plugins/system/linux/pg_probackup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def run(self, zbx):
5656
dir_size = self.dir_size(_dir)
5757
if self.os_walk_error:
5858
self.log.error(
59-
"Error in count size backup catalog: {backup_catalog}. Error: {error}".format(
59+
"Error in count size pg_probackup dir: {backup_catalog}. Error: {error}".format(
6060
backup_catalog=_dir, error=str(self.os_walk_error)))
6161
else:
6262
zbx.send(self.key_dir_size.format('[' + _dir + ']'), dir_size)
@@ -83,7 +83,7 @@ def run(self, zbx):
8383
for backup in instance.get('backups', []):
8484
status = backup['status']
8585
if status in ['ERROR', 'CORRUPT', 'ORPHAN']:
86-
error = 'Backup with id: {backup_id} in instance: {instance_name} in backup catalog: ' \
86+
error = 'Backup with id: {backup_id} in instance: {instance_name} in pg_probackup dir: ' \
8787
'{backup_catalog} has status: {status}.'.format(backup_id=backup['id'],
8888
instance_name=instance['instance'],
8989
status=status, backup_catalog=_dir)
@@ -117,12 +117,12 @@ def discovery_rules(self, template):
117117
]
118118
items = [
119119
{'key': self.right_type(self.key_dir_size, var_discovery="{#BACKUPDIR},"),
120-
'name': 'Pg_probackup catalog {#BACKUPDIR}: size',
120+
'name': 'Pg_probackup dir {#BACKUPDIR}: size',
121121
'units': Plugin.UNITS.bytes,
122122
'value_type': Plugin.VALUE_TYPE.numeric_unsigned,
123123
'delay': self.plugin_config('interval')},
124124
{'key': self.right_type(self.key_dir_error, var_discovery="{#BACKUPDIR},"),
125-
'name': 'Pg_probackup catalog {#BACKUPDIR}: error',
125+
'name': 'Pg_probackup dir {#BACKUPDIR}: error',
126126
'value_type': Plugin.VALUE_TYPE.text,
127127
'delay': self.plugin_config('interval')},
128128
]
@@ -136,7 +136,7 @@ def discovery_rules(self, template):
136136
},
137137
]
138138
triggers = [{
139-
'name': 'Error in backup dir '
139+
'name': 'Error in pg_probackup dir '
140140
'{#BACKUPDIR} (hostname={HOSTNAME} value={ITEM.LASTVALUE})',
141141
'expression': '{#TEMPLATE:pg_probackup.dir.error[{#BACKUPDIR}].str(ok)}<>1'}
142142
]

0 commit comments

Comments
 (0)