- type_instance = strchr (type, ',');
- if (type_instance == NULL)
- continue;
- *type_instance = '\0';
- type_instance++;
-
- if ((strcasecmp ("counter", type) != 0)
- && (strcasecmp ("gauge", type) != 0))
- {
- syslog (LOG_WARNING, "exec plugin: Received invalid type: %s", type);
- continue;
- }
-
- value = strchr (type_instance, ',');
- if (value == NULL)
- continue;
- *value = '\0';
- value++;
-
- DBG ("value = %s", value);
-
- if (strcasecmp ("counter", type) == 0)
- submit_counter (type_instance, atoll (value));
- else
- submit_gauge (type_instance, atof (value));