nodes

Description

This command behaves like active_nodes but lists all nodes in a pool, not just nodes that are currently active.

Syntax

nodes [-list] <pool>

nodes <pool>

  • Returns the number of pool nodes.

nodes -list <pool>

  • Returns a list of the pool nodes.

Examples

#!/bin/bash
echo "Active:Total members for $1: `curl -s http://172.18.201.234/pool/<partition>/$1`"
when HTTP_REQUEST {
    set in_path [HTTP::path]
    log local0. "debug request: path $in_path"
    switch -glob $in_path {
        "/pool*" {
            set pool [string map {"/pool" ""} $in_path]
            HTTP::respond 200 content "[active_members $pool]:[nodes $pool]"
        }
    }
}