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

List:       collectd
Subject:    Re: [collectd] collectd Digest, Vol 125, Issue 21
From:       Jan_VĂ­tek <mail () janvitek ! com>
Date:       2016-02-29 11:39:53
Message-ID: CAFCOdJ_wN5qYbBjgBx0VMvB=FsyUPm5rr=L-ERSYXqSDbu=DNw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

i had similar problem however I don't think my sollution is suitable for
you. One type of my devices returned "normal operation" and "active alarm"
strings instead of simple 0/1. I made custom alphabet of 40 characters and
changed thde snmp plugin. Now if it finds a string in returned gauge value
it takes first 11 characters and converts it to 32 bit integer. In the
frontend application I have simple parser to convert it back to string.

Advantage of this approach is that it lets you use threshold plugin on the
returned values or visualize them as a chart. I think main disadvantage is
the 11 characters constraint.  Other disadvantage is the need of
modification both collectd and frontend application.

I could make a patch from my sollution if you'd be interested.

Kind regards,
Jan Vitek



2016-02-29 12:00 GMT+01:00 <collectd-request@verplant.org>:

> Send collectd mailing list submissions to
>         collectd@verplant.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mailman.verplant.org/listinfo/collectd
> or, via email, send a message with subject or body 'help' to
>         collectd-request@verplant.org
>
> You can reach the person managing the list at
>         collectd-owner@verplant.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of collectd digest..."
>
>
> Today's Topics:
>
>    1. how to collect string values with snmp plugin (Niels Tomey)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 29 Feb 2016 15:58:12 +0800
> From: Niels Tomey <niels@ixs.ph>
> To: collectd@verplant.org
> Subject: [collectd] how to collect string values with snmp plugin
> Message-ID:
>         <CALhsmHOTvbw-qz_a-=
> 5nL5X1FKd9o49LhHiDS3dvJpOVyb6n5w@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.verplant.org/pipermail/collectd/attachments/20160229/924ec7bb/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> collectd mailing list
> collectd@verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
>
> ------------------------------
>
> End of collectd Digest, Vol 125, Issue 21
> *****************************************
>

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div><br></div><div>i had similar problem however I don&#39;t think \
my sollution is suitable for you. One type of my devices returned &quot;normal \
operation&quot; and &quot;active alarm&quot; strings instead of simple 0/1. I made \
custom alphabet of 40 characters and changed thde snmp plugin. Now if it finds a \
string in returned gauge value it takes first 11 characters and converts it to 32 bit \
integer. In the frontend application I have simple parser to convert it back to \
string.</div><div><br></div><div>Advantage of this approach is that it lets you use \
threshold plugin on the returned values or visualize them as a chart. I think main \
disadvantage is the 11 characters constraint.   Other disadvantage is the need of \
modification both collectd and frontend application.</div><div><br></div><div>I could \
make a patch from my sollution if you&#39;d be \
interested.</div><div><br></div><div>Kind regards,</div><div>Jan \
Vitek</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">2016-02-29 12:00 GMT+01:00  <span dir="ltr">&lt;<a \
href="mailto:collectd-request@verplant.org" \
target="_blank">collectd-request@verplant.org</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
                solid;padding-left:1ex">Send collectd mailing list submissions to<br>
            <a href="mailto:collectd@verplant.org">collectd@verplant.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
            <a href="http://mailman.verplant.org/listinfo/collectd" rel="noreferrer" \
target="_blank">http://mailman.verplant.org/listinfo/collectd</a><br> or, via email, \
                send a message with subject or body &#39;help&#39; to<br>
            <a href="mailto:collectd-request@verplant.org">collectd-request@verplant.org</a><br>
 <br>
You can reach the person managing the list at<br>
            <a href="mailto:collectd-owner@verplant.org">collectd-owner@verplant.org</a><br>
 <br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of collectd digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
     1. how to collect string values with snmp plugin (Niels Tomey)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 29 Feb 2016 15:58:12 +0800<br>
From: Niels Tomey &lt;<a href="mailto:niels@ixs.ph">niels@ixs.ph</a>&gt;<br>
To: <a href="mailto:collectd@verplant.org">collectd@verplant.org</a><br>
Subject: [collectd] how to collect string values with snmp plugin<br>
Message-ID:<br>
            &lt;CALhsmHOTvbw-qz_a-=<a \
href="mailto:5nL5X1FKd9o49LhHiDS3dvJpOVyb6n5w@mail.gmail.com">5nL5X1FKd9o49LhHiDS3dvJpOVyb6n5w@mail.gmail.com</a>&gt;<br>
                
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
I would like to have collectd parse text values such as those found in<br>
&#39;system&#39; (sysName, sysContact, sysLocation and so on). While researching \
it<br> seems that alphanumerical strings should be of the &#39;octet&#39; type, \
however<br> there doesn&#39;t appear to be a suitable DataSet in<br>
/usr/share/collectd/types.db by default.<br>
<br>
I can hardly imagine I&#39;m the first one who wants to do this, but I can&#39;t<br>
find anything on the subject online so I might be looking completely wrong<br>
at this subject.<br>
<br>
When using snmpwalk I see the values I want to store, but when I ask<br>
collectd to get these values like so:<br>
<br>
&lt;Data &quot;sysName&quot;&gt;<br>
                        Type &quot;absolute&quot;<br>
                        Table false<br>
                        Instance &quot;SNMPv2-MIB&quot;<br>
                        Values &quot;sysName&quot;<br>
            &lt;/Data&gt;<br>
<br>
I can see in the log file that collectd gets the proper result, but doesn&#39;t<br>
know what to do with it.<br>
<br>
[2016-02-29 14:53:10] parse_value: Failed to parse string as absolute:<br>
(null).<br>
[2016-02-29 14:53:10] snmp plugin: csnmp_value_list_to_value: Parsing<br>
string as absolute failed: *hostname1*<br>
[2016-02-29 14:53:10] parse_value: Failed to parse string as absolute:<br>
(null).<br>
[2016-02-29 14:53:10] snmp plugin: csnmp_value_list_to_value: Parsing<br>
string as absolute failed: *hostname2*<br>
<br>
Do I need to define a custom data type for this, or is there something else<br>
I should do to get these results?<br>
<br>
Kind regards,<br>
<br>
Niels<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://mailman.verplant.org/pipermail/collectd/attachments/20160229/924ec7bb/attachment-0001.html" \
rel="noreferrer" target="_blank">http://mailman.verplant.org/pipermail/collectd/attachments/20160229/924ec7bb/attachment-0001.html</a>&gt;<br>
 <br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
collectd mailing list<br>
<a href="mailto:collectd@verplant.org">collectd@verplant.org</a><br>
<a href="http://mailman.verplant.org/listinfo/collectd" rel="noreferrer" \
target="_blank">http://mailman.verplant.org/listinfo/collectd</a><br> <br>
<br>
------------------------------<br>
<br>
End of collectd Digest, Vol 125, Issue 21<br>
*****************************************<br>
</blockquote></div><br></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