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

idoreports_get_sla_ok_percent returns > 100 #24

Closed
fabsi88 opened this issue Feb 19, 2020 · 6 comments · Fixed by #58
Closed

idoreports_get_sla_ok_percent returns > 100 #24

fabsi88 opened this issue Feb 19, 2020 · 6 comments · Fixed by #58
Labels
bug Something isn't working
Milestone

Comments

@fabsi88
Copy link

fabsi88 commented Feb 19, 2020

Describe the bug

The function idoreports_get_sla_ok_percent returns >100 % in unknown cases.

To Reproduce

Steps to reproduce the behavior:

  1. Call the function for a period of a month like
    select idoreports_get_sla_ok_percent(13918, '2020-01-01 00:00:00', '2020-01-31 23:59:59', NULL);
    Last state change of this object was on 2020-01-01 13:31:58 from 3 to 0

Expected behavior

Return 100

Screenshots

If applicable, add screenshots to help explain your problem.
image

Your Environment

  • Module version: 0.9.1
  • Dependent module versions:
  • Icinga Web 2 version and modules (System - About): 2.7.3
  • Web browser and version: Current chrome
  • Icinga 2 version used (icinga2 --version): 2.11.2-1
  • MySQL version (mysql --version): 5.5.64-MariaDB
  • PHP version used (php --version): 7.1.30
  • Server operating system and version: CentOS Linux release 7.7.1908 (Core)
@fabsi88
Copy link
Author

fabsi88 commented Apr 3, 2020

any update?

@lippserd
Copy link
Member

lippserd commented Apr 8, 2020

Hi,

Thanks for the report.

Could you please also share the hard state change that happened before your mentioned change?

A screenshot of the history would help.

All the best,
Eric

@sklaes
Copy link

sklaes commented Apr 14, 2020

In the past few months I have observed strange behaviour. The reports covering the last month change during the current month. Which should not happen, since the last month is already finished and therefore there are no more changes. The reports tend to become more realistic towards the end of the month, at least there are less services with more than 100%.

Here is an example same report of last month:
image

(please note the different creation dates of the Report)

@sklaes
Copy link

sklaes commented Apr 14, 2020

I have exported the state history of the services above:
idoreports-issues-24
idoreports-issues-24.txt
Filter uses for this export:
state_type LIKE '1' AND object_id IN ('16528','16536','16538','16535','16541','16542') and state_time > '2020-03-01 00:00:00' and state_time < '2020-03-31 23:59:59'

As far as I can see all services that are changing their percentage value over the time have an wildcard (*) at the end of their service name, so that is probably a different issue.

@danielboydston
Copy link

I've encountered this issue as well. It happened when I had a host in downtime. During downtime, the SLA did not take the downtime into effect. After I removed the downtime, the SLA then showed above 100%.
image
Here is the state change history:
image
The report is covering a 1 week time span.
image

@moreamazingnick
Copy link
Contributor

that happens in strange downtime scenarios
if you devide by total time this can't happen
https://github.com/moreamazingnick/icingaweb2-module-idoreports

@nilmerg nilmerg added the bug Something isn't working label Mar 18, 2022
moreamazingnick added a commit to moreamazingnick/icingaweb2-module-idoreports that referenced this issue Mar 28, 2022
@lippserd lippserd added this to the 0.10.1 milestone Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants