#<Plugin "snort">
# <Metric "dropped">
-# Type "pkt_drop_percent"
+# Type "percent"
+# Instance "dropped"
# Index 1
# </Metric>
# <Metric "mbps">
-# Type "wire_mbits_per_sec.realtime"
+# Type "bytes"
+# Instance "wire-realtime"
# Index 2
# </Metric>
# <Metric "alerts">
struct metric_definition_s {
char *name;
char *type;
+ char *instance;
int data_source_type;
int index;
struct metric_definition_s *next;
sstrncpy(vl.plugin, "snort", sizeof(vl.plugin));
sstrncpy(vl.plugin_instance, id->name, sizeof(vl.plugin_instance));
sstrncpy(vl.type, md->type, sizeof(vl.type));
+ if (md->instance != NULL)
+ sstrncpy(vl.type_instance, md->instance, sizeof(vl.type_instance));
vl.time = id->last;
vl.interval = id->interval;
if (strcasecmp("Type", option->key) == 0)
status = cf_util_get_string(option, &md->type);
+ else if (strcasecmp("Instance", option->key) == 0)
+ status = cf_util_get_string(option, &md->instance);
else if (strcasecmp("Index", option->key) == 0)
status = snort_config_add_metric_index(md, option);
else {