Skip to content

Commit d85b734

Browse files
author
alexander popov
committed
docs: change help message for windows system, PGPRO-4107
1 parent d558893 commit d85b734

File tree

2 files changed

+32
-39
lines changed

2 files changed

+32
-39
lines changed

mamonsu/lib/parser.py

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
-a, --add-plugins <directory>
1111
-c, --config <file>
1212
-p, --pid <pid-file>
13-
-d daemonize (this functional do not support in windows)
13+
"""
14+
if platform.LINUX:
15+
usage_msg += """ -d daemonize"""
16+
17+
usage_msg += """
1418
--version output version information, then exit
1519
--help show this help, then exit
1620
@@ -20,34 +24,7 @@
2024
{prog} export config <file>
2125
Options:
2226
--add-plugins <directory>
23-
24-
Export zabbix keys for native zabbix-agent (this functional do not support in windows):
25-
Command: export zabbix-parameters
26-
Examples:
27-
{prog} export zabbix-parameters <file>
28-
Options:
29-
--plugin-type <plugin_type> (pg|sys|all) by default all
30-
--pg-version <pg_version> by default 10
31-
--add-plugins <directory>
32-
--config <file>
33-
HINT: Supported version numbers are 12, 10, 11, 9.6, 9.5
34-
3527
36-
Export template for native zabbix agent (this functional do not support in windows):
37-
Command: export zabbix-template
38-
Examples:
39-
{prog} export zabbix-template [options] <file>
40-
Options:
41-
--template-name <template name> by default PostgresPro-<platform name>
42-
--plugin-type <plugin_type> (pg|sys|all) by default all
43-
--application <application name in template> by default App-PostgresPro-<platform name>
44-
--add-plugins <directory>
45-
--config <file>
46-
--old-zabbix
47-
By default, mamonsu exports the template for Zabbix 4.4 or higher.
48-
To export a template for older Zabbix versions, use the --old-zabbix option.
49-
50-
5128
Export zabbix template with additional plugins included in config file:
5229
Command: export template
5330
Examples:
@@ -61,7 +38,6 @@
6138
HINT: By default, mamonsu exports the template for Zabbix 4.4 or higher.
6239
To export a template for older Zabbix versions, use the --old-zabbix option.
6340
64-
6541
Bootstrap DDL for monitoring:
6642
Command: bootstrap
6743
Examples:
@@ -74,7 +50,6 @@
7450
-U, --username <USERNAME>
7551
--host <PGHOST>
7652
77-
7853
Information about working mamonsu:
7954
Command: agent
8055
Examples:
@@ -84,8 +59,6 @@
8459
Options:
8560
-c, --config <file>
8661
87-
88-
8962
Zabbix API toolbox:
9063
Command: zabbix
9164
Usage:
@@ -115,7 +88,7 @@
11588
--url=http://zabbix/web/face
11689
--user=WebUser
11790
--password=WebPassword
118-
91+
11992
Export metrics to zabbix server
12093
Command: upload
12194
Example:
@@ -130,6 +103,30 @@
130103

131104
if platform.LINUX:
132105
usage_msg += """
106+
Export zabbix keys for native zabbix-agent:
107+
Command: export zabbix-parameters
108+
Examples:
109+
{prog} export zabbix-parameters <file>
110+
Options:
111+
--plugin-type <plugin_type> (pg|sys|all) by default all
112+
--pg-version <pg_version> by default 10
113+
--add-plugins <directory>
114+
--config <file>
115+
HINT: Supported version numbers are 12, 10, 11, 9.6, 9.5
116+
117+
Export template for native zabbix agent:
118+
Command: export zabbix-template
119+
Examples:
120+
{prog} export zabbix-template [options] <file>
121+
Options:
122+
--template-name <template name> by default PostgresPro-<platform name>
123+
--plugin-type <plugin_type> (pg|sys|all) by default all
124+
--application <application name in template> by default App-PostgresPro-<platform name>
125+
--add-plugins <directory>
126+
--config <file>
127+
--old-zabbix
128+
By default, mamonsu exports the template for Zabbix 4.4 or higher.
129+
To export a template for older Zabbix versions, use the --old-zabbix option.
133130
134131
Report about hardware and software:
135132
Command: report
@@ -145,8 +142,6 @@
145142
-r, --print-report
146143
-w, --report-path <path to file>
147144
148-
149-
150145
AutoTune config and system:
151146
Command: tune
152147
Options:
@@ -159,7 +154,6 @@
159154

160155
if platform.WINDOWS:
161156
usage_msg += """
162-
163157
AutoTune config and system:
164158
Command: tune
165159
Options:
@@ -180,7 +174,6 @@ class MissOptsParser(OptionParser):
180174
def print_help(self, **kwargs):
181175
print("""
182176
183-
184177
Export example config with default variables:
185178
Command: export
186179
Examples:

mamonsu/lib/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def quit_handler(_signo=None, _stack_frame=None):
8282
print_total_help()
8383
if commands[1] == 'zabbix-parameters':
8484
if platform.WINDOWS:
85-
print("This functional do not support in windows")
85+
print("Export of zabbix keys for native zabbix-agent is not supported on Windows systems")
8686
sys.exit(10)
8787
# zabbix agent keys generation
8888
Plugin.Type = 'agent' # change plugin type for template generator
@@ -155,7 +155,7 @@ def quit_handler(_signo=None, _stack_frame=None):
155155
sys.exit(2)
156156
elif commands[1] == 'zabbix-template':
157157
if platform.WINDOWS:
158-
print("This functional do not support in windows")
158+
print("Export of template for native zabbix agent is not supported on Windows systems")
159159
sys.exit(10)
160160
Plugin.Type = 'agent' # change plugin type for template generator
161161
if len(commands) == 2:

0 commit comments

Comments
 (0)