Passive checks not respecting intervals on Windows
ne-bbahn opened this issue · 9 comments
https://support.nagios.com/forum/viewtopic.php?p=356948#p356948
Have a situation where I want to start using passive checks. I installed NCPA 3.1 onto my laptop just now to test. I have this in my checks section:
[passive checks]
%HOSTNAME%|__HOST__ = system/agent_version
%HOSTNAME%|Disk Usage = disk/logical/C:|/used_percent --warning 80 --critical 90 --units Gi
%HOSTNAME%|CPU Usage|3600 = cpu/percent --warning 60 --critical 80 --aggregate avg
sleep is set to 300 in nrdp.cfg and every 5 minutes in unconfigured objects the last seen gets updated for the host, Disk and CPU. It doesn't seem to be respecting the 3600 interval for CPU.
Looks like this is in the handler, the entities of the split will never total greater than two (one yes, two no) thus the default of 300 is being set due to the error.
Was having same issue, thanks for posting.
Hello @SNapier, are you sure that is what was happening for you? I tried tracking the duration and it is correctly passing the given duration.
@ne-bbahn yup, try setting it to 60 seconds and see if that works for you or if it stays with the default
I tried replicating this on Windows 10 and 11 and it is working properly on both machines.
Did you restart NCPA after making these changes? You can either do this from a terminal with sc stop ncpa
sc start ncpa
or by restarting the service with the task manager.
This was several months ago, the machine has long since been re-imaged with an active agent.
I can't replicate this issue, so unless someone else has encountered a similar issue, I will assume this was due to not restarting NCPA properly and close this issue in ~two weeks. If at any point, someone has this happen again, feel free to re-open this MR.