Ad Widget

Collapse

URL of map elements in 1.6.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Silvery
    Junior Member
    Zabbix Certified Specialist
    • Oct 2008
    • 28

    #1

    URL of map elements in 1.6.4

    I've a problem with the URL of map elements.
    I use this URL as a link to the web applications of our switches.
    In the configuration of the map the URL looks like this: "http://IP-ADDRESS"

    In Zabbix 1.6.1 the link-address of a map-element was the same as the URL in the map-configuration of this element.
    But since I upgraded to Zabbix 1.6.4 the links have the following address structure: "http://IP-ADDRESSIP-ADDRESS/?sid=358ab7dcaecef2d0"

    I've also tested to change the URL in the map-configuration to the following: "http://IP-ADDRESS/"
    But then the links have another wrong address: "http://IP-ADDRESS/?sid=358ab7dcaecef2d0"

    What can I do to have the right link-address again?
  • timmy
    Junior Member
    • Jul 2006
    • 10

    #2
    A kind of bug?....

    Redirection to map item URL is made in file /zabbix/include/maps.inc.php

    Original code (ver. 1.6.4):

    $menus.= "['".S_MAP.SPACE.S_URL."',\"javascript: redirect('".$url."')\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";

    Corrected code:

    $menus.= "['".S_MAP.SPACE.S_URL."',\"javascript: location.replace('".$url."')\", null,{'outer' : ['pum_o_item'],'inner' : ['pum_i_item']}],";

    Iam not skilled in php but suppose that 'redirect' function directs browser to URL relative to
    sever root.
    Suppose we got a web-interface of UPS,switch etc as the map item URL so than function 'location.replace' should be used in map.inc.php.

    Comment

    • Silvery
      Junior Member
      Zabbix Certified Specialist
      • Oct 2008
      • 28

      #3
      I've checked this, but it didn't solve the problem.

      The url is saved correctly in the database.
      I've searched the php-code, but I couldn't find the "bug"

      Comment

      • timmy
        Junior Member
        • Jul 2006
        • 10

        #4
        Versions are exactly the same?

        Code is near line 760 in include/map.inc.php

        [timmy@zabbix zabbix]$ md5sum include/maps.inc.php.orig

        4c9656e8afe9b4602d688f6327211503 include/maps.inc.php.orig

        Comment

        • Silvery
          Junior Member
          Zabbix Certified Specialist
          • Oct 2008
          • 28

          #5
          It's not like I didn't find the code that you mentioned. But changing it didn't solve my problem.

          Comment

          Working...