VHost Information
Important
The /api/v1/globalsubset
endpoint provides direct access to
the data stored in Global Database and
requires full access to the cluster. More efficient aand fine-grained
control over the information in this structure is available through the
GraphQL API provides a better method of access, see
GraphQL API for more information.
The /api/v1/globalsubset/clustervhost
endpoint returns
information about the cluster and current node.
Description | Returns information about the cluster and current node. | |
Method | GET /api/v1/globalsubset/clustervhost | |
Authentication Required | yes | |
Return Codes | ||
200 | Request complete | |
400 | Bad authentication | |
500 | Request failed |
Mac OS or Linux (curl)
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/globalsubset/clustervhost \
-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/globalsubset/clustervhost \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Windows Cmd and curl
shell
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/globalsubset/clustervhost ^
-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/globalsubset/clustervhost';
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/globalsubset/clustervhost'
resp = requests.get(url,
headers = {
"Authorization" : "Bearer $TOKEN",
"Content-Type" : "application/json"
}
)
print(resp.text)
Node.js
javascript
const https = require('https');
let request = https.get('$YOUR_LOGSCALE_URL/api/v1/globalsubset/clustervhost', (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);
}
The call returns a JSON object with a separate record for node in the cluster:
json
{
"85" : {
"entity" : {
"bootedAt" : 1712865017203,
"cores" : 4,
"diskUsagePercentage" : 24,
"displayName" : "cluster-1:8080",
"humioVersion" : "1.133.0--build-1000--sha-eda0b20aa7989fb26e09b9fc1d187b51b1281400",
"internalHostUri" : "https://cluster-1:8080",
"isBeingEvicted" : false,
"isEphemeral" : true,
"lifecycleState" : "Running",
"localStoragePercentage" : 80,
"maxDiskUsagePercentage" : 95,
"minimumCompatibleHumioVersion" : "1.106.0",
"nodeRoleString" : "all",
"queryCoordinator" : true,
"runsIngestFeeds" : true,
"shouldPollFdr" : true,
"targetDiskUsagePercentage" : 90,
"totalDiskSpaceBytes" : 934873640960,
"uuid" : "lQLuVN6a0lCduG6MZjGraKTzBYZywYde",
"vhost" : 85,
"zone" : "us-west-2b"
}
},
"92" : {
"entity" : {
"bootedAt" : 1712865080520,
"cores" : 4,
"diskUsagePercentage" : 22,
"displayName" : "cluster-2:8080",
"humioVersion" : "1.133.0--build-1000--sha-eda0b20aa7989fb26e09b9fc1d187b51b1281400",
"internalHostUri" : "https://cluster-2:8080",
"isBeingEvicted" : false,
"isEphemeral" : true,
"lifecycleState" : "Running",
"maxDiskUsagePercentage" : 95,
"minimumCompatibleHumioVersion" : "1.106.0",
"nodeRoleString" : "all",
"runsIngestFeeds" : true,
"shouldPollFdr" : true,
"totalDiskSpaceBytes" : 934873640960,
"uuid" : "uujy3aHWkFCg92awBs7LTg5SUIOrSOLn",
"vhost" : 92,
"zone" : "us-west-2c"
}
}
}
A description of the individual fields for each node is provided below:
Table: clustervhost JSON Fields
Field | Type | Required? | Default | Description |
---|---|---|---|---|
bootedAt | integer | Timestamp for when the node was booted, expressed as number of seconds since the epoch | ||
cores | integer | Number of CPU cores in the node | ||
diskUsagePercentage | integer | Percentage of disk space used on this node | ||
displayName | string | Host name of the node | ||
humioVersion | string | The version string for the LogScale release on this node | ||
internalHostUrl | string | Internal URL for the node | ||
isBeingEvicted | boolean | Indicates whether the node is currently marked to be evicted from the cluster | ||
isEphemeral | boolean | Node is ephemeral | ||
lifeCycleState | string | Current status of the node | ||
localStoragePercentage | integer | Configured storage percentage (see Retention Deletion Process) | ||
maxDiskUsagePercentage | integer | Configured maximum fill percentage (see Retention Deletion Process) | ||
minimumComputableHumioVersion | string | Minimum compatible humio version required to be compatible with this node | ||
nodeRoleString | string | Configured node role (see Logical Node Roles) | ||
queryCoordinator | string | Indicates whether this node is q uery coordination node (see Query Coordination) | ||
runsIngestFeeds | boolean | Indicates whether the node accepts data during ingest | ||
shouldPollFdr | boolean | Indicates whether the node should poll for FDR data | ||
totalDiskSpaceBytes | integer | Total available disk pace | ||
uuid | string | Unique ID for this node | ||
vhost | string | Unique cnode number for this node | ||
zone | string | Configured zone for this node when deployed in a cloud environment |