fix: change VersionPG var
@@ -23,7 +23,7 @@ class Plugin(object):
AgentPluginType = 'all'
# PG version
- VersionPG = 10.0
+ VersionPG = {'type': 'PG_V', 'number': '10.0'}
# Macros for run as agent type or as mamonsu
Macros = {"mamonsu": "", "agent": "{$PG_CONNINFO},{$PG_PATH}"}
@@ -171,6 +171,18 @@ class Plugin(object):
def right_type(self, key, var="", var_discovery=""):
if self.Type == "mamonsu":
new_key = key.format('[{0}{1}]'.format(var, var_discovery[:-1]))
+ else:
+ if self.AgentPluginType == 'sys':
+ if var_discovery != "":
+ if var == "":
+ new_key = key.format('{0}[{1}]'.format(var, var_discovery))
+ else:
+ new_key = key.format('.{0}[{1}]'.format(var, var_discovery))
+ else:
+ if var != "":
+ new_key = key.format('.{0}'.format(var))
+ else:
+ new_key = key.format('')
else:
if var == "":
new_key = key.format('{0}[{1}]'.format(var, var_discovery + self.Macros[self.Type]))
