CheckMK integration: edit ticket subject

I have a similar problem
I change the ticket subject to
title = “#{params[:host]} #{params[:service]} is #{params[:state]}”

if no service-name was given (on host-problems) the service is empty/not set.
maybe this will help you.