Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR: remove nodexporter from storage query #1602

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions launcher/src/backend/Monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,9 @@ export class Monitoring {

// Get storage status of all services
async getStorageStatus(live = false) {
// Define services that should be ignored and NOT queried at all
const ignoreServices = ["PrometheusNodeExporterService"];

// By default return cached data (if available)
if (!live) {
if (
Expand Down Expand Up @@ -1662,6 +1665,9 @@ export class Monitoring {
if (typeof svc !== "object" || !svc.hasOwnProperty("service") || !svc.hasOwnProperty("config")) {
continue;
}
if (ignoreServices.includes(svc.service)) {
continue;
}
if (Array.isArray(svc.config.volumes) && svc.config.volumes.length) {
const strVolumes = '"' + svc.config.volumes.flatMap(({ destinationPath }) => destinationPath).join('" "') + '"';
sshcommands.push({
Expand Down Expand Up @@ -1716,6 +1722,7 @@ export class Monitoring {
let svc = index in sshcommands ? sshcommands[index].svc : false;
if (svc) {
// Prometheus NE does not store data but using "/" as volume, see #1095
// Likely not queried at all if defined in ignoreServices (see above)
if (svc.service === "PrometheusNodeExporterService") {
//val = 0; // Solution A: Show 0 B as value for Prometheus NE
return; // Solution B: Do not show Prometheus NE at all in the storage list
Expand Down
Loading