Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnspec does not report check-in to upstream as one might expect #894

Closed
czunker opened this issue Oct 26, 2023 · 3 comments · Fixed by mondoohq/cnquery#2419 or #913
Closed

cnspec does not report check-in to upstream as one might expect #894

czunker opened this issue Oct 26, 2023 · 3 comments · Fixed by mondoohq/cnquery#2419 or #913

Comments

@czunker
Copy link
Contributor

czunker commented Oct 26, 2023

Describe the bug
In the platform, we show a "Last Check-in" for managed clients. But this does not get updated when a scan happens or the service is restarted.

From the cnspec service logs:

Oct 26 06:38:56 ubuntu-jammy cnspec[8606]: → next scan in 1h0m40.42483421s
Oct 26 07:39:36 ubuntu-jammy cnspec[8606]: → discover related assets for 1 asset(s)
Oct 26 07:39:36 ubuntu-jammy cnspec[8606]: → synchronize assets
Oct 26 07:40:23 ubuntu-jammy crontab[9836]: (root) LIST (root)
Oct 26 07:40:26 ubuntu-jammy cnspec[8606]: → scan for asset ubuntu-jammy (Ubuntu 22.04.1 LTS) completed
Oct 26 07:40:26 ubuntu-jammy cnspec[8606]: → next scan in 1h20m15.867470213s

But in the UI:
image

To Reproduce
Steps to reproduce the behavior:

  1. Create a Ubuntu VM
  2. Create a workstation integration in the UI
  3. Install the client in the VM as suggested by the UI
  4. See the client report in the UI
  5. Wait some time and see scans happening
  6. Note that the UI does not show an updated "Last Check-in"

Expected behavior
I'd expect the client to check-in with a scan.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04 VM, but also reported on Windows
  • cnspec 9.3.3

Additional context
I've not checked the code so far, whether we have an interval set or something like that.
Perhaps we automatically check-in every 24 hours?

@czunker
Copy link
Contributor Author

czunker commented Oct 27, 2023

This leads to wired data. The managed client shows as missing:
image

But the assets shows a recent scan:
image

@czunker
Copy link
Contributor Author

czunker commented Oct 27, 2023

Also calling status, does not change the managed client data:

cnspec status
→ loaded configuration from /home/vagrant/.config/mondoo/mondoo.yml using source default
→ Platform:	ubuntu
→ Version:	22.04
→ Hostname:	ubuntu-jammy
→ IP:		10.0.2.15
→ Time:		2023-10-27T08:19:53Z
→ Version:	9.3.3 (API Version: 9)
→ API ConnectionConfig:	https://api.edge.mondoo.com
→ API Status:	SERVING
→ API Time:	2023-10-27T08:19:53Z
→ API Version:	9
→ Client:	//agents.api.mondoo.app/spaces/mondoo-k8s/agents/2XI0p17UVv5h6OjxRjHeXUeAV8b
→ Service Account:	//agents.api.mondoo.app/spaces/mondoo-k8s/serviceaccounts/2XI0oy2XKFt9f6rHka3NVPpJOfy
→ client is registered
→ client authenticated successfully

czunker added a commit that referenced this issue Oct 30, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 30, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit to mondoohq/cnquery that referenced this issue Oct 30, 2023
This allows cnspec to regularly update last check-in time and version upstream.

Fixes mondoohq/cnspec#894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 30, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit to mondoohq/cnquery that referenced this issue Oct 30, 2023
This allows cnspec to regularly update last check-in time and version upstream.

Fixes mondoohq/cnspec#894

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Oct 30, 2023

#913 is still needed.

@czunker czunker reopened this Oct 30, 2023
czunker added a commit that referenced this issue Oct 30, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 30, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 31, 2023
Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
czunker added a commit that referenced this issue Oct 31, 2023
* 🐛 Regularly check in with upstream

Fixes #894

Signed-off-by: Christian Zunker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant