Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ff6fddb

Browse files
author
Liudmila Mantrova
committed
Doc update for mamonsu - added command-line options
1 parent fb77208 commit ff6fddb

File tree

1 file changed

+216
-26
lines changed

1 file changed

+216
-26
lines changed

doc/src/sgml/mamonsu.sgml

Lines changed: 216 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,33 @@
1313

1414
<refnamediv>
1515
<refname>mamonsu</refname>
16-
<refpurpose> a monitoring agent for collecting <productname>PostgreSQL</productname> and system metrics.</refpurpose>
16+
<refpurpose> a monitoring agent for collecting <productname>&productname;</productname> and system metrics.</refpurpose>
1717
</refnamediv>
1818

19+
<refsynopsisdiv>
20+
<cmdsynopsis>
21+
<command>mamonsu</command>
22+
<arg choice="req"> <option>report</option> | <option>tune</option> </arg>
23+
</cmdsynopsis>
24+
<cmdsynopsis>
25+
<command>mamonsu</command>
26+
<arg choice="plain">agent</arg>
27+
<arg choice="plain"><replaceable>agent-action</replaceable></arg>
28+
</cmdsynopsis>
29+
<cmdsynopsis>
30+
<command>mamonsu</command>
31+
<arg choice="plain">zabbix</arg>
32+
<arg choice="req"><option>template</option> | <option>host</option> | <option>hostgroup</option></arg>
33+
<arg choice="plain"><replaceable>zabbix-action</replaceable></arg>
34+
</cmdsynopsis>
35+
</refsynopsisdiv>
36+
1937
<refsect1><title>Description</title>
2038
<para>
2139
<filename>mamonsu</filename> is an active monitoring agent for
2240
<productname>&productname;</productname>. Based on <filename>zabbix</filename>,
2341
<filename>mamonsu</filename> provides an extensible cross-platform
24-
solution that can collect and visualize multiple <productname>PostgreSQL</productname> and
42+
solution that can collect and visualize multiple <productname>&productname;</productname> and
2543
system metrics.
2644
</para>
2745
<para>
@@ -37,21 +55,20 @@
3755
<listitem>
3856
<para>
3957
Plugins that specify which metrics to collect, and how to
40-
visualize the collected data. To ensure a stable connection to
41-
the monitored system, <filename>mamonsu</filename> plugins use a
42-
<productname>PostgreSQL</productname> connection pooler.
58+
visualize the collected data.
4359
</para>
4460
</listitem>
4561
</itemizedlist>
4662
<para>
47-
If required, you can add your own custom plugins to monitor specific
63+
To ensure a stable connection to
64+
the monitored system, <filename>mamonsu</filename> plugins use a
65+
<productname>&productname;</productname> connection pooler. If required, you can add your own custom plugins to monitor specific
4866
metrics critical for your system.
4967
</para>
5068
<refsect2 id="installation-and-setup">
5169
<title>Installation and Setup</title>
5270
<para>
53-
To use <filename>mamonsu</filename>, you must have a <filename>zabbix</filename> account and a <filename>zabbix</filename> server set up, and install the
54-
<filename>zabbix</filename> agent on the system you are going to monitor.</para>
71+
To use <filename>mamonsu</filename>, you must have a <filename>zabbix</filename> account and a <filename>zabbix</filename> server set up.</para>
5572
<para>A pre-built <filename>mamonsu</filename> package is provided together with
5673
<productname>&productname;</productname>, but has a
5774
separate installer. Once you have installed both <productname>&productname;</productname> and <filename>mamonsu</filename>, complete the following
@@ -67,7 +84,7 @@
6784
<listitem>
6885
<para>
6986
Bootstrap <filename>mamonsu</filename>. You must specify the IP
70-
address of the host you are going to monitor and the first database to connect to, as well as provide the username and password of the <productname>PostgreSQL</productname> user for <filename>mamonsu</filename> to connect as. You can omit the <literal>-W</literal> option if the password is not required.
87+
address of the host you are going to monitor and the first database to connect to, as well as provide the username and password of the <productname>&productname;</productname> user for <filename>mamonsu</filename> to connect as. You can omit the <literal>-W</literal> option if the password is not required.
7188
</para>
7289
<programlisting>
7390
mamonsu bootstrap --host <replaceable>host_ip</replaceable> --dbname <replaceable>database_name</replaceable> --username <replaceable>username</replaceable> -W <replaceable>password</replaceable>
@@ -81,9 +98,7 @@ mamonsu bootstrap --host <replaceable>host_ip</replaceable> --dbname <replaceabl
8198
</listitem>
8299
<listitem>
83100
<para>
84-
If you are going to use <filename>zabbix</filename> from the
85-
command line, configure the following environment variables
86-
for your <filename>zabbix</filename> server:
101+
<filename>mamonsu</filename> enables you to control some of the <filename>zabbix</filename> server functionality from the command line. You can create and delete <filename>zabbix</filename> hosts and host groups, as well as create, delete, or import <filename>zabbix</filename> templates. If you are going run <filename>zabbix</filename>-related commands, configure the following environment variables for your <filename>zabbix</filename> server:
87102
</para>
88103
<itemizedlist>
89104
<listitem>
@@ -101,6 +116,11 @@ mamonsu bootstrap --host <replaceable>host_ip</replaceable> --dbname <replaceabl
101116
--url=http://zabbix/ --user=<replaceable>zabbix_login</replaceable> --password=<replaceable>zabbix_password</replaceable>
102117
</programlisting>
103118
</listitem>
119+
<listitem><para>If you do not have a <filename>zabbix</filename> host yet, create a new <filename>zabbix</filename> host group and host to use for metrics collection:</para>
120+
<programlisting>
121+
mamonsu zabbix hostgroup create <replaceable>hostgroup_id</replaceable>
122+
mamonsu zabbix host create <replaceable>host_name</replaceable> <replaceable>hostgroup_id</replaceable> <replaceable>template_id</replaceable> <replaceable>IP_address</replaceable>
123+
</programlisting></listitem>
104124
<listitem>
105125
<para>
106126
Edit the <filename>agent.conf</filename> configuration file
@@ -110,7 +130,7 @@ mamonsu bootstrap --host <replaceable>host_ip</replaceable> --dbname <replaceabl
110130
<listitem>
111131
<para>
112132
Configure <filename>zabbix</filename>-related settings. You must
113-
set <varname>address</varname> to the <filename>zabbix</filename> server address and specify the name of the <filename>zabbix</filename> host that will receive the collected metrics. You can find the hosts available for your account in the <filename>zabbix</filename> web interface under <emphasis role="srong"><guimenu>Configuration</guimenu></emphasis> > <emphasis role="srong"><guimenu>Hosts</guimenu></emphasis>.
133+
set <varname>address</varname> to the <filename>zabbix</filename> server address and specify the name of the <filename>zabbix</filename> host that will receive the collected metrics. You can find the hosts available for your account in the <filename>zabbix</filename> web interface under <emphasis role="strong"><guimenu>Configuration</guimenu></emphasis> > <emphasis role="strong"><guimenu>Hosts</guimenu></emphasis>.
114134
</para>
115135
<programlisting>
116136
[zabbix]
@@ -119,15 +139,10 @@ enabled = <literal>True</literal>
119139
client = <replaceable>zabbix_host_name</replaceable>
120140
address = <replaceable>zabbix_server_ip</replaceable>
121141
</programlisting>
122-
<note><para>If required, you can create a new <filename>zabbix</filename> host
123-
from the command line:
124-
</para>
125-
<programlisting>
126-
mamonsu zabbix host create \<replaceable>host_name</replaceable> \<replaceable>hostgroup_id</replaceable> \<replaceable>template_id</replaceable> \<replaceable>host_ip</replaceable> --url=http://zabbix/ --user=<replaceable>zabbix_login</replaceable> --password=<replaceable>zabbix_password</replaceable>
127-
</programlisting></note></listitem>
142+
</listitem>
128143
<listitem>
129144
<para>
130-
Specify the <productname>PostgreSQL</productname> user and the database to connect to. In
145+
Specify the <productname>&productname;</productname> user and the database to connect to. In
131146
the example below, we connect to a <literal>postgres</literal>
132147
database as a <literal>postgres</literal> user. If the
133148
password is not required, set the <literal>password</literal>
@@ -156,7 +171,7 @@ query_timeout = 10
156171
<listitem>
157172
<para>
158173
By default, <filename>mamonsu</filename> will collect both
159-
<productname>PostgreSQL</productname> and system metrics. If required, you can disable
174+
<productname>&productname;</productname> and system metrics. If required, you can disable
160175
metrics collection of either type by setting the
161176
<literal>enabled</literal> parameter to
162177
<literal>False</literal> in the corresponding section of the
@@ -168,7 +183,7 @@ query_timeout = 10
168183
enabled = True
169184
</programlisting>
170185
</listitem></itemizedlist>
171-
</listitem>
186+
</listitem>
172187
<listitem>
173188
<para>
174189
Export a template for <filename>zabbix</filename>:
@@ -209,6 +224,181 @@ service mamonsu start
209224
configuration file and starts monitoring your system.
210225
</para>
211226
</refsect2>
227+
</refsect1>
228+
<refsect1><title>Options</title>
229+
<para><filename>mamonsu</filename> enables you to manage metrics collection and control some of the <filename>zabbix</filename> options from the command line. The <command>mamonsu</command> can take the following options.</para>
230+
231+
<variablelist>
232+
233+
<varlistentry>
234+
<term><option>report</option></term>
235+
<listitem>
236+
<para>Display detailed information about the used hardware and <productname>&productname;</productname> settings.
237+
</para>
238+
</listitem>
239+
</varlistentry>
240+
241+
<varlistentry>
242+
<term><option>tune</option></term>
243+
<listitem>
244+
<para>Optimize system configuration based on the collected information about the used hardware and <productname>&productname;</productname> settings.
245+
</para>
246+
</listitem>
247+
</varlistentry>
248+
249+
<varlistentry>
250+
<term><option>agent</option></term>
251+
<listitem>
252+
<para><filename>mamonsu</filename> <command>agent</command> command provides access to the available metrics from the command line. You can specify one of the following options:
253+
</para>
254+
<variablelist>
255+
256+
<varlistentry>
257+
<term><option>version</option></term>
258+
<listitem>
259+
<para>Display <filename>mamonsu</filename> version.
260+
</para>
261+
</listitem>
262+
</varlistentry>
263+
264+
<varlistentry>
265+
<term><option>metric-list</option></term>
266+
<listitem>
267+
<para>Show the list of available metrics.
268+
</para>
269+
</listitem>
270+
</varlistentry>
271+
272+
<varlistentry>
273+
<term><option>metric-get <replaceable>metric_name</replaceable></option></term>
274+
<listitem>
275+
<para>Specify the metric to monitor. You can get the list of available metrics using the <option>metric-list</option> option.
276+
</para>
277+
</listitem>
278+
</varlistentry>
279+
280+
</variablelist>
281+
</listitem>
282+
</varlistentry>
283+
284+
<varlistentry>
285+
<term><option>zabbix template</option></term>
286+
<listitem>
287+
<para>Manage the <filename>zabbix</filename> template using one of the options described in <xref linkend="mamonsu-zabbix-options">.
288+
</para>
289+
</listitem>
290+
</varlistentry>
291+
292+
<varlistentry>
293+
<term><option>zabbix host</option></term>
294+
<listitem>
295+
<para>Manage the <filename>zabbix</filename> host using one of the options described in <xref linkend="mamonsu-zabbix-options">.
296+
</para>
297+
</listitem>
298+
</varlistentry>
299+
300+
<varlistentry>
301+
<term><option>zabbix hostgroup</option></term>
302+
<listitem>
303+
<para>Manage the <filename>zabbix</filename> host group using one of the options described in <xref linkend="mamonsu-zabbix-options">.
304+
</para>
305+
</listitem>
306+
</varlistentry>
307+
308+
</variablelist>
309+
310+
<refsect2 id="mamonsu-zabbix-options"><title>zabbix Options</title>
311+
<para>Using <filename>mamonsu</filename> you can control some of the <filename>zabbix</filename> server functionality from the command line. Specifically, you can create or delete <filename>zabbix</filename> hosts and host groups, as well as generate, import, and delete <filename>zabbix</filename> templates using one of the following commands. The <replaceable>object_name</replaceable> to use must correspond to the type of the <filename>zabbix</filename> object specified in the command: template, host, or hostgroup.</para>
312+
<variablelist>
313+
<varlistentry>
314+
<term><option>list</option></term>
315+
<listitem>
316+
<para>Display the list of available templates, hosts, or host groups.
317+
</para>
318+
</listitem>
319+
</varlistentry>
320+
321+
<varlistentry>
322+
<term><option>show</option> <replaceable>object_name</replaceable></term>
323+
<listitem>
324+
<para>Display the details about the specified template, host, or host group.
325+
</para>
326+
</listitem>
327+
</varlistentry>
328+
329+
<varlistentry>
330+
<term><option>id</option> <replaceable>object_name</replaceable></term>
331+
<listitem>
332+
<para>Show ID of the specified object.
333+
</para>
334+
</listitem>
335+
</varlistentry>
336+
337+
<varlistentry>
338+
<term><option>delete</option> <replaceable>object_id</replaceable></term>
339+
<listitem>
340+
<para>Delete the specified object.
341+
</para>
342+
</listitem>
343+
</varlistentry>
344+
345+
<varlistentry>
346+
<term><option>create</option> <replaceable>hostgroup_name</replaceable></term>
347+
<term><option>create</option> <replaceable>host_name</replaceable> <replaceable>hostgroup_id</replaceable>
348+
<replaceable>template_id</replaceable> <replaceable>ip_address</replaceable></term>
349+
<listitem>
350+
<para>Create a new host or a host group.
351+
</para>
352+
</listitem>
353+
</varlistentry>
354+
355+
<varlistentry>
356+
<term><option>export</option> <replaceable>tempalate_name</replaceable></term>
357+
<listitem>
358+
<para>Generate a <filename>zabbix</filename> template.
359+
</para>
360+
</listitem>
361+
</varlistentry>
362+
363+
<varlistentry>
364+
<term><option>info</option></term>
365+
<listitem>
366+
<para>Display detailed information about the specified host using one of the following options:
367+
</para>
368+
<variablelist>
369+
370+
<varlistentry>
371+
<term><option>templates</option> <replaceable>host_id</replaceable></term>
372+
<listitem>
373+
<para>Display the list of templates available for the specified host.
374+
</para>
375+
</listitem>
376+
</varlistentry>
377+
378+
<varlistentry>
379+
<term><option>hostgroups</option> <replaceable>host_id</replaceable></term>
380+
<listitem>
381+
<para>Display the host group to which the specified host belongs.
382+
</para>
383+
</listitem>
384+
</varlistentry>
385+
386+
<varlistentry>
387+
<term><option>graphs</option> <replaceable>host_id</replaceable></term>
388+
<listitem>
389+
<para>Display the graphs available for the specified host.
390+
</para>
391+
</listitem>
392+
</varlistentry>
393+
394+
</variablelist>
395+
</listitem>
396+
</varlistentry>
397+
398+
</variablelist>
399+
</refsect2>
400+
</refsect1>
401+
<refsect1><title>Usage</title>
212402
<refsect2 id="collecting-metrics-data">
213403
<title>Collecting Metrics Data</title>
214404
<para>
@@ -221,14 +411,14 @@ mamonsu agent metric-list
221411
To monitor a specific metric, run:
222412
</para>
223413
<programlisting>
224-
mamonsu agent metric-get <replaceable>key</replaceable>
414+
mamonsu agent metric-get <replaceable>metric_name</replaceable>
225415
</programlisting>
226416
<para>
227-
where <replaceable>key</replaceable> is the name of the metric. You can view graphs for the
417+
where <replaceable>metric_name</replaceable> is the name of the metric to monitor. You can view graphs for the
228418
collected metrics in the <filename>zabbix</filename> web interface under the <emphasis role="strong"><guimenu>Graphs</guimenu></emphasis> menu.
229419
</para>
230420
<para>
231-
To create a report about the used hardware and <productname>PostgreSQL</productname>, run:
421+
To create a report about the used hardware and <productname>&productname;</productname> settings, run:
232422
</para>
233423
<programlisting>
234424
mamonsu report
@@ -267,4 +457,4 @@ mamonsu -c agent.conf -e template.xml
267457
</orderedlist>
268458
</refsect2>
269459
</refsect1>
270-
</refentry>
460+
</refentry>

0 commit comments

Comments
 (0)