Werk #16581: Automatic creation of labels based on OS information from the agent
| Component | Checks & agents | ||||
| Title | Automatic creation of labels based on OS information from the agent | ||||
| Date | Mar 8, 2024 | ||||
| Level | Trivial Change | ||||
| Class | New Feature | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
Checkmk automatically creates host labels based on OS data sent by the agents on check_mk section.
cmk/os_type: Value taken fromOSTypeline. No label created if line is not present.cmk/os_platform: Value is taken fromOSPlatformline. If line is not present, AgentOS value is used insteadcmk/os_name: Value taken fromOSNameline. No label created if line is not present.cmk/os_version: Value taken fromOSVersionline. No label created if line is not present.
The following list shows an example of the information that agents send for the labels creation. The source is noted in square brackets.
-
AIX
- AgentOS: aix
- OSType: unix
- OSName: AIX
- OSVersion: [oslevel -s]: 7100-05-04-1914
-
FreeBSD
- AgentOS: freebsd
- OSType: unix
- OSName: [/etc/os-release (NAME)]: FreeBSD
- OSVersion: [/etc/os-release (VERSION_ID)]: 13.2
-
HP-UX
- AgentOS: hpux
- OSType: unix
- OSName: HP-UX
- OSVersion: [uname -r | cut -d' ' -f1]: B.11.31
-
Linux
- AgentOS: linux
- OSType: linux
- OSPlatform: [/etc/os-release (ID)]: ubuntu
- OSName: [/etc/os-release (NAME)]: Ubuntu
- OSVersion: [/etc/os-release (VERSION_ID)]: 22.04
-
MacOS
- AgentOS: macosx
- OSType: macos
- OSName: [sw_vers -productName]: macOS
- OSVersion: [sw_vers -productVersion]: 13.0
-
NetBSD
- AgentOS: netbsd
- OSType: unix
- OSName: [uname -s]: NetBSD
- OSVersion: [uname -r]: 9.3
-
OpenBSD
- AgentOS: openbsd
- OSType: unix
- OSName: [uname -s]: OpenBSD
- OSVersion: [uname -r]: 7.4
-
OpenVMS
- AgentOS: openvms
- OSName: OpenVMS
-
OpenWRT
- AgentOS: openwrt
- OSType: linux
- OSName: [/etc/os-release (NAME)]: OpenWRT
- OSVersion: [/etc/os-release (VERSION_ID)]: snapshot
-
Solaris
- AgentOS: solaris
- OSType: unix
- OSName: [/etc/os-release (NAME)]: Oracle Solaris
- OSVersion: [/etc/os-release (VERSION_ID)]: 11.4
-
Windows
- AgentOS: windows
- OSType: windows
- OSName: [wmi]: Microsoft Windows 10 Pro
- OSVersion: [wmi]: 10.0.19045
-
z/OS
- AgentOS: z/OS
- OSType: z/os
- OSName: z/OS