summaryrefslogtreecommitdiff
path: root/doc/src/sgml/pgxcmonitor.sgml
blob: f0091153a9a0bcfeaddf9d5ae33901c0594b344d (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<sect1 id="pgxcmonitor" xreflabel="pgxcmonitor">

<title>pgxc_monitor</title>

 <indexterm zone="pgxcmonitor">
  <primary>pgxc_monitor</primary>
 </indexterm>

 <sect2>
  <title>Overview</title>

    <para>
      pgxc_monitor has the following synopsis.
<programlisting>
pgxc_monitor <optional> <replaceable>option</> </optional>
</programlisting>
    </para>

    <para>
     <application>pgxc_monitor</application> is a <productname>Postgres-XL</> utility to test if
     the target node is running.
    </para>

    <para>
     The target node is specified by option.
    </para>

    <para>
     If the target node is running, it exits with exit code zero.  If not, it
     exits with a non-zero exit code.
    </para>

    <para>
     If invalid options are specified, it exits with exit code 3.
    </para>
 </sect2>

 <sect2>
  <title>Options</title>

  <variablelist>

    <varlistentry>
      <term><option>-Z <replaceable class="parameter">nodetype</replaceable></option></term>
      <listitem>
      <para>
       Type of node type to test. Specify <literal>gtm</> as <replaceable>nodetype</replaceable>
       for gtm and gtm_proxy and <literal>node</> as <replaceable>nodetype</replaceable> for a
       Coordinator or a Datanode.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-h <replaceable class="parameter">hostname</replaceable></></term>
      <listitem>
      <para>
      Hostname of the test target.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-n <replaceable class="parameter">nodename</replaceable></></term>
      <listitem>
      <para>
      Node name to use when testing the GTM or gtm_proxy.  Default value is
      <literal>pgxc_monitor</literal>.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-p <replaceable class="parameter">port_number</replaceable></></term>
      <listitem>
      <para>
       Specifies the port number to test target.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-U <replaceable class="parameter">username</replaceable></></term>
      <listitem>
      <para>
       Specifies the database username to connect as.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-d <replaceable class="parameter">database</replaceable></></term>
      <listitem>
      <para>
       Specifies the database name to connect to. Default is "postgres".
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-q</></term>
      <listitem>
      <para>
       Quiet mode. Supress messages as much as possible.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>-v</></term>
      <listitem>
      <para>
       Verbose mode. Prints as many messages as possible.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><option>--help</></term>
      <listitem>
      <para>
      Show help about <application>pgxc_monitor</application> command line
      arguments, and exit.
      </para>
      </listitem>
    </varlistentry>

  </variablelist>
 </sect2>

 <sect2>
  <title>Options</title>

  <para>
   When monitoring a Coordinator or Datanode, <option>-p</option> and
   <option>-h</option> options can be supplied using <literal>.pgpass</literal>
   file.  If you use a non-default target database name, and username, as well
   as password, they must also be supplied using <option>.pgpass</option> file.
  </para>
  <para>
   If a password is needed, it must also be supplied using
   <option>.pgpass</option> file too.
  </para>
  <para>
   Monitoring Coordinator and Datanode uses the system(3) function.  Therefore,
   you should not use the set-userid bit or set-groupid bit.  Also, because
   this uses psql command, psql must be in your PATH.
  </para>
  <para>
   The username and database name can be specified via command line
   options too. If password is needed, it must be supplied via
   <option>.pgpass</option> file though.
  </para>
  <para>
   If invalid parameters are given, 
   error message will be printed even if <option>-q</option> is specified.
  </para>
 </sect2>

</sect1>