jenningsloy318 / redfish_exporter

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers
Apache License 2.0
70 stars 62 forks source link

Error getting credentialfor target 10.10.10.2 file: no credentials found for target 10.10.10.2 #3

Closed matejzero closed 4 years ago

matejzero commented 4 years ago

I'm getting the error in the title and I don't know what I'm doing wrong.

My config.yaml looks like:

hosts:
  10.10.10.2:
    username: monitor
    password: bbccbbcc

and I start the exporter with ./redfish_exporter --config.file="/root/config.yaml". I then call http://home.example.org:9610/redfish?target=10.10.10.2 and get the error in the title in the console.

INFO[0000] redfish_exporter version 0.10.1, build reversion 56a0ceab10f9632997f1c4b6b08c51c7e80ab94d, build branch master, build at Fri Oct 25 12:24:23 DST 2019 on host CTUN50947963A    source="main.go:65"
INFO[0000] Starting redfish_exporter                     source="main.go:72"
INFO[0000] Loaded config file                            source="config.go:42"
INFO[0000] Listening on :9610                            source="main.go:97"
INFO[0005] Scraping target 10.10.10.2               source="main.go:37"
FATA[0005] Error getting credentialfor target 10.10.10.2 file: no credentials found for target 10.10.10.2  source="main.go:42"

What am I doing wrong? I noticed the same issue already closed but no solution.

Thanks, Matej

jenningsloy318 commented 4 years ago

Hi,does you account have admin permission?

matejzero commented 4 years ago

No, it has only read-only permissions.

I tried changing to admin permissions, but no luck. I also don't see requests sent to redfish API with tcpdump.

jenningsloy318 commented 4 years ago

Can you try to add admin permission?as some info retrieved by redfish should have admin permission.

matejzero commented 4 years ago

Looking at the code, this error happens before any request is sent to Redfish.

jenningsloy318 commented 4 years ago

Can you try to rename the IP to default in the redfish config? This code is to search the corresponding credentials from it,if not found ,it will use default ?

Or can you please check if your redfish config has any config error ?since it is used for at least one year at my production environment.

matejzero commented 4 years ago

I updated the config, but still the same error:/

hosts:
  10.10.10.2:
    username: monitor
    password: bbccbbcc
  host.example.org:
    username: monitor
    password: bbccbbcc
  default:
    username: monitor
    password: bbccbbcc

I also noticed I'm using the latest release (0.10.1). I might have to pull down master branch and recompile?

jenningsloy318 commented 4 years ago

Maybe you can build it at your side,later I will check at my side ?

matejzero commented 4 years ago

Yea I’ll rebuild it tomorrow and report back.

Thanks.

On 25 Apr 2020, at 02:24, jenningsloy318 notifications@github.com wrote:



Maybe you can build it at your side,later I will check at my side ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jenningsloy318/redfish_exporter/issues/3#issuecomment-619289799, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDY2ZBPQ3DF3JCS5ONMHM3ROIUTRANCNFSM4MQPB6FQ .

jenningsloy318 commented 4 years ago

Hi, seems last time I made the changes to the code, but did't update the readme, I uploaded the binary again. you can try now.

matejzero commented 4 years ago

It works when built from master branch.