Update function check status for other system

This commit is contained in:
joseph le 2023-10-12 08:11:13 +07:00
parent e20aeccc24
commit 2b39c5aa49
1 changed files with 4 additions and 4 deletions

View File

@ -913,7 +913,7 @@ const checkMultipleRequest = async () => {
headers: req.headers, headers: req.headers,
}) })
.then((response) => { .then((response) => {
allResponse += JSON.stringify(req.name + "\n" + response.data, null, 2); allResponse += req.name + "\n" + response.data
console.log(response.data); console.log(response.data);
// Xử lý response ở đây // Xử lý response ở đây
// console.log("Response:", response.data.length); // console.log("Response:", response.data.length);
@ -974,7 +974,7 @@ const checkMultipleRequest = async () => {
headers: req.headers, headers: req.headers,
}) })
.then((response) => { .then((response) => {
allResponse += JSON.stringify(req.name + "\n" + response.data, null, 2); allResponse += req.name + "\n" + response.data
// Xử lý response ở đây // Xử lý response ở đây
// console.log("Response:", response.data.length); // console.log("Response:", response.data.length);
// console.log("Status:", response.status); // console.log("Status:", response.status);
@ -996,7 +996,7 @@ const checkMultipleRequest = async () => {
if (req.method === "SSH") { if (req.method === "SSH") {
const stdout = await runExec(req.url); const stdout = await runExec(req.url);
if (stdout !== "") { if (stdout !== "") {
allResponse += JSON.stringify(req.name + "\n" + stdout, null, 2); allResponse += req.name + "\n" + stdout
if (req.name === "Perthmint") { if (req.name === "Perthmint") {
if (stdout.toString().split("true").length - 1 > 1) { if (stdout.toString().split("true").length - 1 > 1) {
report.push({ report.push({
@ -1018,7 +1018,7 @@ const checkMultipleRequest = async () => {
} }
} else { } else {
console.log(stderr); console.log(stderr);
allResponse += JSON.stringify(req.name + "\n" + stderr, null, 2); allResponse += req.name + "\n" + stderr
report.push({ report.push({
group: req.group, group: req.group,
name: req.name, name: req.name,