Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOnly first module is working in SNMP-exporter job #4345
Comments
This comment has been minimized.
This comment has been minimized.
|
This is as expected, the snmp_exporter only looks at the the first module URL parameter. You'll need to create a single combined module. |
This comment has been minimized.
This comment has been minimized.
|
while module param is an array, multi modules seems work. if only one module is work, it should be a value. |
This comment has been minimized.
This comment has been minimized.
|
HTTP supports multiple URL parameters with the same name, the snmp exporter does not. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil What if we changed the config parser to support both single and lists. params:
module: foo
other_param:
- foo
- barThis would make it less confusing for users. |
This comment has been minimized.
This comment has been minimized.
|
We've discussed this before, it can't be made to work as different modules can have conflicting settings. This is something to be dealt with with configuration management. |
This comment has been minimized.
This comment has been minimized.
|
No, I didn't mean changing the Right now it uses a very simple conversion of yaml to Go |
This comment has been minimized.
This comment has been minimized.
|
I still think the multi modules is better solution. For example, I have 3 types of device, all support net_snmp and private mibs. It is more structured to make 4 modules(1 net-snmp and 3 private mibs) in snmp.yml, and than add 3 jobs which contains net-snmp and 1 private mib in prometheus. |
This comment has been minimized.
This comment has been minimized.
|
Allowing for a given field to be more than one type sounds like a recipe for confusion to me. |
This comment has been minimized.
This comment has been minimized.
|
I would like to consider it to be a feature which make the configuration more structured. |
This comment has been minimized.
This comment has been minimized.
|
It'd make the configuration less structured, as it'd no longer have a single schema. |
This comment has been minimized.
This comment has been minimized.
|
Is there some actual problem you're having that would be solved by changing this? |
This comment has been minimized.
This comment has been minimized.
|
I combined the 2 modules as a workaround. I think we mean different structured in this case. I mean refactoring duplicated mibs into one or more module could make the snmp.yml more structured. Then I would config the modules in the prometheus explicitly. While the snmp which work with one module at one time, maybe it could combine the modules in snmp-exporter runtime. |
This comment has been minimized.
This comment has been minimized.
|
Combining the modules is the correct and only solution, this isn't something that either the exporter nor generator can offer due to the potential for conflicts. |
This comment has been minimized.
This comment has been minimized.
|
This has gone stale, and I don't think there's anything for us to do here. |
highkay commentedJul 4, 2018
Bug Report
What did you do?
config 2 modules(sslvpn and common) in snmp.yml of snmp-exporter and scrape them from prometheus.
What did you expect to see?
all 2 modules are correctly scraped.
What did you see instead? Under which circumstances?
only the 1st module is scraped. I figured it out in snmp-exporter log.
Environment
System information:
Linux 3.10.0-693.2.2.el7.x86_64 x86_64
Prometheus version:
(version=2.3.1, branch=HEAD, revision=188ca45bd85ce843071e768d855722a9d9dabe03)
Alertmanager version:
Prometheus configuration file:
logs of snmp-exporter