Thanks Jam – I will check that out.
···
From:
checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
On Behalf Of Jam Mulch
Sent: Tuesday, February 21, 2017 4:53 PM
To: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] URL in alert emails for GUI
You can copy your notification script to the local directory structure and modify it to include
a site link.
For example:
From:
body_elements = [
( “hostname”, “both”, True, “Host”,
“$HOSTNAME$ ($HOSTALIAS$)”,
“$LINKEDHOSTNAME$ ($HOSTALIAS$)” ),
( “servicedesc”, “service”, True, “Service”,
“$SERVICEDESC$”,
“$LINKEDSERVICEDESC$” ),
( “event”, “both”, True, “Event”,
“$EVENT_TXT$”,
“$EVENT_HTML$”, ),
To:
myserverlink=“https:///”+sitename+“/check_mk” #customize for each site
mysitelink= ‘’+sitename+‘’
myhostlink= “<a href="”+myserverlink+“/index.py?start_url=view.py%3Fview_name%3Dhoststatus%26host%3d$LINKEDHOSTNAME$"><font color="blue">$LINKEDHOSTNAME$ ($HOSTALIAS$)”
myservicelink= “<a href="”+myserverlink+“/index.py?start_url=view.py%3Fview_name%3Dservice%26host%3D$LINKEDHOSTNAME$%26service%3D$LINKEDSERVICEDESC$"><font color="blue">$LINKEDSERVICEDESC$”
body_elements = [
( “site”, “both”, True, “Site”,
myserverlink,
mysitelink, ),
( “hostname”, “both”, True, “Host”,
“$HOSTNAME$ ($HOSTALIAS$)”,
“$LINKEDHOSTNAME$ ($HOSTALIAS$)” ),
( “hostname”, “both”, True, “Host”,
“$HOSTNAME$ ($HOSTALIAS$)”,
myhostlink, ),
( “servicedesc”, “service”, True, “Service”,
“$SERVICEDESC$)”,
myservicelink, ),
( “servicedesc”, “service”, True, “Service”,
“$SERVICEDESC$”,
“$LINKEDSERVICEDESC$” ),
( “event”, “both”, True, “Event”,
“$EVENT_TXT$”,
“$EVENT_HTML$”, )
On 02/21/2017 11:33 AM, Paraic O’Ceallaigh wrote:
Hi
When I click on the hostname in HTML email alerts it redirects to the WATO GUI, which is great except I have a cluster and the URL has a node hostname instead of the cluster name. So if it fails over which we do regularly for testing the
URL will no longer work.
How can I edit this URL to point to the cluster name rather than the individual node name?
Thnx
Paraic
This email, including any attachments, is confidential. If you are not the named recipient, please contact the sender and delete all copies of this email from your computer system(s).
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
[http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en](http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en)
–
Fortress Shield (by ParaTech, LLC)