Code Monkey home page Code Monkey logo

Comments (14)

brian-brazil avatar brian-brazil commented on May 17, 2024

Can you confirm that ifDescr is missing for all interfaces?

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

I'm guessing this is GIGO then, and you've some empty ifDescrs which the go client rejects. Previously the python code would have silently passed on this bad result to Prometheus.

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

I would prefer to just have the index exposed instead.

That's something you configure. The config as-is tells us to use the ifDescr, which is an empty string.

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

That's something you configure. The config as-is tells us to use the ifDescr, which is an empty string.

I meant "if ifDescr is set, use that. If it's empty, fall back to using the index". This might need to be configurable as sometimes it might make sense to read out an empty value; though I doubt that in the case of tables.

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

If the OID is missing then that's what happens - however the empty string is a valid label value and for consistency will be treated as any other value.

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

In that case, the exporter needs to drop the duplicate values, ideally with error counter and log info, but expose all the other metrics. Or, alternatively, expose it all and let Prometheus drop what it does not want to ingest.

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

The way that the Go client works is that any small error stops everything. I don't plan on re-implementing all of the Go client's logic in the snmp exporter to produce a different way of handling bad input.

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

Just to make sure I am understanding correctly:

Any error within the Go client will lead to a state where no metrics are exposed to Prometheus nor log lines exposed on STDOUT/STDIN; the only thing that is returned is a text representation of the error via HTTP which does not conform to the exposition format. Thus, the only way to detect this is to look for up ==0 and then have a human look at the output of a HTTP call. This only works reliably if the error is not transient.

Is this correct?

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

Hmm, correction: The current version prints:

ERRO[0094] Error scraping target XXX: Error walking target XXX: Request timeout (after 3 retries)  source=collector.go:119

on log and

An error has occurred during metrics gathering:

error collecting metric Desc{fqName: "snmp_error", help: "Error scraping target", constLabels: {}, variableLabels: []}: Error walking target XXX: Request timeout (after 3 retries)

on HTTP.

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

Is this correct?

That's correct

The other error is when we make this happen on purpose, it's unrelated to this issue.

from snmp_exporter.

RichiH avatar RichiH commented on May 17, 2024

What would you suggest then? The current state seems to be less than ideal.

from snmp_exporter.

brian-brazil avatar brian-brazil commented on May 17, 2024

In this case you should change your module to not have a lookup on ifDescr. See #37 for the previous discussion on this.

from snmp_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.