projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e1bb73
)
snmp plugin: csnmp_value_list_to_value: Include the OID in the log message.
author
Florian Forster
<octo@noris.net>
Wed, 19 May 2010 10:14:46 +0000
(12:14 +0200)
committer
Florian Forster
<octo@noris.net>
Wed, 19 May 2010 10:14:46 +0000
(12:14 +0200)
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
96a0971
..
693cd89
100644
(file)
--- a/
src/snmp.c
+++ b/
src/snmp.c
@@
-752,16
+752,23
@@
static value_t csnmp_value_list_to_value (struct variable_list *vl, int type,
{
/* We'll handle this later.. */
}
{
/* We'll handle this later.. */
}
-#ifdef ASN_NULL
- else if (vl->type == ASN_NULL)
- {
- /* Don't print a warning. */
- defined = 0;
- }
-#endif
else
{
else
{
- WARNING ("snmp plugin: I don't know the ASN type `%i'", (int) vl->type);
+ char oid_buffer[1024];
+
+ memset (oid_buffer, 0, sizeof (oid_buffer));
+ snprint_objid (oid_buffer, sizeof (oid_buffer) - 1,
+ vl->name, vl->name_length);
+
+#ifdef ASN_NULL
+ if (vl->type == ASN_NULL)
+ INFO ("snmp plugin: OID \"%s\" is undefined (type ASN_NULL)",
+ oid_buffer);
+ else
+#endif
+ WARNING ("snmp plugin: I don't know the ASN type \"%i\" (OID: %s)",
+ (int) vl->type, oid_buffer);
+
defined = 0;
}
defined = 0;
}