Ad Widget

Collapse

No legends at all on graphs on 4.0.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jason
    Senior Member
    • Nov 2007
    • 430

    #1

    No legends at all on graphs on 4.0.0

    I've upgraded my test instance from 3.2.7 to 4.0.0 and all the graphs have no legends or any writing on them at all. This is on Centos 7. I think I'm on the default font. It was all fine prior to updating and I've just checked through and I have all prerequisite packages installed.

  • gullevek
    Junior Member
    • Nov 2008
    • 22

    #2
    The DejaVu font is missing.

    I had the same issue on Debian and installing "ttf-dejavu" fixed it.

    The font in "fonts/" in the frontend is a symlink to the "../../fonts/truetype/ttf-dejavu/DejaVuSans.ttf" file. If that does not exist it will not work

    Comment

    • Jason
      Senior Member
      • Nov 2007
      • 430

      #3
      Yes, I'd tracked it down last night.
      Firstly the DejaVuSans.ttf file wasn't copied into the fonts directory when I'd installed it and then in my defines.inc.php it had the font down as graphfont. I've never set that so not sure what happened, but now everything is working.

      I'd just built my own rpms from the srpms on the zabbix website. The only change I make it is to tweak the config files more towards our setup so it's quicker to install.

      Comment

      • stevereaver
        Junior Member
        • Aug 2018
        • 17

        #4
        I had the same issue with upgraded from 4.0.5 to 4.0.8. I found that the fonts directory has moved to assets/fonts and the symlink for graphfont.ttf was missing. ln -s /etc/alternatives/zabbix-frontend-font graphfont.ttf fixed it.

        Comment

        • romale
          Member
          • Mar 2013
          • 53

          #5
          I had the same issue with upgraded from 4.0.5 to 4.0.8
          Not work for me.
          Centos 7. Browser cache data cleared

          [root@localhost fonts]# pwd
          /usr/share/zabbix/assets/fonts
          [root@localhost fonts]# ls -al
          total 0
          drwxrwxrwx 2 root root 28 May 29 12:13 .
          drwxrwxrwx 6 root root 55 May 29 12:07 ..
          lrwxrwxrwx 1 root root 38 May 29 12:13 zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
          [root@localhost fonts]# ls -al /etc/alternatives/zabbix-web-font
          lrwxrwxrwx 1 root root 38 May 29 12:02 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
          [root@localhost fonts]#

          Comment

          • romale
            Member
            • Mar 2013
            • 53

            #6
            Originally posted by romale
            I had the same issue with upgraded from 4.0.5 to 4.0.8
            Not work for me.
            Centos 7. Browser cache data cleared

            [root@localhost fonts]# pwd
            /usr/share/zabbix/assets/fonts
            [root@localhost fonts]# ls -al
            total 0
            drwxrwxrwx 2 root root 28 May 29 12:13 .
            drwxrwxrwx 6 root root 55 May 29 12:07 ..
            lrwxrwxrwx 1 root root 38 May 29 12:13 zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
            [root@localhost fonts]# ls -al /etc/alternatives/zabbix-web-font
            lrwxrwxrwx 1 root root 38 May 29 12:02 /etc/alternatives/zabbix-web-font -> /usr/share/fonts/dejavu/DejaVuSans.ttf
            [root@localhost fonts]#
            This works

            [root@localhost fonts]# pwd
            /usr/share/zabbix/assets/fonts
            [root@localhost fonts]# ls -al
            total 0
            drwxrwxrwx 2 root root 43 May 29 14:22 .
            drwxrwxrwx 6 root root 55 May 29 12:07 ..
            lrwxrwxrwx 1 root root 37 May 29 13:08 graphfont.ttf -> /usr/share/zabbix/fonts/graphfont.ttf

            Comment

            • androponia
              Junior Member
              • Jan 2019
              • 18

              #7
              [root@zabbix fonts]# pwd
              /usr/share/zabbix/assets/fonts
              root@zabbix fonts]# ln -s /usr/share/zabbix/fonts/graphfont.ttf graphfont.ttf

              did the trick for me!


              Found with:

              find / -name graphfont.ttf

              Comment

              • dranitski
                Junior Member
                • Jun 2019
                • 1

                #8
                Hello!

                Zabbix 4.2.2.
                NAME="Ubuntu"
                VERSION="16.04.5 LTS (Xenial Xerus)"

                The fix

                $grep 'FONTPATH' /usr/share/zabbix/include/defines.inc.php
                define('ZBX_FONTPATH', realpath('assets/fonts')); // where to search for font (GD > 2.0.18)
                $ls -alh /usr/share/zabbix/assets/fonts/
                empty (no files) - here is the problem
                $cp -vf /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf /usr/share/zabbix/assets/fonts/DejaVuSans.ttf
                $cp -vf /etc/alternatives/zabbix-frontend-font /usr/share/zabbix/assets/fonts/graphfont.ttf
                $service zabbix-server restart && service apache2 restart

                Comment

                Working...