We’re using PMM for all our metric gathering fun, and I was looking to add some stats from a firewall via snmp using the prometheus snmp exporter.
It uses a query string on the http request to specify some parameters, but when attempting to configure PMM paths it strips off the query string so trying to configure
/snmp is kept and used by PMM.
Is there a way to include a query string with the path?
Can you provide us with how you are adding this external exporter to your PMM?
It hasn’t seemed to matter (I tried
pmm-admin and the UI) but for example:
# pmm-admin add external --listen-port=9116 --service-name=snmp_target --metrics-path="snmp?module=if_mib&target=18.104.22.168"
Hi @Julian_Davison , I was able to successfully scrape Netdata using PMM by passing
/api/v1/allmetrics?format=prometheus to the
metrics_path option when using the syntax:
pmm-admin add external-serverless ...
So you’re really close, just swap out
external-serverless and it should work
Thank you, @Michael_Coburn !
That’s almost solved the problem - the external-serverless does include the entire string, but unfortunately it’s escaping the
%3F (so requesting
/snmp%3Fmodule=if_mib&target=192.168.42.1 rather than
/snmp?module=if_mib&target=192.168.42.1 which the snmp exporter doesn’t cope with.
Is there a way to stop the encoding?
Interesting issue. Did you try quoting it, for example:
pmm-admin add external-serverless --metrics-path="/snmp?module..."
In my case I actually didn’t use the cmd line, I used the GUI to add my external-serverless instance. This might be a second option for you to try, using the Add External Instance GUI
I have the exact same problem.
pmm-admin add external-serverless --host=test.something --listen-port=3000 --metrics-path=‘/jobs/metrics?something’ --custom-labels=app=web --server-insecure-tls --scheme=http --external-name=web
Connection check failed: Get “http://test.something:3000/jobs/metrics%3Fsomething”: dial tcp:
adding --skip-connection-check fix problem.
Interestingly, it was not possible to add from graphan GUI (same problem).
Unfortunately, yes, I did not find that quoting it on the command line helped, and the GUI gave me the same result using both “set manually” and “parse from URL string” options.
The issue still exists in 2.31.0
Hi @Julian_Davison , @Seweryn_Ozog -
I’ve escalated this within Percona, we’ll get back to you as soon as possible. Thanks!