Skip to content

Commit 6d09526

Browse files
author
alexander popov
committed
PGPRO-3463
1 parent c47fa6b commit 6d09526

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

mamonsu/lib/parser.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Export template for native zabbix agent:
4141
Command: export zabbix-template
4242
Examples:
43-
{prog} export zabbix-template <file>
43+
{prog} export zabbix-template [options] <file>
4444
Options:
4545
--template-name <template name>
4646
--plugin-type <plugin_type> (pg,sys,all)
@@ -61,7 +61,7 @@
6161
Export zabbix template with additional plugins included in config file:
6262
Command: export template
6363
Examples:
64-
{prog} export template <file>
64+
{prog} export template [options] <file>
6565
Options:
6666
--add-plugins <directory>
6767
--template-name <template name>

mamonsu/lib/zbx_template.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def discovery_rule(self, rule={},conditions=[], items=[], triggers=[], graphs=[]
245245
result_conditions += '</filter>'
246246
else:
247247
result = '<discovery_rule>{0}{1}{2}{3}</discovery_rule>'
248-
self.discovery_defaults.append(('filter', None))
248+
if ('filter', None) not in self.discovery_defaults:
249+
self.discovery_defaults.append(('filter', None))
249250
return result.format(
250251
self._format_args(self.discovery_defaults, rule),
251252
result_items, result_triggers, result_graphs)

0 commit comments

Comments
 (0)