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

Passive checks not respecting intervals on Windows #1169

Closed
ne-bbahn opened this issue May 20, 2024 · 9 comments
Closed

Passive checks not respecting intervals on Windows #1169

ne-bbahn opened this issue May 20, 2024 · 9 comments

Comments

@ne-bbahn
Copy link
Contributor

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.

@SNapier
Copy link

SNapier commented May 20, 2024

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.
image

Was having same issue, thanks for posting.

@SNapier
Copy link

SNapier commented May 20, 2024

It seems you can work around this in the sort term by adding a another pipe in the service check definition.
image

@ne-bbahn
Copy link
Contributor Author

ne-bbahn commented Aug 5, 2024

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.

@SNapier
Copy link

SNapier commented Aug 5, 2024

@ne-bbahn yup, try setting it to 60 seconds and see if that works for you or if it stays with the default

@ne-bbahn
Copy link
Contributor Author

ne-bbahn commented Aug 6, 2024

@ne-bbahn yup, try setting it to 60 seconds and see if that works for you or if it stays with the default

@SNapier I did and it was correctly sending every 60 seconds. What OS are you working on? I am currently using CentOS 9 Stream.

@SNapier
Copy link

SNapier commented Aug 6, 2024 via email

@ne-bbahn ne-bbahn changed the title Passive checks not respecting intervals Passive checks not respecting intervals on Windows Aug 6, 2024
@ne-bbahn
Copy link
Contributor Author

ne-bbahn commented Aug 6, 2024

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.

@SNapier
Copy link

SNapier commented Aug 6, 2024

This was several months ago, the machine has long since been re-imaged with an active agent.

@ne-bbahn
Copy link
Contributor Author

ne-bbahn commented Aug 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants