Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20432

It's not possible to import the template with triggers if hostname consist only of digits

XMLWordPrintable

    • Team A
    • Sprint 84 (Jan 2022), Sprint 85 (Feb 2022)
    • 0.25

      Create\export from previous version host\template named "12345" with triggers:

      <triggers>
      <trigger>
      <expression>{12345:item.key[param1].last()}&lt;=1000</expression>
      <recovery_mode>0</recovery_mode>
      <recovery_expression/>
      <name>Some problem on {HOST.HOST}</name>
      <correlation_mode>0</correlation_mode>
      <correlation_tag/>
      <url/>
      <status>0</status>
      <priority>4</priority>
      <description/>
      <type>0</type>
      <manual_close>1</manual_close>
      <dependencies/>
      <tags/>
      </trigger>
      </triggers>
      

      The import page will show 'loading'

      in web server logs we have:

      2022/01/03 12:31:36 [error] 29929#0: *176 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to C52ImportConverter::prepareTemplateName() must be of the type string, integer given, called in /usr/share/zabbix/include/classes/import/converters/C52ImportConverter.php on line 616 and defined in /usr/share/zabbix/include/classes/import/converters/C52ImportConverter.php:687
      Stack trace:
      #0 /usr/share/zabbix/include/classes/import/converters/C52ImportConverter.php(616): C52ImportConverter::prepareTemplateName(91005)
      #1 /usr/share/zabbix/include/classes/import/converters/C52ImportConverter.php(58): C52ImportConverter::convertTriggers(Array, true)
      #2 /usr/share/zabbix/include/classes/api/services/CConfiguration.php(214): C52ImportConverter->convert(Array)
      #3 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(121): CConfiguration->import(Array)
      #4 /usr/share/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod('configuration', 'import', Array, '7b60e9b686fd698...')
      #5 /usr/share/zabb" while reading response header from upstream, client: 192.168.31.84, server: example.com, request: "POST /zabbix.php?action=popup.import&output=ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/zabbix.sock:", host: "192.168.31.181", referrer: "http://192.168.31.181/zabbix.php?action=host.list"
      

            averza Andrejs Verza
            elina.kuzyutkina Elina Kuzyutkina (Inactive)
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: