mon-collector.rst 3.96 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
mon-collector(7) Ganeti | Version @GANETI_VERSION@
==================================================

NAME
----

mon-collector - Command line interface for the data collectors of the
monitoring system

SYNOPSIS
--------

**mon-collector** {collector}

DESCRIPTION
-----------

``mon-collector`` is a suite of tools designed to provide a command line
interface to the data collectors implemented by the ganeti monitoring system.
``mon-collector`` is also the generic binary that must be invoked specifying,
as the first command line parameter, the name of the actual desired data
collector to be run.

When executed, ``mon-collector`` will run the specified collector and will
print its output to stdout, in JSON format.

COLLECTORS
----------

30 31 32 33 34 35 36 37 38 39 40 41 42 43
DISKSTATS
~~~~~~~~~

| diskstats [ [ **-f** | **\--file** ] = *input-file* ]

Collects the information about the status of the disks of the system, as listed
by /proc/diskstats, or by an alternate file with the same syntax specified on
the command line.

The options that can be passed to the DRBD collector are as follows:

-f *input-file*, \--file=*input-file*
  Where to read the data from. Default if not specified: /proc/diskstats

44 45 46
DRBD
~~~~

47 48
| drbd [ [ **-s** | **\--drbd-status** ] = *status-file* ] [ [ **-p** |
  **\--drbd-pairing**] = *pairing-file* ]
49 50 51 52

Collects the information about the version and status of the DRBD kernel
module, and of the disks it is managing.

53 54 55 56 57 58 59 60 61 62 63 64 65
If *status-file* and *pairing-file* are specified, the status and the
instance-minor paring information will be read from those files.
Otherwise, the collector will read them, respectively, from /proc/drbd
and from the Confd server.

The options that can be passed to the DRBD collector are as follows:

-s *status-file*, \--drbd-status=*status-file*
  Read the DRBD status from the specified file instead of /proc/drbd.

-p *pairing-file*, \--drbd-pairing=*pairing-file*
  Read the information about the pairing between instances and DRBD minors
  from the specified file instead of asking the Confd servers for them.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83

INSTANCE STATUS
~~~~~~~~~~~~~~~

| inst-status-xen [ [ **-a** | **\--address** ] = *ip-address* ] [ [ **-p** |
  **\--port** ] = *port-number* ]

Collects the information about the status of the instances of the current node.
In order to perform this task, it needs to connect to the ConfD daemon to fetch
some configuration information. The following parameters allow the user to
specify the position where the daemon is listening, in case it's not the default
one:

-a *ip-address*, \--address=*ip-address*
  The IP address the ConfD daemon is listening on.

-p *port-number*, \--port=*port-number*
  The port the ConfD deamon is listening on.
84 85 86 87

LOGICAL VOLUMES
~~~~~~~~~~~~~~~

88 89
| lv [ [ **-a** | **\--address** ] = *ip-address* ] [ [ **-p** | **\--port** ]
  = *port-number* ] [ [ **-f** | **\--file** ] = *input-file* ]
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
  [ [ **-i** | **\--instances** ] = *instances-file* ]

Collects the information about the logical volumes of the current node.

In order to perform this task, it needs to interact with the ``lvs`` command
line tool and to connect to the ConfD daemon to fetch some configuration
information. The following parameters allow the user to specify the position
where the daemon is listening, in case it's not the default one:

-a *ip-address*, \--address=*ip-address*
  The IP address the ConfD daemon is listening on.

-p *port-number*, \--port=*port-number*
  The port the ConfD deamon is listening on.

Instead of accessing the live data on the cluster, the tool can also read data
serialized on files (mainly for testing purposes). Namely:

-f *input-file*, \--file *input-file*
  The name of the file containing a recorded output of the ``lvs`` tool.

-i *instances-file*, \--instances=*instances-file*
112
  The name of the file containing a JSON serialization of instances the
113 114 115 116
  current node is primary and secondary for, listed as::

    ([Instance], [Instance])

117
  where the first list contains the instances the node is primary for, the
118
  second list those the node is secondary for.