-
Notifications
You must be signed in to change notification settings - Fork 10
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
How is the "Monitoring Status" calculated? #24
Comments
The monitoring status is actually calculated in the foreman, see https://github.com/theforeman/foreman_monitoring/blob/ef894d9c11bdaa4dd4693a758aedca6005f3066f/app/models/host_status/monitoring_status.rb#L12-L22. |
Given the to_status function, can u see a reason why a host with below monitoring results could still have Monitoring Status Critical?
|
Can you use Host::Managed.find_by(name: 'my-super.host.com').get_status(HostStatus::MonitoringStatus).to_status |
That returns 0. I've put some debug statements in the to_status function but it doesn't get called when refreshing the host properties page in the foreman. The function to_label does get called and returns Critical. I did some more troubleshooting. The HostStatus::MonitoringStatus record is a lot older than the monitoring_results records.
I then did a reboot of the monitored server. The monitoring_results records where updated, but the HostStatus::MonitoringStatus record is still the old one from 2019-01-13.
Any clues? When would the host_status record normally be updated? Is this something the monitoring smart proxy does? BTW, thanks for your support! |
I suspect that the status is not properly refreshed. Host::Managed.find_by(name: 'my-super.host.com').get_status(HostStatus::MonitoringStatus).refresh! |
Allthough in the host "Monitoring" tab all services are shown as OK, the "Monitoring Status" shows Critical.
In Icinga2, everything is green.
I'm using FQDNs both in Icinga and The Foreman.
I can see 2 things that might influence this:
Any ideas on this?
kind regards,
Kristof
The text was updated successfully, but these errors were encountered: