'\" t .\" Title: wd_cli .\" Author: The Pgpool Global Development Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2023 .\" Manual: pgpool-II 4.3.5 Documentation .\" Source: pgpool-II 4.3.5 .\" Language: English .\" .TH "WD_CLI" "1" "2023" "pgpool-II 4.3.5" "pgpool-II 4.3.5 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" wd_cli \- Watchdog Command Line Interface (CLI) utility for the external health\-check system integration\&. .SH "SYNOPSIS" .HP \w'\fBwd_cli\fR\ 'u \fBwd_cli\fR [\fIoperation\fR...] [\fInode\ search\ option\fR...] [\fIoption\fR...] .SH "DESCRIPTION" .PP \fBwd_cli\fR Provides a convenient and easy to use interface to interact with watchdog and perform health check related node operations\&. .SH "OPERATIONS" .PP .PP \fB\-i\fR .br \fB\-\-info\fR .RS 4 Get the node status for node(s) based on node search criteria .RE .PP \fB\-I \fR\fB\fINEW_STATUS\fR\fR .br \fB\-\-inform=\fR\fB\fINEW_STATUS\fR\fR .RS 4 Update the watchdog node status\&. Allowed values are DEAD and ALIVE .RE .SH "NODE SEARCH OPTIONS" .PP .PP \fB\-a \fR .br \fB\-\-all\fR .RS 4 Select all nodes (only available with \-\-info operation) .RE .PP \fB\-n \fR\fB\fIWATCHDOG_NODE_ID\fR\fR .br \fB\-\-node\-id=\fR\fB\fIWATCHDOG_NODE_ID\fR\fR .RS 4 Select watchdog node by node_id\&. .RE .PP \fB\-N \fR\fB\fINODE_NAME\fR\fR .br \fB\-\-node\-name=\fR\fB\fINODE_NAME\fR\fR .RS 4 Select watchdog node by name\&. .RE .PP \fB\-H \fR\fB\fIHOSTNAME\fR\fR .br \fB\-\-node\-host=\fR\fB\fIHOSTNAME\fR\fR .RS 4 Select watchdog node by hostname\&. .RE .PP \fB\-P \fR\fB\fIPORT_NO\fR\fR .br \fB\-\-node\-port=\fR\fB\fIPORT_NO\fR\fR .RS 4 Select watchdog node by port number\&. .RE .SH "OPTIONS" .PP .PP \fB\-k \fR\fB\fIKEY\fR\fR .br \fB\-\-auth\-key=\fR\fB\fIKEY\fR\fR .RS 4 Watchdog auth key\&. Specifying auth\-key over rides the pgpool\&.conf\->wd_authkey value\&. .RE .PP \fB\-f \fR\fB\fICONFIG_FILE\fR\fR .br \fB\-\-config\-file=\fR\fB\fICONFIG_FILE\fR\fR .RS 4 Specifies the pgpool\&.conf file\&. .RE .PP \fB\-s \fR\fB\fISOCKET_DIR\fR\fR .br \fB\-\-socket\-dir=\fR\fB\fISOCKET_DIR\fR\fR .RS 4 Path to the watchdog IPC socket directory\&. Specifying socket\-dir over rides the pgpool\&.conf\->wd_ipc_socket_dir value\&. .RE .PP \fB\-p \fR\fB\fIPORT_NO\fR\fR .br \fB\-\-ipc\-port=\fR\fB\fIPORT_NO\fR\fR .RS 4 Port number of watchdog IPC socket\&. Specifying ipc\-port over rides the pgpool\&.conf\->wd_port value\&. .RE .PP \fB\-m \fR\fB\fImessage_string\fR\fR .br \fB\-\-message=\fR\fB\fImessage_string\fR\fR .RS 4 Optional message string to be passed to Pgpool\-II along with the node status\&. .RE .PP \fB\-v\fR .br \fB\-\-verbose\fR .RS 4 Enable verbose messages\&. .RE .PP \fB\-V\fR .br \fB\-\-version\fR .RS 4 Prints version information\&. .RE .PP \fB\-d\fR .br \fB\-\-debug\fR .RS 4 Enable debug output\&. .RE .PP \fB\-h\fR .br \fB\-\-help\fR .RS 4 Prints the help for wd_cli\&. .RE .SH "EXAMPLE" .PP When some external health\-check system is configured to monitor the health of Pgpool\-II cluster and it detects a node failure\&. wd_cli utility can be used to pass this information to Pgpool\-II cluster so that it can take the appropriate actions\&. .sp .if n \{\ .RS 4 .\} .nf #inform Pgpool\-II about node named RN\-110 failure wd_cli \-\-inform DEAD \-N \*(AqRN\-110\*(Aq \-p 9001 \-m \*(AqPgpool node with name RN\-110 is not reachable\*(Aq .fi .if n \{\ .RE .\} .sp .sp .if n \{\ .RS 4 .\} .nf #inform Pgpool\-II about node\-id 10 failure wd_cli \-\-inform DEAD \-n 10 \-m \*(AqPgpool node with ID 10 is not responding\*(Aq .fi .if n \{\ .RE .\} .sp Similarly to inform Pgpool\-II about the node is alive again\&. .sp .if n \{\ .RS 4 .\} .nf #inform Pgpool\-II about node\-id 10 re\-joining wd_cli \-\-inform ALIVE \-n 10 \-m \*(AqPgpool node with ID 10 is reachable again\*(Aq .fi .if n \{\ .RE .\} .sp wd_cli can also be used to get the current status of cluster nodes\&. .sp .if n \{\ .RS 4 .\} .nf wd_cli \-f simple_conf/watchdog/pgpool_wd1\&.conf \-\-info \-v \-\-all Total Watchdog nodes configured for lifecheck: 2 ***************** Node ID: 0 Node Status code 4 Node Status: LEADER Node Name: localhost:9991 Linux localhost\&.localdomain Node Host: localhost Node WD Port: 9001 Node Pgpool Port: 9991 Node ID: 1 Node Status code 7 Node Status: STANDBY Node Name: localhost:9992 Linux localhost\&.localdomain Node Host: localhost Node WD Port: 9002 Node Pgpool Port: 9992 .fi .if n \{\ .RE .\} .sp