Drawing graph at grafana by using snmp_exporter

Hi All,
I am run smpwalk , I get the below integer result
snmpwalk -On -v 2c -c xxxxx yy.yy.yy.yy 1.3.6.1.4.1.23402.1.3.3.1
.1.3.6.1.4.1.23402.1.3.3.1 = INTEGER: 30

at snmp.yml file, I have created module: cagatay
*********************************************************-
cagatay:
auth:
community: xxxxxx
walk:

  • 1.3.6.1.4.1.23402.1.3.3.1
    get:
  • 1.3.6.1.4.1.23402.1.3.3.1
    metrics:
  • name: numIdleChannels
    oid: 1.3.6.1.4.1.23402.1.3.3.1
    type: INTEGER
    help: Number of channels in idle mode

at Grafana graph interface:


numIdleChannels{job=“snmp_cagatay”,instance=“yy.yy.yy.yy”}

But instead of drawing the integer values on Y axis for a timeseries, I got how many times I got values such as 29,30,31, etc in a scrape interval.

Could you please help me about how to draw the expected integer value on Y axis?
Do we need to make changes at snmp.yml file or need to correct the expression at “metrics” expression at grafana graph interface?

Did you always get the same value 30 each time you run the snmpwalk? or get different values?

of course different values at each query. this is live platform.
you can see below what I got after I tried to draw

Can you show the data in the prometheus?
I just want to know the data to make sure the query is right…

numIdleChannels is the name of the OID. (it is easy to understand that it shows the idle channels numbers at that time)
The value of this object is between 0 and 32
I can observe that I can get this value at backstage but I need to put this integer value to Y axis in a time series table. But instead of it, it is drawing how many times idle channel value is getting one of values betwwen 0-32 in a scrape interval as you can see below.

Maybe the metric expression should be changed to get the correct value.
existing metrics expression on graph interface is: numIdleChannels{job=“xxxx”,instance=“aa.bb.cc.dd”}

I mean in the prometheus Graph, ans use the query that you use in the grafana

Need to investigate the result… You can cover the sensitive data, BTW

same as grafana indeed

Definitely you can not show the numIdleChannels number, because it’s in the field, Prometheus just measure the metrics occurance of the numIdleChannels.
Maybe another solution can solve your problem

Or perhaps you need to change the snmp.yml to this

walk:

* 1.3.6.1.4.1.23402.1.3.3.1
get:
* 1.3.6.1.4.1.23402.1.3.3.1
metrics:
* name: numIdleChannels
oid: 1.3.6.1.4.1.23402.1.3.3.1
type: gauge
help: Number of channels in idle mode

Is it possible to achieve to get the value by making some changes on snmp.yml file?

another question is:
When I run the below snmpwalk, I just got the integer value (not the occurance) which I expect to see.
I have used the same OID in the snmp.yml file but prometheus is showing occurance of numIdleChannels. Is this a bug or need to make some changes on snmp.yml for the metric?
snmpwalk -On -v 2c -c xxxxx yy.yy.yy.yy 1.3.6.1.4.1.23402.1.3.3.1
.1.3.6.1.4.1.23402.1.3.3.1 = INTEGER: 30

I just following the snmp.yml that produce by snmp generator

Hi my firend,
Could you please reproduce the snmp.yml file by snmp-generator if I share the MIB file?
Thanks

You can download and build the generator then please follow the steps…

Hi,
we have tired but it was unsuccessful. Maybe the reason is version of OS (Red Hat Enterprise Linux Server release 6.8 (Santiago).
for now I do not have another option to find out a suitable machine to run snmp-exporter on right now.
Do you now if there is snmp-generator version for OS windows ?
Thnx