hetrixtools / agent

HetrixTools Server Monitoring Agent (Linux)
https://hetrixtools.com/uptime-monitor/
88 stars 29 forks source link

Agent causing CPU usage spikes in VM #59

Open YeapGuy opened 9 months ago

YeapGuy commented 9 months ago

After installing the agent in a Debian VM on Proxmox, I noticed that the VM periodically (every few seconds) spiked the CPU usage. After looking at htop, I confirmed this to be caused by the HetrixTools agent. This is a graph of CPU% of the VM. The drop is after I uninstalled the agent. image

I also have the agent installed on the host, where it doesn't seem to be doing this. Must be something specific to VMs.

hetrixtools commented 9 months ago

Can you please provide a bit more info as to what the specs of the hypervisor are and what specs did you assign to the VM? Also, which Debian version was in the VM, and which Proxmox/Debian version was on the hypervisor? So we can set up a testing environment and try to reproduce the issue.

Any other info that you might think would help will also be appreciated.

Thank you.

YeapGuy commented 9 months ago

Sure. Hypervisor: i5-12450H / 32GB DDR4 RAM / NVMe SSD storage VM specs do not seem to matter (had this same issue on two different VMs), but my VM had 4 cores / 8GB RAM. I used CPU Affinity to limit the VPS to specific four cores. In the Debian 12 VM:

primary@mail:~$ uname -a
Linux mail 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

It's created using the official cloudinit-compatible image of Debian It has pretty standard specs: image I installed the agent as root.

ow-de commented 6 months ago

@hetrixtools

I also have the same problem. VM is hosted on Proxmox with following settings:

image

VM-OS is Debian 12 x64, the VM has been installed from Netinstall ISO. Linux m 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

The VM is hosting a Mailcow-Mailserver inside several docker-containers.

Agent is installed in Version 2.1.0

Kind regards

hetrixtools commented 6 months ago

Try increasing the agent's metrics collection interval as explained in our documentation:
https://docs.hetrixtools.com/how-to-increase-linux-server-monitoring-agent-metrics-collection-intervals/

Also, please open a support ticket on our platform, including the monitor's name, so our techs can take a closer look at your metrics.

Thank you.

ow-de commented 6 months ago

@hetrixtools

thanks for your comment. I am trying to set the Interval to 10s, see if CPU usage is going down. If the problem persists, I will open a support ticket.

Kind regards