Closed DirkFries closed 2 years ago
Hello.
The exporter Is a black box style exporter, you need to configure it as a target on a Prometheus instance for it to start polling. If you Google around a bit there should be plenty of material how they work. Happy to accept a PR with an example when you have one
Hello,
thank you very much for your answer. Of course the next step would be to scrape http://myhost:9747/metrics with my prometheus instance to get the metrics into prometheus. But I think it makes no difference if http://myhost:9747/metrics is opened by a prometheus or a browser. My problem is, that the spektrum_virtualize_exporter does even't try to connect to the targets if I open up http://myhost:9747/metrics
Bye, Dirk
The endpoint /metrics
is for exporter-internal metrics. You need to call /probe
. Try http://myhost:9747/probe?target=http://v3700:8443
.
Like this:
- job_name: spectrum_virtualize
metrics_path: /probe
scheme: http
relabel_configs:
- source_labels: [__address__]
separator: ;
regex: (.*)
target_label: __param_target
replacement: $1
action: replace
- source_labels: [__address__]
separator: ;
regex: (?:.+)(?::\/\/)([^:]*).*
target_label: instance
replacement: $1
action: replace
- separator: ;
regex: (.*)
target_label: __address__
replacement: 'your-spectrum-exporter:9747'
action: replace
static_configs:
- targets:
- https://your-v7000-here:7443
As I mentioned before, this is a black box exporter - not a regular exporter. On black box exporters /metrics
is not really useful unless you are debugging the exporter itself.
Ashes on my head ! Now I know that mean with "black box".
Thanks a lot for your hint ! :-)
Hi @all, I built the exporter and basically it does run, but I can not see any outgoing packets to the system that should be monitored.
My yaml File looks like this:
If I start the exporter like this ...
... it is able to read the monitor.yaml file and read my API configuration, but after this it just hangs.
If I do a tcpdump to see any packets between my machine and the Spektrum targets I see not a single packet. What does work is the webserver. If I connect to my machine port 9747 I get
I have also prepared an strace file that might be helpful:
file.txt
Tested both on Ubuntu 22.04 and Almalinux 8 with the same behavior. Expected behavior: Seeing outgoing to the spektrum target and, if configured properly, seeing metrics of that target at the output of the webserver.
Does anyone have a hint what is wrong ?
Bye, Dirk