Get Object's Stat

GET /node/api/objects/:id/stat

Returns object's agent data (stat).

Permissions: objectPermissions.

Request parameters

Path parameters

Parameter

Type

Description

id

string

required

The ID of an object whose stat should be retrieved.

Response description

...

Examples

Request examples

Bash
NodeJS
Python
Bash
login=<your_login>
password=<your_password>
saymon_hostname=<your_saymon_hostname>
object_id=<your_object_id>
url=https://$saymon_hostname/node/api/objects/$object_id/stat
curl -X GET $url -u $login:$password
NodeJS
const http = require("http");
let login = <your_login>
let password = <your_password>
let saymon_hostname = <your_saymon_hostname>
let object_id = <your_object_id>
let path = "/node/api/objects/" + object_id + "/stat";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
let options = {
"method": "GET",
"hostname": saymon_hostname,
"headers": {
"Authorization": auth
},
"path": path
};
let req = http.request(options, function (res) {
let chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Python
import requests
login = <your_login>
password = <your_password>
saymon_hostname = <your_saymon_hostname>
object_id = <your_object_id>
url = "https://" + saymon_hostname + "/node/api/objects/" + \
object_id + "/stat"
response = requests.request("GET", url, auth=(login, password))
print(response.text)

Response example

{
"entityId": "5e21b85b308c3c66d64e07c8",
"entityType": "obj",
"taskType": "agentWatchdog",
"period": 60000,
"timestamp": 1585040374498,
"agentId": "5e21b85b308c3c66d64e07c8",
"agentVersion": "4.2.69-SNAPSHOT",
"agentBuild": "866cc",
"payload": {
"runtimeName": "OpenJDK Runtime Environment",
"runtimeVersion": "1.8.0_242-8u242-b08-0ubuntu3~16.04-b08",
"totalMemory": 267911168,
"freeMemory": 226294168,
"maxMemory": 1830813696,
"usedHeapMemory": 41617000,
"usedNonHeapMemory": 36068184,
"processCpuLoad": 0.0036666666666666666,
"numberOfThreads": 10,
"snmpTrapsPerSecond": 0,
"statNotificationsPerSecond": 0,
"tasksNumber": 1,
"hostName": "rossinnotw",
"networkInterfaces": {
"IPv6": [
"fe80:0:0:0:24a9:1aff:fecb:3722%veth3c89613",
"fe80:0:0:0:f45b:6dff:fe6e:5497%veth9f402c5",
"fe80:0:0:0:42:ffff:fe77:1b87%docker0",
"fe80:0:0:0:3e4d:25b:3be:d798%enp4s0"
],
"IPv4": [
"172.17.0.1",
"192.168.1.82"
]
}
}
}