Ad Widget

Collapse

Where is the zabbix web server (in the alertscripts script)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    Where is the zabbix web server (in the alertscripts script)

    I set up a custom alert script to send HTML formatted email, and after cleaning up some bash-ignorance items it works beautifully, and the result is much prettier.

    The message includes some clickable links for acknowledgement, history of items, etc. Works fine (well, IE11 keeps saying it doesn't have a login context, but that's a different issue, works great in Chrome).

    Anyway... the URL's in the message at the moment are hard coded, which is bad.

    I can't find a macro to use as a replaceable item in the message for the base URL of the server (e.g. http : // server.domain.com / zabbix). Is there one? and/or in the context in which the alert script itself runs, is there any environment variable or other item that can be used to say "this is where the zabbix front end is for this instance"?

    Yes, I can use just that server name and append /zabbix, but all those are hard coded. Zabbix knows where its front end is; can I find out from it in some fashion in that context? To make the script (or the message template) more general?

    PS. Putting something in the trigger URL appears to just move the question to a different place, right? Still need to hard code it?
Working...