Closed sbates130272 closed 4 years ago
I realized this issue before, at that time it was only used in our internal, so no neefto fix this as we have accurate list of servers.
I will take some time to find a solution for it, but may not be so quick.
Thanks @jenningsloy318. We may also devote some engineering cycles to this by forking your repo and sending PRs back to you.
Awsome, very Appreciate your contribution.
Hi @sbates130272 I update the code of error handling, can you please build it and tried it again ?
Actually, I usually add a default password in the config, when no password found, it will use the default one, this can also resolve such issue.
Thanks @jenningsloy318. I can confirm that master now does not fail if I enter an non-existant hostname **as long as I also add a default credential section to the redfish.yml
config file.
I think in order to close this issue we need to update the README.md
to include that. I have a couple of other things I would like to add to that file so I will do a PR for that.
When running
redfish_exporter
we can cause it to fatally error by entering an IP or hostname that does not exist in theredfish.yml
configuration file. This is not a robust solution because we can't expect the client to always get things right and we can't expect IP addresses and hostnames to always be constant and always be online.Make the application more robust and return a sane message if the client tries to scrape a target that is not in the configuration file.