Giter VIP home page Giter VIP logo

Comments (15)

RichiH avatar RichiH commented on May 23, 2024

Data point: just got bitten by that again.

from snmp_exporter.

SuperQ avatar SuperQ commented on May 23, 2024

And again!

from snmp_exporter.

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

The generator handles this automatically.

from snmp_exporter.

RichiH avatar RichiH commented on May 23, 2024

from snmp_exporter.

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

It ensures all required OIDs are walked.

from snmp_exporter.

SuperQ avatar SuperQ commented on May 23, 2024

The generator doesn't prevent users from making their own invalid configs. I think we should fix this eventually, I just don't think it's a big priority.

from snmp_exporter.

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

I think if a user is hand generating a config they're on their own. There's many things we can't check for them, such as index types and data types.

from snmp_exporter.

SuperQ avatar SuperQ commented on May 23, 2024

Totally, that's why I marked this as enhancement, not bug. Config validation would be a nice to have. We can improve on it incrementally.

from snmp_exporter.

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

There's no need for config validation. Only the generator should be producing configs, and any issues handled as bugs there. For this particular issue this is already handled and unittested.

The exporter is a dumb tools that'll do exactly what you tell it to, even if that doesn't make sense. Manual generation of configs was only a temporary thing until we had the generator.

from snmp_exporter.

RichiH avatar RichiH commented on May 23, 2024

Reality is that configs are still baked by hand, both by old and new users. Basic error checking is not an anti-pattern, so re-opening.

from snmp_exporter.

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

I'm not willing to add complexity to support users using this tool in a non-recommended fashion. All MIB-related logic including this is designed to belong in the generator, and only the generator. Adding something like this would make potential features like #131 more difficult than they already are to implement, as that requires sophisticated selection of what to walk.

If users insist on hand creating configs, they are free to write their own validation tools.

from snmp_exporter.

RichiH avatar RichiH commented on May 23, 2024

This is not about selecting anything outside of what's in the (currently named) walk: section, it's merely about not silently coming up empty when a data structure does not hold the expected information.

I would like to avoid open/close ping-pong, but either I am misunderstanding your concern about complexity or you are somewhat driven by "well, don't do that, then".

from snmp_exporter.

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

It's a mix. This doesn't fit architecturally and it'd get in the way of future features/optimisations. That the use case for this comes from something users aren't meant to be doing doesn't provide a strong case to override those concerns.

from snmp_exporter.

RichiH avatar RichiH commented on May 23, 2024

https://docs.google.com/document/d/1McJJIiJfHgoecVrVNXx4ABJmI5M21e-6O9IgMNbVnvw

from snmp_exporter.

RichiH avatar RichiH commented on May 23, 2024

On top of logging, we should also expose this as a counter.

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.