Creating a link to host in alert notification

Hi,

Is it possible to include a link to the hosts main page/service page in the alert notification? In the same way in the description we have $Host$, is there a similar tag we can use for the link?

This is something we need for our service desk to be able to open and view from an alert.

Hi,

you can add it to your notification rule via »Notification Method > Insert HTML section between body and table«:

<HTMLTAG><div style='font-size: 150%'><a href="https://<your-checkmk-url>/<cmk-site>/check_mk/view.py?host=$HOSTNAME$&view_name=host">View in Monitoring</a></div></HTMLTAG>

I should have said this is a ServiceNow integration, I don’t see that option there.

Can you enter the code into the host description area?

Also it is coming through like this in my email notifications:

Sorry, I have no experience with ServiceNow.
But you can edit the HTML section to only use the hyperlink tag <a>:

<a href="https://<your-checkmk-url>/<cmk-site>/check_mk/view.py?host=$HOSTNAME$&view_name=host">View in Monitoring</a>

How can you get it to appear nicely in the table though? Even without ServiceNow it still appears above the table as in my screenshot above?

I see, that is how we do that.
When you set the notification option »URL prefix for links to Checkmk« to automatic http/s, the Hostname will include a link, but not to the service overview, instead you will get to the host status. Does this help you? From there you can click on »Services of Host«.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.