Automatic labling of hosts based on specific services

Hi Community,
is it possible to automatically set labels on hosts, if there is a specific service or process on the host?
I would like to use this to distribute custom files to specific hosts.

Thanks in advance!
Holger

Yes, “Process discovery” (in Setup > Services > Service discovery rules) has a corresponding option
“Host Label”:

Here you can set host labels that automatically get created when discovering the services.Labels need to be in the format [KEY]:[VALUE]. For example cmk/os_family:linux.

(text from the inline help)