File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 37
37
--old-zabbix
38
38
HINT: By default, mamonsu exports the template for Zabbix 4.4 or higher.
39
39
To export a template for older Zabbix versions, use the --old-zabbix option.
40
+ """
40
41
42
+ usage_msg_bootstrap = """
41
43
Bootstrap DDL for monitoring:
42
44
Command: bootstrap
43
45
Examples:
48
50
-W <PGPASSWORD>
49
51
-d, --dbname <DBNAME>
50
52
-U, --username <USERNAME>
51
- --host <PGHOST>
52
-
53
+ -h, --host <PGHOST>
54
+ """
55
+
56
+ usage_msg += usage_msg_bootstrap
57
+
58
+ usage_msg += """
53
59
Information about working mamonsu:
54
60
Command: agent
55
61
Examples:
@@ -219,6 +225,9 @@ def print_help(self, **kwargs):
219
225
""" )
220
226
sys .exit (2 )
221
227
228
+ def print_bootstrap_help (self , ** kwargs ):
229
+ print (usage_msg_bootstrap .format (prog = sys .argv [0 ]))
230
+
222
231
def _process_long_opt (self , rargs , values ):
223
232
try :
224
233
OptionParser ._process_long_opt (self , rargs , values )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ def __init__(self):
59
59
bootstrap_group .add_option (
60
60
'-M' , '--mamonsu-username' ,
61
61
dest = 'mamonsu_username' ,
62
- default = self .default_user (),
63
62
help = 'database non-privileged user for mamonsu' )
64
63
parser .add_option_group (group )
65
64
parser .add_option_group (bootstrap_group )
@@ -73,7 +72,7 @@ def __init__(self):
73
72
sys .exit (1 )
74
73
if self .args .mamonsu_username is None :
75
74
sys .stderr .write ("ERROR: Database non-privileged username for mamonsu is not specified\n " )
76
- parser .print_help ()
75
+ parser .print_bootstrap_help ()
77
76
sys .exit (1 )
78
77
79
78
if not self .args .dbname :
You can’t perform that action at this time.
0 commit comments