Ad Widget

Collapse

Link Each Host to URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • idgykapow
    Junior Member
    • Mar 2010
    • 8

    #1

    Link Each Host to URL

    I have recently setup Zabbix and are loving it so far. One thing I am very interested in being able to do is being able to link to a specific URL from a host. In our organization we use a remote control application that generates a specific URL for each machine we can connect to. This URL is the same with the exception of the host name which is identical between Zabbix and the remote control app.
    eg. Name of machine = testing_host
    URL for remote control = http://remotetest.com/?machine=testing_host
    Can anyone think of a way in Zabbix in which I could setup a action/trigger/ (????) that could be clicked and would automatically launch another page with the specific URL (and hostname added)?
    This would allow us to be able to use Zabbix to connect directly to any machine experiencing issues rather than having to be logged into both apps continually.
    Any help or guidance is much appreciated.
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Yep, you can do this pretty easily.

    For trigger actions, there is a parameter you can use: {HOSTNAME}

    So if I understand what you wish to do... let's say any Windows host that throws an alert that you have designated as a "high" severity, you get an e-mail alert from Zabbix, and in that alert is a URL you can click on with the first part of the URL being static:
    Code:
    http://remotetest.com/?machine=
    and the last part being dynamic of whatever the host is that triggered the alert:
    Code:
    testing_host
    If that is what you want, you simply create an action as per the below screenshot. All you are doing is putting into the message portion of the action: the static part of your URL followed directly with {HOSTNAME}. Must be in caps.

    If you create this trigger at the template level for Windows, it will be active on any server that Template_Windows is attached to. In the below example, any server that belongs to my "Windows Servers" group and has a trigger severity of "high" with a trigger value of "problem" will fire an e-mail alert that will contain the URL within the body of the e-mail sent by Zabbix.

    I just tested it and it works as expected. It got word-wrapped in the screenshot. Your entry would look like this:
    http://remotetest.com/?machine={HOSTNAME}
    Attached Files

    Comment

    • idgykapow
      Junior Member
      • Mar 2010
      • 8

      #3
      Thanks tchjts1 for your quick response. This will be quite helpful and will test implementing this tomorrow.
      I was actually hoping that there may be some way to do it from within the Zabbix application itself rather than a link in a email. It would be nice if we could link to all hosts from Zabbix all the time, not just ones that generate an error. Can you think of any way this may be possible?
      Again thanks for your help.

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        I probably misunderstood what you wanted. I thought you wanted a link in Zabbix that would launch you to your remote control application.

        I don't have the answer you are looking for, but you may want to explore Configuration --> Screens, or even Monitoring --> Latest Data.

        Pretty labor intensive to set up screens at this time, though.
        Last edited by tchjts1; 09-03-2010, 14:31.

        Comment

        • radamand
          Member
          • Aug 2008
          • 89

          #5
          If I understand what you're looking for, I think you could get there using a user script (Administration -> Scripts in 1.8).
          use the command '/bin/firefox http://remotetest.com/?machine={HOSTNAME}'

          then you would need a map or screen showing all of your hosts.

          I haven't tested this but I believe that's more or less how it works.

          EDIT: Okay, I just tested this and it doesn't work. The user script executes on the server, not on the client's machine.
          Not sure how to make this work...
          Last edited by radamand; 23-03-2010, 20:53.

          Comment

          • craigwelsh
            Junior Member
            • Sep 2005
            • 12

            #6
            You could create a template with a calculated item being a weblink to http://remotetest.com/?machine={HOSTNAME} this could then be used for all hosts. Doubt it would be clickable though .

            I want something similar for map URLs where I want them to point to the device login page but I can't seem to use macro's for that.

            Comment

            Working...