bluecmd / spectrum_virtualize_exporter

Prometheus exporter for IBM Spectrum Virtualize compatible SANs
8 stars 8 forks source link

Unable to see spectrum_* stats #1

Closed crooks closed 3 years ago

crooks commented 3 years ago

Hi, Thanks for taking the time to write this exporter. I'm trying to use it to monitor some IBM Flashsystem 9150's. My spectrum-monitor.yaml contains:

"https://host1:7443":
    user: myuid
    password: mypw

When I start the exporter, I get:

Loaded 1 API credentials
Spectrum Virtualize exporter running, listening on ":9747"

When I visit the URL (http:hostname:9747/metrics), all I see are the generic exporter stats, such as: go_info{version="go1.14.7"} 1 There are no spectrum_* metrics. No log messages are received from the exporter to suggest a problem (or a lack of problem). Any suggestions to help with debugging?

Many thanks, Steve

bluecmd commented 3 years ago

Hello!

Thanks for the interest in the exporter! :-)

You need to use it as a blackbox exporter, like this:

curl -G --data-urlencode "target=https://host1:7443" http://hostname:9747/probe

For Prometheus something like this would work:

  - job_name: spectrum_virtualize
    scrape_interval: 5s
    metrics_path: /probe
    static_configs:
      - targets:
        - https://host1:7443
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__address__]
        target_label: instance
        # Drop the https:// and port (if specified) for the 'instance=' label
        regex: '(?:.+)(?::\/\/)([^:]*).*'
      - target_label: __address__
        replacement: 'this-is-where-the-exporter-runs.corp.local:9747'

I should probably add this to the README.md when I get time, contributions are of course welcome! :D

bluecmd commented 3 years ago

I will close this now, but feel free to ping me to re-open if you are still unable to use it!