Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3652

Network discovery crop value to 255 chars

XMLWordPrintable

      When querying key from the discoverer, the value get truncated to 255 chars.

      I found this when creating a custom userparameter returning every puppet classes (seperated by comma) to automaticaly add template to a host. See http://serverfault.com/questions/778805/zabbix-network-discovery-of-puppet-managed-network/778876

      Values got truncated as so:

      [zabbix]> select dserviceid,dhostid,status,lastup,lastdown,value,dns from dservices where dcheckid=3 and type=9 and key_='puppet.classes' \G
      *************************** 1. row ***************************
      dserviceid: 9
         dhostid: 3
          status: 0
          lastup: 1464103581
        lastdown: 0
           value: ,apache,apache::default_confd_files,apache::default_mods,apache::mod::alias,apache::mod::dir,apache::mod::filter,apache::mod::mime,apache::mod::php,apache::mod::prefork,apache::mod::ssl,apache::mod::status,apache::params,apache::service,apache::version,ap
             dns: 
      
      src/libs/zbxdbhigh/discovery.c
        static void discovery_update_dservice(zbx_uint64_t dserviceid, int status, int lastup, int lastdown, const char *value)
        {
            char    *value_esc;
            value_esc = DBdyn_escape_string_len(value, DSERVICE_VALUE_LEN);
            DBexecute("update dservices set status=%d,lastup=%d,lastdown=%d,value='%s' where dserviceid=" ZBX_FS_UI64, status, lastup, lastdown, value_esc, dserviceid);
      
            zbx_free(value_esc);
        }
      
      include/db.h
        #define DSERVICE_VALUE_LEN        255
      

            Unassigned Unassigned
            pbrideau Patrick Brideau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: