mirror of https://github.com/Icinga/icinga2.git
parent
c1e13d3dbe
commit
1a5117fe0a
|
@ -204,18 +204,18 @@ INT printOutput(printInfoStruct& printInfo, std::vector<drive>& vDrives)
|
||||||
wsPerf.push_back(L" " + it->name + L"=" + removeZero(it->free) + unit + L";" +
|
wsPerf.push_back(L" " + it->name + L"=" + removeZero(it->free) + unit + L";" +
|
||||||
printInfo.warn.pString(it->cap) + L";" + printInfo.crit.pString(it->cap) + L";0;"
|
printInfo.warn.pString(it->cap) + L";" + printInfo.crit.pString(it->cap) + L";0;"
|
||||||
+ removeZero(it->cap));
|
+ removeZero(it->cap));
|
||||||
}
|
if (printInfo.crit.rend(it->free, it->cap))
|
||||||
|
|
||||||
if (printInfo.warn.rend(tFree, tCap)) {
|
|
||||||
state = WARNING;
|
|
||||||
output = L"DISK WARNING - free space:";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (printInfo.crit.rend(tFree, tCap)) {
|
|
||||||
state = CRITICAL;
|
state = CRITICAL;
|
||||||
output = L"DISK CRITICAL - free space:";
|
if (state == OK && printInfo.warn.rend(it->free, it->cap))
|
||||||
|
state = WARNING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state == WARNING)
|
||||||
|
output = L"DISK WARNING - free space:";
|
||||||
|
|
||||||
|
if (state == CRITICAL)
|
||||||
|
output = L"DISK CRITICAL - free space:";
|
||||||
|
|
||||||
std::wcout << output;
|
std::wcout << output;
|
||||||
if (vDrives.size() > 1)
|
if (vDrives.size() > 1)
|
||||||
std::wcout << "Total " << tFree << unit << " (" << removeZero(std::round(tFree/tCap * 100.0)) << "%); ";
|
std::wcout << "Total " << tFree << unit << " (" << removeZero(std::round(tFree/tCap * 100.0)) << "%); ";
|
||||||
|
|
Loading…
Reference in New Issue