const http = require("http");
let saymonHostname = <...>
let path = "/node/api/configuration";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
"hostname": saymonHostname,
"Content-Type": "application/json"
let req = http.request(options, function (res) {
res.on("data", function (chunk) {
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
res.on("error", function (error) {
let data = JSON.stringify({
"retain_expired_stat": false,
"history_update_period": 15000,
"stat_scan_period": 1000,
"event_log_max_bytes": "1 G",
"default_result_timeout": 2000,
"incident_timeout": 60000,
"max_json_length": 100000