|
|
@ -16,6 +16,7 @@ const { CacheableDnsHttpAgent } = require("../cacheable-dns-http-agent");
|
|
|
|
const { DockerHost } = require("../docker");
|
|
|
|
const { DockerHost } = require("../docker");
|
|
|
|
const Maintenance = require("./maintenance");
|
|
|
|
const Maintenance = require("./maintenance");
|
|
|
|
const { UptimeCacheList } = require("../uptime-cache-list");
|
|
|
|
const { UptimeCacheList } = require("../uptime-cache-list");
|
|
|
|
|
|
|
|
const Gamedig = require("gamedig");
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* status:
|
|
|
|
* status:
|
|
|
@ -107,6 +108,7 @@ class Monitor extends BeanModel {
|
|
|
|
grpcEnableTls: this.getGrpcEnableTls(),
|
|
|
|
grpcEnableTls: this.getGrpcEnableTls(),
|
|
|
|
radiusCalledStationId: this.radiusCalledStationId,
|
|
|
|
radiusCalledStationId: this.radiusCalledStationId,
|
|
|
|
radiusCallingStationId: this.radiusCallingStationId,
|
|
|
|
radiusCallingStationId: this.radiusCallingStationId,
|
|
|
|
|
|
|
|
game: this.game,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (includeSensitiveData) {
|
|
|
|
if (includeSensitiveData) {
|
|
|
@ -487,6 +489,20 @@ class Monitor extends BeanModel {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw new Error("Server not found on Steam");
|
|
|
|
throw new Error("Server not found on Steam");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (this.type === "gamedig") {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const state = await Gamedig.query({
|
|
|
|
|
|
|
|
type: this.game,
|
|
|
|
|
|
|
|
host: this.hostname,
|
|
|
|
|
|
|
|
port: this.port
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bean.msg = state.name;
|
|
|
|
|
|
|
|
bean.status = UP;
|
|
|
|
|
|
|
|
bean.ping = state.ping;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
throw new Error("Server is offline");
|
|
|
|
|
|
|
|
}
|
|
|
|
} else if (this.type === "docker") {
|
|
|
|
} else if (this.type === "docker") {
|
|
|
|
log.debug(`[${this.name}] Prepare Options for Axios`);
|
|
|
|
log.debug(`[${this.name}] Prepare Options for Axios`);
|
|
|
|
|
|
|
|
|
|
|
|