PureStorage-OpenConnect / pure-fa-openmetrics-exporter

Pure Storage OpenMetrics exporter for FlashArray
Apache License 2.0
18 stars 26 forks source link

Error in token file: [-t|--tokens] stat /opt/pure-fa-exporter/fa.yaml: no such file or directory #60

Closed donrammer closed 9 months ago

donrammer commented 1 year ago

Hi all

When launching the fa exporter in docker, and using the -t switch to add the .yaml file for the tokens, I receive:

Error in token file: [-t|--tokens] stat /opt/pure-fa-exporter/fa.yaml: no such file or directory

My docker run command is:

docker run -d -p 9490:9490 --name pure-fa-om-exporter quay.io/purestorage/pure-fa-om-exporter -t /opt/pure-fa-exporter/fa.yaml

The file exists, and the contents are:

array_id1: address: PUREARRAYFQDN api_token: 7**8

Any help is appreciated

Thanks

Rich

6r1zzlyB commented 1 year ago

From the notes I've read, it looks like your yaml file is not indented correctly.

array_id1:
  address: 172.31.146.70
  api_token: 4b84cabd-*****
array_id2:
  address: 172.31.146.80
  api_token: b8605f85-*******

Also, are you passing '/opt/pure-fa-exporter' as a reachable volume to the container?

donrammer commented 1 year ago

"Also, are you passing '/opt/pure-fa-exporter' as a reachable volume to the container?"

Thanks, this was my mistake, this was the issue.

I am now facing an issue, where everything is configured and running, however:

1) Grafana -> Promtheus (Works)

2) Prometheus -> Pure Exporter (Showing as valid targets, but scrape stats are all 0)

3) Pure Array -> Pure Exporter (Works and shows valid stats for each array)

Following the guide above and using the example .yml configs and replacing the targets and exporter IP, is there anything esle that would prevent the 2nd layer above working?

genegr commented 11 months ago

@donrammer What are you using as the endpoint parameter in the Prometheus config file? When the tokens file is used the endpoint must be the key of each value in the yaml dictionary that defines the arrays.