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 3737 --old-zabbix
3838HINT: By default, mamonsu exports the template for Zabbix 4.4 or higher.
3939To export a template for older Zabbix versions, use the --old-zabbix option.
40+ """
4041
42+ usage_msg_bootstrap = """
4143Bootstrap DDL for monitoring:
4244Command: bootstrap
4345Examples:
4850 -W <PGPASSWORD>
4951 -d, --dbname <DBNAME>
5052 -U, --username <USERNAME>
51- --host <PGHOST>
52-
53+ -h, --host <PGHOST>
54+ """
55+
56+ usage_msg += usage_msg_bootstrap
57+
58+ usage_msg += """
5359Information about working mamonsu:
5460Command: agent
5561Examples:
@@ -219,6 +225,9 @@ def print_help(self, **kwargs):
219225""" )
220226 sys .exit (2 )
221227
228+ def print_bootstrap_help (self , ** kwargs ):
229+ print (usage_msg_bootstrap .format (prog = sys .argv [0 ]))
230+
222231 def _process_long_opt (self , rargs , values ):
223232 try :
224233 OptionParser ._process_long_opt (self , rargs , values )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ def __init__(self):
5959 bootstrap_group .add_option (
6060 '-M' , '--mamonsu-username' ,
6161 dest = 'mamonsu_username' ,
62- default = self .default_user (),
6362 help = 'database non-privileged user for mamonsu' )
6463 parser .add_option_group (group )
6564 parser .add_option_group (bootstrap_group )
@@ -73,7 +72,7 @@ def __init__(self):
7372 sys .exit (1 )
7473 if self .args .mamonsu_username is None :
7574 sys .stderr .write ("ERROR: Database non-privileged username for mamonsu is not specified\n " )
76- parser .print_help ()
75+ parser .print_bootstrap_help ()
7776 sys .exit (1 )
7877
7978 if not self .args .dbname :
You can’t perform that action at this time.
0 commit comments