Problems creating graph for NewTec modem

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Problems creating graph for NewTec modem

Post by mflage »

Hi there!

I'm trying to create some graphs for some NewTec modems we have running in our environment. So far I've created the following XML:

Code: Select all

<interface>
        <name>NewTec</name>
        <description>Getting SNMP values from NewTec modems</description>
        <oid_index>1.3.6.1.4.1.5835.3.1.13.1.50.1</oid_index>
        <index_order_type>numeric</index_order_type>

        <fields>
                <DmMeasEsNo>
                        <name>Es/No estimation</name>
                        <method>walk</method>
                        <source>VALUE/REGEXP:^0,(.*)$</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.13.1.50.1</oid>
                </DmMeasEsNo>

                <MoOutLevelDet>
                        <name>Modulator output level measurement</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.3.1.75.1.1</oid>
                </MoOutLevelDet>

                <DmMeasAGC>
                        <name>Receive level</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.13.1.15.1</oid>
                </DmMeasAGC>

                <DmEstLinMar>
                        <name>Link margin</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.13.1.32.1.1</oid>
                </DmEstLinMar>

                <MoOutputLevel>
                        <name>Output level</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.3.1.29.1.1</oid>
                </MoOutputLevel>
        </fields>
</interface>
Here I'm definitely not sure what I'm doing, but I've tried following examples I could find online. The stuff I'm uncertain about is the use of direction (input vs output) and method (walk vs get). The same goes for the oid_index, what it really refers to and how it should be specified. From what I've read you use input direction for values that should be used as "descriptive fields" (whatever that means in this context) and output is for stuff that should be graphed. I want to graph all the different fields, but setting direction to output means I get no values when doing a verbose query on the host. So I'm totally lost and I basically have no idea what I'm doing here.

Here's the values I'm interested in:

MoOutLevelDet : 1.3.6.1.4.1.5835.3.1.3.1.75.1.1
MoOutputLevel : 1.3.6.1.4.1.5835.3.1.3.1.29.1.1.[1 .. 2]
DmMeasAGC: 1.3.6.1.4.1.5835.3.1.13.1.15.1.1
DmMeasEsNo: 1.3.6.1.4.1.5835.3.1.13.1.50.1
DmEstLinMar: 1.3.6.1.4.1.5835.3.1.13.1.32.1.1

And here's the example when doing snmpwalk from the command line:

Code: Select all

$ snmpwalk -Os -c public -v 1 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.50.1
iso.3.6.1.4.1.5835.3.1.13.1.50.1.1 = STRING: "0,13.25"
$ snmpwalk -Os -c public -v 1 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75.1.1
iso.3.6.1.4.1.5835.3.1.3.1.75.1.1 = STRING: "-11.9"
$ snmpwalk -Os -c public -v 1 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.15.1
iso.3.6.1.4.1.5835.3.1.13.1.15.1.1 = STRING: "-28.76"
$ snmpwalk -Os -c public -v 1 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.32.1.1
iso.3.6.1.4.1.5835.3.1.13.1.32.1.1 = STRING: "0.83"
$ snmpwalk -Os -c public -v 1 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.29.1.1
iso.3.6.1.4.1.5835.3.1.3.1.29.1.1.1 = STRING: "-12.5"
iso.3.6.1.4.1.5835.3.1.3.1.29.1.1.2 = STRING: "ERROR:DATA SYNTAX"
And here's the output from verbose query when looking at the device:

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/newtec.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.5835.3.1.13.1.50.1'
+ Index found at OID: '1.3.6.1.4.1.5835.3.1.13.1.50.1.1' value: '0,13.23'
+ Located input field 'DmMeasEsNo' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.5835.3.1.13.1.50.1'
+ Found item [DmMeasEsNo='13.22'] index: 1 [from regexp value parse]
+ Located input field 'MoOutLevelDet' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.5835.3.1.3.1.75.1.1'
+ Located input field 'DmMeasAGC' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.5835.3.1.13.1.15.1'
+ Found item [DmMeasAGC='-28.77'] index: 1 [from value]
+ Located input field 'DmEstLinMar' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.5835.3.1.13.1.32.1.1'
+ Located input field 'MoOutputLevel' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.5835.3.1.3.1.29.1.1'
+ Found item [MoOutputLevel='-12.5'] index: 1 [from value]
+ Found item [MoOutputLevel='ERROR:DATA SYNTAX'] index: 2 [from value]
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/newtec.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/newtec.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/newtec.xml'
Where/how do I go from here? I want one graph for each of these fields associated with each host. Have I gotten the fields correctly?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems creating graph for NewTec modem

Post by gandalf »

Did you follow the Data Query walkthrough at 1st link of my sig?
R.
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Re: Problems creating graph for NewTec modem

Post by mflage »

gandalf wrote:Did you follow the Data Query walkthrough at 1st link of my sig?
R.
Believe me, I've tried. But that doesn't apply to me at all. My MIBs are nothing like that and I have no idea how my MIB table looks. As it says in the walkthrough: "The starting point will be snmptable for a well know table of the HOSTS MIB". Well, this is NOT a well known table and I have no idea how my snmptable looks.

I've tried to isolate this and have just focused on one of the values I'm interested in to begin with, basically the Es/No estimation value that should be in OID .1.3.6.1.4.1.5835.3.1.13.1.50.1.1, as confirmed by snmpwalk/snmpget:

Code: Select all

$ snmpget -Os -c public -v 1 10.1.1.23 .1.3.6.1.4.1.5835.3.1.13.1.50.1.1
iso.3.6.1.4.1.5835.3.1.13.1.50.1.1 = STRING: "0,13.17"
$ snmpwalk -Os -c public -v 1 10.1.1.23 .1.3.6.1.4.1.5835.3.1.13.1.50.1.1
iso.3.6.1.4.1.5835.3.1.13.1.50.1.1 = STRING: "0,13.00"
But I'm not able to use method=get or direction=output in my XML. If I change any of those to something else than method=walk and direction=input, the query returns no values. I also get returned no values if I use .1.3.6.1.4.1.5835.3.1.13.1.50.1.1 as OID - I need to use .1.3.6.1.4.1.5835.3.1.13.1.50.1 (omitted the last 1). What going on here? What am I doing wrong?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems creating graph for NewTec modem

Post by gandalf »

mflage wrote:MoOutLevelDet : 1.3.6.1.4.1.5835.3.1.3.1.75.1.1
MoOutputLevel : 1.3.6.1.4.1.5835.3.1.3.1.29.1.1.[1 .. 2]
DmMeasAGC: 1.3.6.1.4.1.5835.3.1.13.1.15.1.1
DmMeasEsNo: 1.3.6.1.4.1.5835.3.1.13.1.50.1
DmEstLinMar: 1.3.6.1.4.1.5835.3.1.13.1.32.1.1
So we should start here to verify, if this is a Data Query use case at all (data queries apply to some tabular data; in case it's not a table, we can't use a data query).
For that, I need _complete_ output of snmpwalk against

1.3.6.1.4.1.5835.3.1.3.1.75
1.3.6.1.4.1.5835.3.1.3.1.29
1.3.6.1.4.1.5835.3.1.13.1.15
1.3.6.1.4.1.5835.3.1.13.1.50
1.3.6.1.4.1.5835.3.1.13.1.32

You may post the MIB file for that very device as well
R.
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Re: Problems creating graph for NewTec modem

Post by mflage »

gandalf wrote:So we should start here to verify, if this is a Data Query use case at all (data queries apply to some tabular data; in case it's not a table, we can't use a data query).
For that, I need _complete_ output of snmpwalk against

1.3.6.1.4.1.5835.3.1.3.1.75
1.3.6.1.4.1.5835.3.1.3.1.29
1.3.6.1.4.1.5835.3.1.13.1.15
1.3.6.1.4.1.5835.3.1.13.1.50
1.3.6.1.4.1.5835.3.1.13.1.32
Here's the most complete snmpwalk I believe I'm able to give you. I'm a bit uncertain as to what you mean by "_complete_" here? Is there some argument to snmpwalk I'm not familiar with?

Code: Select all

$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75
iso.3.6.1.4.1.5835.3.1.3.1.75.1.1 = STRING: "-11.9"
$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.29
iso.3.6.1.4.1.5835.3.1.3.1.29.1.1.1 = STRING: "-12.5"
iso.3.6.1.4.1.5835.3.1.3.1.29.1.1.2 = STRING: "ERROR:DATA SYNTAX"
$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.15
iso.3.6.1.4.1.5835.3.1.13.1.15.1.1 = STRING: "-29.40"
$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.50
iso.3.6.1.4.1.5835.3.1.13.1.50.1.1 = STRING: "0,12.79"
$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.32
iso.3.6.1.4.1.5835.3.1.13.1.32.1.1 = STRING: "0.28"
But I have actually been able to graph all values except the one from OID 1.3.6.1.4.1.5835.3.1.13.1.50 ("0,12.79"), since I have to perform a regexp (I'm only interested in "12.79") for that. So right now that's the only OID I'm interested in graphing.
gandalf wrote: You may post the MIB file for that very device as well
I'm going to contact newtec.be about those MIB files, since I don't have them currently. Hopefully I'll receive an answer swiftly :)
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Re: Problems creating graph for NewTec modem

Post by mflage »

*bump*
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems creating graph for NewTec modem

Post by gandalf »

mflage wrote:

Code: Select all

$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75
iso.3.6.1.4.1.5835.3.1.3.1.75.1.1 = STRING: "-11.9"
As this is the only data returned, it seems to me that an index Data Query is not required at all (but surely, it may happen, that it IS an indexed table with a single index only).
This is why I require the MIB.
You may even try to run

Code: Select all

snmptable ... 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75
to know
R.
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Re: Problems creating graph for NewTec modem

Post by mflage »

gandalf wrote: You may even try to run

Code: Select all

snmptable ... 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75
to know
R.

Code: Select all

$ snmptable -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.3.1.75
Was that a table? iso.3.6.1.4.1.5835.3.1.3.1.75
So I guess it's not a table? What does that mean in practice?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems creating graph for NewTec modem

Post by gandalf »

That means you implemented sheer overkill.
A copy of the standard OID template would have been enough, then. See 1st link of my sig to know how to craete a single OID template
R.
mflage
Posts: 6
Joined: Fri Mar 23, 2012 4:21 am

Re: Problems creating graph for NewTec modem

Post by mflage »

gandalf wrote:That means you implemented sheer overkill.
A copy of the standard OID template would have been enough, then. See 1st link of my sig to know how to craete a single OID template
R.
Hm, but I believe I have to do some regex on the value returned by the SNMP query and that's the reason why I can't do this directly. The OID I'm looking for is this:

Code: Select all

$ snmpwalk -v1 -cpublic 10.1.1.23 1.3.6.1.4.1.5835.3.1.13.1.50
iso.3.6.1.4.1.5835.3.1.13.1.50.1.1 = STRING: "0,12.79"
Since "12.79" is the value I need to graph, I need to massage this value to get out the correct information. That's why I used the following in my XML:

Code: Select all

                <DmMeasEsNo>
                        <name>Es/No estimation</name>
                        <method>walk</method>
                        <source>VALUE/REGEXP:^0,(.*)$</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.5835.3.1.13.1.50.1</oid>
                </DmMeasEsNo>
I'm not able to use any other operations inside Cacti to get out just this value?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Problems creating graph for NewTec modem

Post by gandalf »

Yep, I missed that.
Of course, you may mimic the regexp when using a script implemented as a Data Input Method.
But then, both methods have their own drawbacks, and it's a philosophic discussion which may hurt more ...
R.
blackpusat
Posts: 1
Joined: Mon Jul 03, 2023 8:03 am

Re: Problems creating graph for NewTec modem

Post by blackpusat »

Hello,
Could you please share the cacti template file you used for the newtec modem with me?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests