[prev in list] [next in list] [prev in thread] [next in thread] 

List:       collectd
Subject:    [collectd] how to collect string values with snmp plugin
From:       Niels Tomey <niels () ixs ! ph>
Date:       2016-02-29 7:58:12
Message-ID: CALhsmHOTvbw-qz_a-=5nL5X1FKd9o49LhHiDS3dvJpOVyb6n5w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I would like to have collectd parse text values such as those found in
'system' (sysName, sysContact, sysLocation and so on). While researching it
seems that alphanumerical strings should be of the 'octet' type, however
there doesn't appear to be a suitable DataSet in
/usr/share/collectd/types.db by default.

I can hardly imagine I'm the first one who wants to do this, but I can't
find anything on the subject online so I might be looking completely wrong
at this subject.

When using snmpwalk I see the values I want to store, but when I ask
collectd to get these values like so:

<Data "sysName">
                Type "absolute"
                Table false
                Instance "SNMPv2-MIB"
                Values "sysName"
        </Data>

I can see in the log file that collectd gets the proper result, but doesn't
know what to do with it.

[2016-02-29 14:53:10] parse_value: Failed to parse string as absolute:
(null).
[2016-02-29 14:53:10] snmp plugin: csnmp_value_list_to_value: Parsing
string as absolute failed: *hostname1*
[2016-02-29 14:53:10] parse_value: Failed to parse string as absolute:
(null).
[2016-02-29 14:53:10] snmp plugin: csnmp_value_list_to_value: Parsing
string as absolute failed: *hostname2*

Do I need to define a custom data type for this, or is there something else
I should do to get these results?

Kind regards,

Niels

[Attachment #5 (text/html)]

<div dir="ltr">I would like to have collectd parse text values such as those found in \
&#39;system&#39; (sysName, sysContact, sysLocation and so on). While researching it \
seems that alphanumerical strings should be of the &#39;octet&#39; type, however \
there doesn&#39;t appear to be a suitable DataSet in /usr/share/collectd/types.db by \
default.<div><br></div><div>I can hardly imagine I&#39;m the first one who wants to \
do this, but I can&#39;t find anything on the subject online so I might be looking \
completely wrong at this subject.</div><div><br></div><div>When using snmpwalk I see \
the values I want to store, but when I ask collectd to get these values like \
so:</div><div><br></div><div><div>&lt;Data &quot;sysName&quot;&gt;</div><div>         \
Type &quot;absolute&quot;</div><div>                        Table false</div><div>    \
Instance &quot;SNMPv2-MIB&quot;</div><div>                        Values \
&quot;sysName&quot;</div><div>            \
&lt;/Data&gt;</div></div><div><br></div><div>I can see in the log file that collectd \
gets the proper result, but doesn&#39;t know what to do with \
it.</div><div><br><div><div>[2016-02-29 14:53:10] parse_value: Failed to parse string \
as absolute: (null).</div><div>[2016-02-29 14:53:10] snmp plugin: \
csnmp_value_list_to_value: Parsing string as absolute failed: \
<b><i>hostname1</i></b></div><div>[2016-02-29 14:53:10] parse_value: Failed to parse \
string as absolute: (null).</div><div>[2016-02-29 14:53:10] snmp plugin: \
csnmp_value_list_to_value: Parsing string as absolute failed: \
<b><i>hostname2</i></b></div></div></div><div><b><i><br></i></b></div><div>Do I need \
to define a custom data type for this, or is there something else I should do to get \
these results?</div><div><br></div><div>Kind \
regards,</div><div><br></div><div>Niels</div></div>



_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic