it-novum / openitcockpit-agent-go

Cross-Platform Monitoring Agent for openITCOCKPIT written in Go
https://openitcockpit.io/download_agent/
Apache License 2.0
5 stars 2 forks source link

Invalid credentials #77

Closed some-git-user closed 1 year ago

some-git-user commented 1 year ago

Agent Mode:

Versions

Operating system

NAME="openSUSE Leap"
VERSION="15.1"

Describe the bug Push agent can't connect: level=error msg="Push Client: could not send state to server: Invalid credentials or host not found"

To Reproduce Steps to reproduce the behavior:

  1. Install fresh clean agent on client with zypper
  2. Create new host with openITCOCKPIT Agent - Push template
  3. Go to agent setup and generate new push config with api key
  4. Apply config and restart agent service
  5. See error log

Expected behavior Agent should connect to server

Additional context Connection to oitc server should work. Agent system has internet access. Also tested DNS resolve with nslokkup

nook24 commented 1 year ago

This is probably a normal / wanted behavior. The error message Invalid credentials or host not found has two meanings.

  1. Invalid credentials The agent can not send data to the openITCOCKPIT server, because of:

  2. Host not found This part of the error message just says, that no host is assigned to the openITCOCKPIT Monitoring Agent yet. To verify this, open the Agents Overview and check if the agent is pushing data to openITCOCKPIT. If the Agent is pussing data everything works as expected but the data is not used.

To start monitoring, assign the Agent to an host.

some-git-user commented 1 year ago

@nook24 thank you for your feedback. To be honest, I would have expected a different message, if I only have to assign the Agent to an host. Back when I created this issue, there was no agent available at the "Available Agents" drop down menu. So I assumed an problem. But now I rechecked the drop down and yes the agent appeared.

I had interpreted the message Host not found, that the client could not find the openITCOCKPIT Server (host).