Rephrased and simplified option documentation
[collectd.git] / src / snmp.c
index 361a140..8ff4009 100644 (file)
@@ -764,7 +764,7 @@ static int csnmp_config_add_host(oconfig_item_t *ci) {
   /* These mean that we have not set a timeout or retry value */
   hd->timeout = 0;
   hd->retries = -1;
-  hd->build_size = 0;
+  hd->bulk_size = 0;
 
   for (int i = 0; i < ci->children_num; i++) {
     oconfig_item_t *option = ci->children + i;
@@ -821,6 +821,11 @@ static int csnmp_config_add_host(oconfig_item_t *ci) {
       status = -1;
       break;
     }
+    if (hd->bulk_size > 0 && hd->version < 2) {
+      WARNING("snmp plugin: Bulk transferts is only available for snmp v2 and "
+              "later, host '%s' is configured as version '%d'",
+              hd->name, hd->version);
+    }
     if (hd->version == 3) {
       if (hd->username == NULL) {
         WARNING("snmp plugin: `Username' not given for host `%s'", hd->name);
@@ -1593,8 +1598,8 @@ static int csnmp_read_table(host_definition_t *host, data_definition_t *data) {
   csnmp_cell_value_t **value_cells_head;
   csnmp_cell_value_t **value_cells_tail;
 
-  DEBUG("snmp plugin: csnmp_read_table (host = %s, data = %s (%ld))",
-        host->name, data->name, data->values_len);
+  DEBUG("snmp plugin: csnmp_read_table (host = %s, data = %s)", host->name,
+        data->name);
 
   if (host->sess_handle == NULL) {
     DEBUG("snmp plugin: csnmp_read_table: host->sess_handle == NULL");