Ad Widget

Collapse

Zabbix cant load image for branding frontend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobinH
    Member
    • Jul 2023
    • 55

    #1

    Zabbix cant load image for branding frontend

    Hey everybody!

    I am trying to rebrand our zabbix server according to the documentation available (https://www.zabbix.com/documentation...ace/rebranding) and
    I have created three images as per the specification given in .png file format. (114x31, 91x24, 24x24)

    Click image for larger version

Name:	image.png
Views:	1955
Size:	6.9 KB
ID:	469544
    If I test the path for the files, they are located correctly, but I only get an image file icon like Zabbix cannot find or load the files.

    Anyone experienced the same problem?​

    Code:
    zafe@fw-fortigate-monitoring:~$ cd /home/zafe/Pictures
    zafe@fw-fortigate-monitoring:~/Pictures$ ls
    custom_logo.png custom_logo_sidebar_compact.png custom_logo_sidebar.png


    Here is my config (brand.conf.php)

    Code:
    <?php
    return [
        'BRAND_LOGO' => '/home/zafe//Pictures/custom_logo.png',
        'BRAND_LOGO_SIDEBAR' => '/home/zafe/Pictures/custom_logo_sidebar.png',
        'BRAND_LOGO_SIDEBAR_COMPACT' => '/home/zafe/Pictures/custom_logo_sidebar_compact.png',
        'BRAND_FOOTER' => '© Zafe Care Systems',
        'BRAND_HELP_URL' => 'https://www.zafe.se/support'
    ];​
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Can you access those files on command line when you switch to the user that runs your webserver? Better move those pics to a place, where web server user can see them....

    Comment

    • RobinH
      Member
      • Jul 2023
      • 55

      #3
      Hmm I have tried both with root and zafe user. Is there a place i Zabbix directory where its easy to store them?

      Comment

      • RobinH
        Member
        • Jul 2023
        • 55

        #4
        Now I have tried to place it in the zabbix directory, /usr/share/zabbix which should not be a problem to find the file.
        But it still doesnt load it.

        I have changed so I just use one image to test with for the login-screen, so it now looks like this:

        Code:
        <?php
        return [
            'BRAND_LOGO' => '/usr/share/zabbix/custom_logo.png',
            'BRAND_FOOTER' => '© Zafe Care Systems AB'
        ];​
        And if i look in the directory its there with everything els....

        Code:
        root@fw-fortigate-monitoring:/usr/share/zabbix# ls
        api_jsonrpc.php     composer.json                hostinventories.php  jsLoader.php  templates.php
        api_scim.php        composer.lock                host_prototypes.php  jsrpc.php     toptriggers.php
        app                 conf                         httpconf.php         local         tr_events.php
        assets              custom_logo.png              httpdetails.php      locale        trigger_prototypes.php
        audio               data                         image.php            map.php       triggers.php
        browserwarning.php  disc_prototypes.php          imgstore.php         modules       vendor
        chart2.php          favicon.ico                  include              report2.php   widgets
        chart3.php          fonts                        index_http.php       report4.php   zabbix.php
        chart4.php          graphs.php                   index.php            robots.txt
        chart6.php          history.php                  index_sso.php        setup.php
        chart7.php          host_discovery.php           items.php            sysmap.php
        chart.php           hostinventoriesoverview.php  js                   sysmaps.php​

        Comment

        • RobinH
          Member
          • Jul 2023
          • 55

          #5
          If I try a URL to our website where the logo-file also is located it works. (But the logo is to big). But with the same logo-file and located in the local directory it doesnt find it.

          Is something wrong with where I try to store them?​

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6

            Note that the path to the image on the disk should be relative to the Zabbix frontend root directory
            Code:
            'BRAND_LOGO' => './custom_logo.png',

            Comment

            • RobinH
              Member
              • Jul 2023
              • 55

              #7
              'BRAND_LOGO' => './custom_logo.png',

              Doesnt work when the .png file is located in the same folder as the conf-file.

              Comment

              • solution
                Senior Member
                • Jun 2020
                • 269

                #8
                use:
                1)
                'BRAND_LOGO' => './custom_logo.png',
                2) Move 'custom_logo.png' TO /usr/share/zabbix/


                Wellington

                Comment

                • nameuser
                  Member
                  • Apr 2018
                  • 39

                  #9
                  Same problem - Zabbix server doesn't use brand.conf.php.
                  Config: /usr/share/zabbix/brand.conf.php

                  Code:
                  <?php
                  return [
                  'BRAND_FOOTER' => 'Test footer copyright'
                  ];

                  Zabbix 6.4.7.
                  Nothing changed - footer copyright is the same.

                  Also tried to put brand.conf.php in /usr/share/zabbix/conf/brand.conf.php.
                  Nothing changed - footer is the same.
                  Last edited by nameuser; 11-03-2024, 10:30.

                  Comment

                  • solution
                    Senior Member
                    • Jun 2020
                    • 269

                    #10
                    In Debian 11, package installation path is:
                    Code:
                    /usr/share/zabbix/local/conf/brand.conf.php
                    Wellington

                    Comment

                    • nameuser
                      Member
                      • Apr 2018
                      • 39

                      #11
                      Thanks

                      one two three

                      Comment

                      • ianiovski
                        Junior Member
                        • Nov 2024
                        • 4

                        #12
                        Hello, I also want to change the logo of the site, but the link does not work:



                        Is there an alternate guide or has someone saved the page itself.

                        My version of Zabbix is 7.0

                        Comment

                        • cyber
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Dec 2006
                          • 4807

                          #13

                          Comment

                          • hermanekt
                            Member
                            Zabbix Certified Trainer
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Aug 2019
                            • 59

                            #14
                            Hi i created topic with explanation how to do this via native way and don be in stress during update/upgrades for loosing any of this configuration https://www.initmax.com/wiki/customi...bbix-frontend/ rebranding included.

                            Comment

                            Working...