Hello,
To answer your second question, unfortunately it won't be possible to use the filters to display only the host groups linked to the host.
However, the hostgroup names could be displayed in the ticket description by modifying ‘Body list definition’ and adding the following block inside the block corresponding to the opening of a ticket for a service or host:
{host_get_hostgroups host_id=$host.host_id}
hostgroups:
{foreach from=host_get_hostgroups_result item=hg}
{$hg}
{/foreach}
For example, this could give :
{$user.alias} open ticket at {$smarty.now|date_format:"%d/%m/%y %H:%M:%S"}
{$custom_message}
{include file="file:$centreon_open_tickets_path/providers/Abstract/templates/display_selected_lists.ihtml" separator=""}
{if $host_selected|@count gt 0}
{foreach from=$host_selected item=host}
Host: {$host.name}
State: {$host.state_str}
Duration: {$host.last_hard_state_change_duration}
Output: {$host.output|substr:0:1024}
{host_get_hostgroups host_id=$host.host_id}
hostgroups:
{foreach from=$host_get_hostgroups_result item=hg}
{$hg}
{/foreach}
{/foreach}
{/if}
{if $service_selected|@count gt 0}
{foreach from=$service_selected item=service}
Host: {$service.host_name}
Service: {$service.description}
State: {$service.state_str}
Duration: {$service.last_hard_state_change_duration}
Output: {$service.output|substr:0:1024}
{host_get_hostgroups host_id=$service.host_id}
hostgroups:
{foreach from=$host_get_hostgroups_result item=hg}
{$hg}
{/foreach}
{/foreach}
{/if}
Hope it helps !
Thank you for your response, that's exactly what I was missing to finalize the ticketing automation!
Best regards