WD_CLI(1)
β¨ NAME β¨
okay so bestie, meet wd_cli π β the Watchdog Command Line Interface (CLI) utility for the external health-check system integration. that's her whole deal, and she slays it. πΆβ¨
πΈ SYNOPSIS πΈ
wd_cli [operation...] [node search option...] [option...]
operation first, then how you wanna hunt down your node, then any extra options you're feeling. iconic order, no notes. π«Ά
π DESCRIPTION π
wd_cli gives you a convenient and easy to use interface to interact with watchdog and to perform health check related node operations. it's giving "I got you, bestie, lemme handle the watchdog stuff." π
π OPERATIONS π
pick your move, main character:
-i,--infoβ get the node status for node(s), based on whatever node search criteria you gave her π-I NEW_STATUS,--inform=NEW_STATUSβ update the watchdog node status. the allowed values are DEAD and ALIVE, and those are the only two, don't try to freestyle it π
π NODE SEARCH OPTIONS π
how do we find the node?? so many ways, pick one:
-a,--allβ select all the nodes. heads up tho: this one is only available with the--infooperation π¨-n WATCHDOG_NODE_ID,--node-id=WATCHDOG_NODE_IDβ select the watchdog node by itsnode_id-N NODE_NAME,--node-name=NODE_NAMEβ select the watchdog node by its name-H HOSTNAME,--node-host=HOSTNAMEβ select the watchdog node by hostname-P PORT_NO,--node-port=PORT_NOβ select the watchdog node by port number
βοΈ OPTIONS βοΈ
the whole menu, bestie, nothing skipped π
-k KEY,--auth-key=KEYβ the watchdog auth key. if you specifyauth-key, it overrides thepgpool.conf->wd_authkeyvalue π-f CONFIG_FILE,--config-file=CONFIG_FILEβ specifies thepgpool.conffile-s SOCKET_DIR,--socket-dir=SOCKET_DIRβ path to the watchdog IPC socket directory. specifyingsocket-diroverrides thepgpool.conf->wd_ipc_socket_dirvalue π§¦-p PORT_NO,--ipc-port=PORT_NOβ port number of the watchdog IPC socket. specifyingipc-portoverrides thepgpool.conf->wd_portvalue-m message_string,--message=message_stringβ an optional message string, passed along to Pgpool-II together with the node status π-v,--verboseβ enable verbose messages, for when you wanna see everything-V,--versionβ prints version information-d,--debugβ enable debug output π-h,--helpβ prints the help forwd_cli
not me reminding you that-p/--ipc-portand-P/--node-portare two completely different queens. lowercase = IPC socket port. uppercase = node search port. do not confuse them, i'm begging π
π§ͺ EXAMPLE π§ͺ
so here's the scenario: some external health-check system is set up to monitor the health of your Pgpool-II cluster, and it detects a node failure. that's when wd_cli steps in β you use this utility to pass that info over to the Pgpool-II cluster so it can take the appropriate actions. teamwork, fr fr π€
#inform Pgpool-II about node named RN-110 failure
wd_cli --inform DEAD -N 'RN-110' -p 9001 -m 'Pgpool node with name RN-110 is not reachable'
#inform Pgpool-II about node-id 10 failure
wd_cli --inform DEAD -n 10 -m 'Pgpool node with ID 10 is not responding'
and similarly, to inform Pgpool-II that the node is alive again π±
#inform Pgpool-II about node-id 10 re-joining
wd_cli --inform ALIVE -n 10 -m 'Pgpool node with ID 10 is reachable again'
wd_cli can also be used to get the current status of cluster nodes π
wd_cli -f simple_conf/watchdog/pgpool_wd1.conf --info -v --all
and she's gonna serve you something like this:
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
and that's the whole page!! π¦ this is WD_CLI(1), part of the pgpool-II 4.7.2 docs, dated 2023 β go forth and watchdog, bestie, you're literally so good at this ππ
β¨
π¦ where this page comes from
- ubuntu stonking: pgpool2 4.7.2-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms