Ad Widget

Collapse

Zabbix 3.4.1 Maps save as image or export SVG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itbubba
    Junior Member
    • Mar 2015
    • 2

    #1

    Zabbix 3.4.1 Maps save as image or export SVG

    Now that zabbix is using SVG instead of PNG is there a way to either embed a map in another webpage or export just the SVG so I can convert it with ImageMagick.
  • FelipeVieira
    Junior Member
    • Mar 2014
    • 21

    #2
    HI!

    Have you found a solution for that? I'm looking for something to generate the image from maps.

    Comment

    • itbubba
      Junior Member
      • Mar 2015
      • 2

      #3
      solution that might work

      I found a headless browser that I have been able to take screen shots with that may fit my workflow.

      Comment

      • FelipeVieira
        Junior Member
        • Mar 2014
        • 21

        #4
        Hummmm thank you for your reply.

        I have found these scripts:


        secure.php.net/manual/pt_BR/function.imagecreatefromwebp.php
        github.com/spatie/browsershot

        But I didn't test yet.

        Comment

        • gessel
          Junior Member
          • Mar 2017
          • 24

          #5
          <strike>I'd think JSON map.get would do the right thing, but...</strike>

          I haven't figured out how to get the actual map, rather than just meta info about the maps.

          https://www.zabbix.com/documentation...erence/map/get


          I was also trying to get the actual SLA values from Services, but so far only have lists of meta info, rather than actual values. I still think this is the right direction though.
          Last edited by gessel; 01-04-2018, 17:20.

          Comment

          • gessel
            Junior Member
            • Mar 2017
            • 24

            #6
            well.. duh, JSON will only return text, there's no way to get URL-image. The map is now generated in the browser from an element list retrieved from the server. I'm not sure there is any way around a full JS-aware/SVG supporting browser to construct the image and then convert the resulting bitmap into a saved image. That's a whole lotta overhead.

            It would be very nice to be able to pull the 3.2- code that generated a PNG map back in as an optional presentation mechanism.

            Comment

            • gessel
              Junior Member
              • Mar 2017
              • 24

              #7
              Phanomjs worked with 3.4 but the update to 4.x introduced a new twist:

              /usr/bin/phantomjs /usr/lib/zabbix/alertscripts/zabbix24_login.js
              All settings loaded, start with execution
              Loading started
              Loading finished
              Loading started
              ReferenceError: Can't find variable: Audio

              http://10.100.50.253/zabbix/jsLoader...saging=1:13285 in ZBX_NotificationsAudio
              http://10.100.50.253/zabbix/jsLoader...saging=1:13753 in ZBX_Notifications

              Loading finished

              Comment

              Working...