F.36. pgxc_monitor

F.36.1. Overview
F.36.2. Options
F.36.3. Options

F.36.1. Overview

pgxc_monitor has the following synopsis.

pgxc_monitor [ option ]

pgxc_monitor is a Postgres-XL utility to test if the target node is running.

The target node is specified by option.

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

If invalid options are specified, it exits with exit code 3.

F.36.2. Options

-Z nodetype

Type of node type to test. Specify gtm as nodetype for gtm and gtm_proxy and node as nodetype for a Coordinator or a Datanode.

-h hostname

Hostname of the test target.

-n nodename

Node name to use when testing the GTM or gtm_proxy. Default value is pgxc_monitor.

-p port_number

Specifies the port number to test target.

-U username

Specifies the database username to connect as.

-d database

Specifies the database name to connect to. Default is "postgres".

-q

Quiet mode. Supress messages as much as possible.

-v

Verbose mode. Prints as many messages as possible.

--help

Show help about pgxc_monitor command line arguments, and exit.

F.36.3. Options

When monitoring a Coordinator or Datanode, -p and -h options can be supplied using .pgpass file. If you use a non-default target database name, and username, as well as password, they must also be supplied using .pgpass file.

If a password is needed, it must also be supplied using .pgpass file too.

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.

The username and database name can be specified via command line options too. If password is needed, it must be supplied via .pgpass file though.

If invalid parameters are given, error message will be printed even if -q is specified.