Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration: multiple configs #85

Closed
glensc opened this issue Nov 18, 2016 · 12 comments
Closed

configuration: multiple configs #85

glensc opened this issue Nov 18, 2016 · 12 comments
Labels

Comments

@glensc
Copy link

glensc commented Nov 18, 2016

please add support for multiple configuration files

so i could use unmodified snmp.yml for the oid/metrics configuration

and have secondary file for configuring authentication:
https://github.com/prometheus/snmp_exporter#snmpv2

or perhaps allow authentication configured from commandline like haproxy exporter does?

@brian-brazil
Copy link
Contributor

You can put multiple modules inside the one config file.

@RichiH
Copy link
Member

RichiH commented Nov 18, 2016

Supporting different auth tokens would be appreciated from our side as well.

As this is stored in our CMDB and available via SD, this should align with Prometheus patterns. I don't care if the actual community is stored in snmp_exporter and accessed via a group parameter sent from Prometheus or stored in Prometheus config. Having a default that's used when nothing special is requested would also be useful but not essential.

@brian-brazil
Copy link
Contributor

The Prometheus pattern for auth is one per scrape_config, so the snmp_exporter way of working aligns with that (indeed the snmp_exporter is a little more flexible).

@glensc
Copy link
Author

glensc commented Nov 18, 2016

@brian-brazil your suggestion is counter suggestion. i wanted to put my config to separate file so that i can update the snmp.yml from this repo without manually merging changes.

@brian-brazil
Copy link
Contributor

That's not something that we'll be supporting. Merging multiple configs would likely only cause confusion.

@glensc
Copy link
Author

glensc commented Nov 19, 2016

perhaps move the walk and metrics themselves as separate files? or add @include directive?

default:
  version: 2
  auth:
    community: public
  walk:
    - 1.3.6.1.2.1.1.3
    - 1.3.6.1.2.1.2
    - 1.3.6.1.2.1.31.1.1
  metrics:
    - @include: linux-ifdescr.xml

@RichiH
Copy link
Member

RichiH commented Nov 19, 2016 via email

@glensc
Copy link
Author

glensc commented Nov 19, 2016

@RichiH please read the issue initial description WHY. i wish to avoid merging configs manually in the future when i plan to update the software. currently i had to modify the snmp.xml to add auth credentials, there may come more options that need to configure. and walk and metrics definitions are complex, could easily break them, which can be avoided if i just define my customizations in other place than stock provided snmp.xml file.

@RichiH
Copy link
Member

RichiH commented Nov 19, 2016 via email

@glensc
Copy link
Author

glensc commented Nov 19, 2016

closing, seems upstream does not want any improvements and better maintainability of complex config.

@RichiH
Copy link
Member

RichiH commented Feb 25, 2021

@RichiH
Copy link
Member

RichiH commented Mar 15, 2021

One consideration: Should we make the order deterministic, follow the order on CLI, or not do anything special at all?

I think deterministic makes sense. While we hard fail on day 1, that might not always be the case (however unlikely). The other reason is that when we expose this in the UI and if we expose this as _info metrics, it's easier to compare long-term and between installations when it's sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants