List Cluster Members
The members endpoint returns a JSON file with a list of members in the cluster and their settings.
Description | Returns a list of the nodes that are members of a cluster | |
Method | GET /api/v1/clusterconfig/members | |
Response Data | member | |
Authentication Required | yes | |
Return Codes | ||
200 | Request complete | |
400 | Bad authentication | |
500 | Request failed |
http
GET /api/v1/clusterconfig/members
Mac OS or Linux (curl)
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Mac OS or Linux (curl) One-line
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Windows Cmd and curl
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members ^
-H "Authorization: Bearer $TOKEN" ^
-H "Content-Type: application/json"
Windows Powershell and curl
powershell
curl.exe -X GET
-H "Authorization: Bearer $TOKEN"
-H "Content-Type: application/json"
Perl
perl
#!/usr/bin/perl
use HTTP::Request;
use LWP;
my $INGEST_TOKEN = "TOKEN";
my $uri = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members';
my $req = HTTP::Request->new("GET", $uri );
$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");
my $lwp = LWP::UserAgent->new;
my $result = $lwp->request( $req );
print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3
import requests
url = '$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members'
resp = requests.get(url,
headers = {
"Authorization" : "Bearer $TOKEN",
"Content-Type" : "application/json"
}
)
print(resp.text)
Node.js
Example Responsesjavascript
const https = require('https');
let request = https.get('$YOUR_LOGSCALE_URL/api/v1/clusterconfig/members', (res) => {
if (res.statusCode !== 200) {
console.error(`Error from server. Code: ${res.statusCode}`);
res.resume();
return;
}
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('close', () => {
console.log('Response:');
console.log(JSON.parse(data));
});
});
return(undef,undef);
}
Success (HTTP Response Code 200 OK)
json
[
{
"cores": 4,
"diskUsagePercentage": 29,
"displayName": "localhost:8080",
"humioVersion": "1.82.0--build-406818--sha-83da25d64199d5eea099adb7f4224ff3bef8ed5e",
"internalHostUri": "http://localhost:8080",
"isBeingEvicted": false,
"isEphemeral": false,
"lifecycleState": "Running",
"minimumCompatibleHumioVersion": "1.44.0",
"nodeRoleString": "all",
"queryCoordinator": true,
"shouldPollFdr": true,
"targetDiskUsagePercentage": 90,
"totalDiskSpaceBytes": 999995129856,
"uuid": "lictrnKsAZ3zMgsd99YhmM4cyErUK98F",
"vhost": 1
}
]
The returned JSON has the following structure:
Table: Response Structure
Field | Type | Description |
---|---|---|
cores | integer | The number of CPU cores |
diskUsagePercentage | integer | The percentage of diskspace available to LogScale |
displayName | string | The displayed hostname for this node |
humioVersion | string | The LogScale version and build number |
internalHostUri | string | The internal hostname/Uri that identifies this node |
isBeingEvicted | boolean | Indicates if the node is currently being removed from the cluster |
isEphemeral | boolean | Whether the node is ephemeral |
lifecycleState | string | The current status of the node |
minimumCompatibleHumioVersion | integer | The minimum version of LogScale that this release is compatible with |
nodeRoleString | integer | A string denoting the current roles. See Logical Node Roles |
queryCoordinator | boolean | Indicates whether the node is a query coordinator node |
shouldPollFdr | boolean | Indicates whether the node should poll its Falcon Data Replicator feed |
targetDiskUsagePercentage | integer | Indicates the configured target disk usage percentage for this node |
totalDiskSpaceBytes | integer | Shows the current total disk space on this node in bytes |
uuid | string | The Universally unique ID for this node |
vhost | integer | The virtual node ID within the cluster |