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

Cannot create new value map

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Incomplete
    • Icon: Major Major
    • None
    • 3.2.0
    • Frontend (F)
    • Centos 7, postgreSQL

      Hi,

      I am trying to add a valuemap, and it fails because of a duplicate key error. Below the UI's error.

      pg_query(): Query failed: ERROR: duplicate key value violates unique constraint "valuemaps_pkey"
      DETAIL: Key (valuemapid)=(19) already exists. [adm.valuemapping.php:108 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CValueMap->create() ? DB::insertBatch() ? DBexecute() ? pg_query() in include/db.inc.php:530]
      Error in query [INSERT INTO valuemaps (name,valuemapid) VALUES ('test','19')] [ERROR: duplicate key value violates unique constraint "valuemaps_pkey"
      DETAIL: Key (valuemapid)=(19) already exists.]
      SQL statement execution has failed "INSERT INTO valuemaps (name,valuemapid) VALUES ('test','19')".
      

      Effectively, looking at the table:

      zabbix=# select * from valuemaps order by valuemapid;;
       valuemapid |                  name                  
      ------------+----------------------------------------
                1 | Service state
                2 | Host availability
                3 | Windows service state
                4 | APC Battery Replacement Status
                5 | APC Battery Status
                6 | HP Insight System Status
                7 | Dell Open Manage System Status
                8 | SNMP interface status (ifOperStatus)
                9 | SNMP device status (hrDeviceStatus)
               10 | Zabbix agent ping status
               11 | SNMP interface status (ifAdminStatus)
               12 | VMware VirtualMachinePowerState
               13 | VMware status
               14 | Maintenance status
               15 | Value cache operating mode
               16 | Windows service startup type
               17 | HTTP response status code
               18 | 0:No, 1:Yes
               19 | NetAppCfSetting
               20 | NetAppCfState
               21 | NetAppFcpTgtStatus
               22 | NetAppFsStatus
               23 | NetAppGlobalStatus
               24 | NetAppLunOnline
               25 | NetAppNvramBatteryStatus
               26 | NetAppOverTemp
               27 | NetAppRaidStatus
               28 | NetAppSpareStatus
               29 | NetAppVolStatus
               30 | Server HP Fan
               31 | Server HP Health
               32 | RSS Feed
               33 | SNMP Ilo 4 - Fan status
               34 | SNMP Ilo 4 - Raid status
               35 | SNMP Ilo 4 - Disk negotiated link rate
               36 | SNMP Ilo 4 - Disk status
               37 | SNMP Ilo 4 - Power supply
               38 | FgVpnState
               39 | fgHwSensorEntAlarmStatus
               40 | F5 ltmPoolStatusAvailState
               41 | NetAppcfInterconnectStatus
               42 | NetAppcfPartnerStatus
      (42 rows)
      

      I don't know why it tries to allocate ID 19 for my new value map.

      I can try to update the current ID 19 to 43, and see what happens, but I am bit afraid of breaking other things while doing that.

      Thank you for your help.

            Unassigned Unassigned
            madchap Fred Blaise
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: