Update function check status for other system
This commit is contained in:
parent
56eab66e69
commit
e7cd378a81
|
|
@ -762,6 +762,31 @@ const checkMultipleRequest = async () => {
|
|||
name: "Auto import Disti",
|
||||
group: "Other Systems",
|
||||
},
|
||||
//Test Log System
|
||||
{
|
||||
url: "nc -zv 172.16.7.13 8002",
|
||||
method: "EXEC",
|
||||
headers: {},
|
||||
data: {},
|
||||
name: "ATC to ERP",
|
||||
group: "Test Log System",
|
||||
},
|
||||
{
|
||||
url: "nc -zv 172.16.7.13 5000",
|
||||
method: "EXEC",
|
||||
headers: {},
|
||||
data: {},
|
||||
name: "ATC worked",
|
||||
group: "Test Log System",
|
||||
},
|
||||
{
|
||||
url: "nc -zv 172.16.6.23 7777",
|
||||
method: "EXEC",
|
||||
headers: {},
|
||||
data: {},
|
||||
name: "Read Test Log",
|
||||
group: "Test Log System",
|
||||
},
|
||||
];
|
||||
|
||||
const logicCheck = async (req, response) => {
|
||||
|
|
@ -995,11 +1020,12 @@ const checkMultipleRequest = async () => {
|
|||
});
|
||||
}
|
||||
|
||||
if (req.method === "SSH") {
|
||||
if (req.method === "EXEC") {
|
||||
const stdout = await runExec(req.url);
|
||||
if (stdout !== "") {
|
||||
let responseDataString = JSON.stringify(stdout, null, 2);
|
||||
allResponse += `${req.name}\n${responseDataString}\n\n`;
|
||||
|
||||
if (req.name === "Perthmint") {
|
||||
if (stdout.toString().split("true").length - 1 > 1) {
|
||||
report.push({
|
||||
|
|
@ -1019,6 +1045,17 @@ const checkMultipleRequest = async () => {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(req.group === "Test Log System"){
|
||||
report.push({
|
||||
group: req.group,
|
||||
name: req.name,
|
||||
status: ":check:",
|
||||
code: "good",
|
||||
lengthOrData: stdout,
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log(stdout);
|
||||
let responseDataString = JSON.stringify(stdout, null, 2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue