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

Cannot add trigger if host name is numeric

XMLWordPrintable

    • Sprint 77 (Jun 2021)
    • 0.25

      • Create a numerically named host "112233";
      • Create an item (doesn't matter if numeric or not);
      • Create a trigger using that host an item.

      Error can be observed using API or frontend:

      pg_query(): Query failed: ERROR: operator does not exist: character varying = integer
      LINE 1: SELECT h.hostid,h.host FROM hosts h WHERE h.host=112233 AND ...
      
      HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. [triggers.php:297 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->create() → CTriggerGeneral->validateCreate() → CTriggerGeneral->populateHostIds() → DBselect() → pg_query() → CConfigFile->{closure}() in include\db.inc.php:247]
      Error in query [SELECT h.hostid,h.host FROM hosts h WHERE h.host=112233 AND h.status IN (0,1,3)] [ERROR: operator does not exist: character varying = integer
      LINE 1: SELECT h.hostid,h.host FROM hosts h WHERE h.host=112233 AND ...
      
      HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.]
      Incorrect trigger expression. Host "112233" does not exist or you have no access to this host. [triggers.php:297 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CTrigger->create() → CTriggerGeneral->validateCreate() → CTriggerGeneral->populateHostIds() → CApiService::exception() in include\classes\api\services\CTriggerGeneral.php:536]
      

            jfreibergs Janis Freibergs
            iivs Ivo Kurzemnieks
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: