I would like to set up an operating systems check.
For example, define for Debian the stable version is version 10, and that if /etc/debian_version does not return 10.x then there is a warning
The same for Windows.
Is there a way to do this ?
Thanks,
Vincent
PS : i am on Checkmk Raw Edition 1.6.0p16 installed on Debian 10
One idea without a check. Enable the HW/SW inventory plugin on your machines and use these data for an overview over all your systems with the operating system shown.
The agent uses lsb_release to figure that out. On my Ubuntu system it returns No LSB modules are available.
I’d suggest to either follow @andreas-doehler’s suggestion or write a custom check.
Isn’t /etc/os-release the current and portable way to go? I thought so.
Of course you are right. Thank you. Don’t know what I did yesterday .
The plugin from the MKP file does an lsb_release -a and that gives sensible output – just like you suggested.
I finally did my own check and run it with mrpe.cfg
At the moment, it only works with a few versions of Linux (the ones I actually needed)
I published the script on github if it can helps.