For one (in my mind pretty standard) use case I cannot find a suitable check plugin: Listing and checking the network interfaces on a Linux agent.
Kind of what you get with ifconfig or ip -s a.
Or IcingaForWindows’ Invoke-IcingaCheckNetworkInterface.
(Operational status, link speed, traffic, packet counts, discards, errors.)
How do you do it?
SNMP checks?
– Sadly not an option in most of our network segments.
Plugins mentioned in the ITL? Something from either Icinga or Nagios exchanges?
– Being pretty old for the most part, they don’t know about docker interfaces, or are still hardcoded for “ethX” in our times of “Predictable Network Interface Names” like enpXsX.
Something from linuxfabrik.ch?
– Maybe I’m too dumb , but I can’t find anything suitable (although for most other cases those guys have awesome plugins).
if you can use SNMP, then check this out: check_nwc_health (check_nwc_health - ConSol Labs)
(= giant perl-script)
I have setup ~1000 different network-hardware checks with this brilliant Schweizer-Taschemesser !
As it turns out, Henning’s proposed check plugin was exactly what I was looking for.
check_linux_netdev…
simply cats the contents of /proc/net/dev on a Linux agent (plus some additional magic),
allows to exclude interfaces you don’t need monitored (like docker0)
and lets you set warn and crit thresholds for each individual metric of your interface, like rx:errs.
The author of the plugin also provides Icinga2 config examples (command, service template etc.).
Though you’re better off using those just as a guideline and instead manually adding object definitions in Director (circumventing potential issues with the Icinga DSL).