]> granicus.if.org Git - icinga2/commitdiff
Add summarized performance data to check_network 7481/head
authorMichael Insel <michael@insel.email>
Fri, 6 Sep 2019 18:36:47 +0000 (20:36 +0200)
committerMichael Insel <michael@insel.email>
Fri, 6 Sep 2019 18:46:32 +0000 (20:46 +0200)
This adds two new performance data values to check_network, 'network_in'
and 'network_out'.

On systems with multiple network interfaces the 'network_in' value holds
the summarized input bytes and the 'network_out' value holds the
summarized output bytes.

plugins/check_network.cpp

index 1cf0f2fa599b2fef70ea86b48ba76587af2a0c77..e21607a09426f2e0081eba262b1ca8380cd2ebba 100644 (file)
@@ -193,6 +193,7 @@ static int printOutput(printInfoStruct& printInfo, const std::vector<nInterface>
 
        std::wcout << " " << tIn + tOut << L"B/s | "
                << L"'network'=" << tIn + tOut << L"B;" << printInfo.warn.pString() << L";" << printInfo.crit.pString() << L";" << L"0; "
+               << L"'network_in'=" << tIn << L"B 'network_out'=" << tOut << L"B "
                << tss.str() << '\n';
 
        return state;