Ad Widget

Collapse

Host availability widget

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • netum
    Junior Member
    • Sep 2019
    • 11

    #1

    Host availability widget

    Hello Zabbix community,

    I need to fusion agent zabbix and SNMP in one entry.
    If it's not possible is there a way to rename "agent zabbix" and "SNMP" ?

    Netum
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    The short answer is no. More expanded are the built-in strings . If you are not satisfied with this display - try using another. If you are not satisfied with Zabbix visualization capabilities - install and use grafana.

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      You may be able to change it by changing the translation settings. It is necessary to change the language setting file used and reload it. Note, however, that other screens that use the same string will change as well.
      Are you using a French setting? You can change it by following the steps below.

      1. Get tarball of source file
      2. Expand tarball
      3. Copy shell script
      4. Copy French language file
      5. Edit French language file
      6. Generate mo file
      7. Restart web server or php-fpm

      Or you can change the PHP code.
      /usr/share/zabbix/include/classes/widgets/views/widget.hostavail.form.view.php

      However, it is not recommended to change the source code because it will not be able to support Zabbix version upgrade.

      Comment

      • netum
        Junior Member
        • Sep 2019
        • 11

        #4
        Originally posted by Atsushi
        You may be able to change it by changing the translation settings. It is necessary to change the language setting file used and reload it. Note, however, that other screens that use the same string will change as well.
        Are you using a French setting? You can change it by following the steps below.

        1. Get tarball of source file
        2. Expand tarball
        3. Copy shell script
        4. Copy French language file
        5. Edit French language file
        6. Generate mo file
        7. Restart web server or php-fpm

        Or you can change the PHP code.
        /usr/share/zabbix/include/classes/widgets/views/widget.hostavail.form.view.php

        However, it is not recommended to change the source code because it will not be able to support Zabbix version upgrade.
        thank you for your answer
        Yes I using french language
        So I tryed to edit widget.hostavail.form.view.php
        and after a reboot nothing happens :c

        Comment

        • Atsushi
          Senior Member
          • Aug 2013
          • 2028

          #5
          It will not be reflected by that change method. The notation of that part of the original is for processing the translated character string, so to avoid performing the translation process, it is necessary to take a method of directly specifying the character string. There seem to be two files to change.

          /usr/share/zabbix/include/classes/widgets/views/widget.hostavail.form.view.php
          Code:
          # diff widget.hostavail.form.view.php.org widget.hostavail.form.view.php
          44,45c44,45
          <               INTERFACE_TYPE_AGENT => _('Zabbix agent'),
          <               INTERFACE_TYPE_SNMP => _('SNMP'),
          ---
          >               INTERFACE_TYPE_AGENT => 'Serveur Windows et Linux',
          >               INTERFACE_TYPE_SNMP => 'Caméras',
          #
          /usr/share/zabbix/app/views/monitoring.widget.hostavail.view.php
          Code:
          # diff monitoring.widget.hostavail.view.php.org monitoring.widget.hostavail.view.php
          23,24c23,24
          <       INTERFACE_TYPE_AGENT => _('Zabbix agent'),
          <       INTERFACE_TYPE_SNMP => _('SNMP'),
          ---
          >       INTERFACE_TYPE_AGENT => 'Serveur Windows et Linux',
          >       INTERFACE_TYPE_SNMP => 'Caméras',
          #

          Comment

          • netum
            Junior Member
            • Sep 2019
            • 11

            #6
            Originally posted by Atsushi
            It will not be reflected by that change method. The notation of that part of the original is for processing the translated character string, so to avoid performing the translation process, it is necessary to take a method of directly specifying the character string. There seem to be two files to change.

            /usr/share/zabbix/include/classes/widgets/views/widget.hostavail.form.view.php
            Code:
            # diff widget.hostavail.form.view.php.org widget.hostavail.form.view.php
            44,45c44,45
            < INTERFACE_TYPE_AGENT => _('Zabbix agent'),
            < INTERFACE_TYPE_SNMP => _('SNMP'),
            ---
            > INTERFACE_TYPE_AGENT => 'Serveur Windows et Linux',
            > INTERFACE_TYPE_SNMP => 'Caméras',
            #
            /usr/share/zabbix/app/views/monitoring.widget.hostavail.view.php
            Code:
            # diff monitoring.widget.hostavail.view.php.org monitoring.widget.hostavail.view.php
            23,24c23,24
            < INTERFACE_TYPE_AGENT => _('Zabbix agent'),
            < INTERFACE_TYPE_SNMP => _('SNMP'),
            ---
            > INTERFACE_TYPE_AGENT => 'Serveur Windows et Linux',
            > INTERFACE_TYPE_SNMP => 'Caméras',
            #
            Thank you ! it's work
            Happy new year !

            Comment

            Working...