Ad Widget

Collapse

How to download map.png

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • s5unty
    Junior Member
    • May 2016
    • 2

    #1

    How to download map.png

    Is it possible to download maps from zabbix with command line?

    I would like to integrate map.png to Grafana.
    If I use the map link[1], other Grafana user who were not users of zabbix could not see the map image.
    So I have to use a real image file instead of the map link[1].

    I have tried the zabbix api "image.get", but it doesn't work for me.
    The 'curl' command line show me "You are not logged in".
    Is there any other method?
    Thanks.

    [1]: http://thezabbix/zabbix/map.php?sysm...severity_min=0
  • viktorkho
    Member
    • Jul 2013
    • 90

    #2
    If there is no more proposes..

    1) Open map in your webbrouser
    2) Drag'n'drop map.png to to create one more tab with this png (or select somthing like "Open image in new tab" in context menu of image)
    3) Use image's url in address-bar

    This image will up-to-date while your session is alive (see 'sid' in url). So if you can emulate this behaveour in your application, you will solve you task..
    Last edited by viktorkho; 15-05-2016, 15:44. Reason: typo fixed

    Comment

    • s5unty
      Junior Member
      • May 2016
      • 2

      #3
      Thanks viktorkho.

      Solved this problem (reference).

      It works in version 3.0.

      Code:
      wget --save-cookies=z.coo -4 --keep-session-cookies -O - -S --post-data='name=(a zabbix username)&password=(password)&enter=Sign in&autologin=1&request=' 'http://example.com/zabbix/index.php?login=1'
      wget -4 --load-cookies=z.coo -O result.png 'http://example.com/zabbix/map.php?sysmapid=1&severity_min=0'

      Comment

      • viktorkho
        Member
        • Jul 2013
        • 90

        #4
        Thanks s5unty (and Michael Tabolsky) for very usefull wget..

        Comment

        • naigamo
          Junior Member
          • May 2015
          • 1

          #5
          How to wget zabbix map version 3.4

          Originally posted by s5unty
          Thanks viktorkho.

          Solved this problem (reference).

          It works in version 3.0.

          Code:
          wget --save-cookies=z.coo -4 --keep-session-cookies -O - -S --post-data='name=(a zabbix username)&password=(password)&enter=Sign in&autologin=1&request=' 'http://example.com/zabbix/index.php?login=1'
          wget -4 --load-cookies=z.coo -O result.png 'http://example.com/zabbix/map.php?sysmapid=1&severity_min=0'

          Comment

          • cwhite
            Member
            • Aug 2015
            • 46

            #6
            +1 on broken wget in 3.4

            We had wget working simply up to 3.2 now it seems instead of .png file we are getting the raw xml/html returned. Did notice the url format has changed slightly in 3.4 but updating and trying

            as example

            wget -O /var/www/wiki/images/6/64/MapHBC.png "http://IPADDRESS/zabbix/zabbix.php?action=map.view&sysmapid=4&severity_min =0"

            returns no png

            Originally posted by naigamo
            How to wget zabbix map version 3.4

            Comment

            Working...