Availability report is showing negative values
Availability report is showing negative values
Hi @ll,
since I'm new to the board I'd like to send a "Hello" to everyone.
I spent a good time in finding information regarding my issue, yet with little success, so I hope to find some help in this forum...
The issue is: Some of my availability reports are showing negative %-values as well as incredibly high "Time"-values (e.g. "1158050440d 8h 41m 44s"), see the attached screenshot: I narrowed the issue down to only occur when a scheduled downtime took place during the "Report Period", here "Last month".
The error occurs on any given "Report time Period", except the pre-defined "24x7" and "none". Note: The pre-defined Report time Period "workhours" also leads to incorrect data.
I found some indication on the www that this is up to an error in avail.cgi and that this should have been fixes by now, which I cannot agree to, since I just updated my system on a sandbox to Nagios Core 4.3.2.
The values are somewhat different to my live-environment (being Nagios 3.5.2). However, they're still false (the screenshot is from Nagios 4.3.2).
Some additional information:
Report-URL: https://<MY_NAGIOS_SITE>/nagios/cgi-bin/avail.cgi?assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&backtrack=4&show_log_entries=yes&timeperiod=lastmonth&rpttimeperiod=sla_xxx&host=<HOSTNAME>&service=<SERVICENAME>
I hope you can shed some light into this issue.
Many thanks in advance for your help, which is greatly appreciated.
cheers,
Dennis
since I'm new to the board I'd like to send a "Hello" to everyone.
I spent a good time in finding information regarding my issue, yet with little success, so I hope to find some help in this forum...
The issue is: Some of my availability reports are showing negative %-values as well as incredibly high "Time"-values (e.g. "1158050440d 8h 41m 44s"), see the attached screenshot: I narrowed the issue down to only occur when a scheduled downtime took place during the "Report Period", here "Last month".
The error occurs on any given "Report time Period", except the pre-defined "24x7" and "none". Note: The pre-defined Report time Period "workhours" also leads to incorrect data.
I found some indication on the www that this is up to an error in avail.cgi and that this should have been fixes by now, which I cannot agree to, since I just updated my system on a sandbox to Nagios Core 4.3.2.
The values are somewhat different to my live-environment (being Nagios 3.5.2). However, they're still false (the screenshot is from Nagios 4.3.2).
Some additional information:
Report-URL: https://<MY_NAGIOS_SITE>/nagios/cgi-bin/avail.cgi?assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&backtrack=4&show_log_entries=yes&timeperiod=lastmonth&rpttimeperiod=sla_xxx&host=<HOSTNAME>&service=<SERVICENAME>
I hope you can shed some light into this issue.
Many thanks in advance for your help, which is greatly appreciated.
cheers,
Dennis
Last edited by dennisg on Tue Jun 06, 2017 2:59 am, edited 1 time in total.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Availability is showing negative values
What is the definition of the time period workhours? What is the full output from:
Code: Select all
# /usr/local/nagios/bin/nagiosPrevious Nagios employee
Re: Availability report is showing negative values
Sorry for the late reply. I was sick home for a couple of days...
Definition of "workhours" (same as "sla_xxx")
Output of "/usr/local/nagios/bin/nagios"
Many thanks in advance,
Dennis
Definition of "workhours" (same as "sla_xxx")
Code: Select all
define timeperiod{
timeperiod_name workhours
alias our office hours
monday 08:00-18:00
tuesday 08:00-18:00
wednesday 08:00-18:00
thursday 08:00-18:00
friday 08:00-18:00
}Code: Select all
Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL
Website: https://www.nagios.org
Usage: /usr/local/nagios/bin/nagios [options] <main_config_file>
Options:
-v, --verify-config Verify all configuration data (-v -v for more info)
-s, --test-scheduling Shows projected/recommended check scheduling and other
diagnostic info based on the current configuration files.
-T, --enable-timing-point Enable timed commentary on initialization
-x, --dont-verify-paths Deprecated (Don't check for circular object paths)
-p, --precache-objects Precache object configuration
-u, --use-precached-objects Use precached object config file
-d, --daemon Starts Nagios in daemon mode, instead of as a foreground process
-W, --worker /path/to/socket Act as a worker for an already running daemon
Visit the Nagios website at https://www.nagios.org/ for bug fixes, new
releases, online documentation, FAQs, information on subscribing to
the mailing lists, and commercial support options for Nagios.
Dennis
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Availability report is showing negative values
Would it be possible for you to share the log files which produce this report? If you can attach the minimum amount of time period needed to replicate the issue that would be great. You can compress it and PM them to myself or other support personnel.
Previous Nagios employee
Re: Availability report is showing negative values
I haven't seen a log containing anything about a report, yet. Is that part of the main logfile and / or is a specific debug-level required in order to collect that information?
Update: I have set the global in nagios.cfg. However, I don't see a single line when creating an AR and "tailing" the debug.log, so that path is obviously wrong...
Update: I have set the global
Code: Select all
debug_level=2048-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Availability report is showing negative values
The reports are generated by default in /usr/local/nagios/var/nagios.log and /usr/local/nagios/var/archives. These are the files the reports and avail.cgi use. The debug file is not used for these reports.
Previous Nagios employee
Re: Availability report is showing negative values
Okay, got you.
Thought you meant some sort of output-log during the generation of the report, which would be new to me.
I'll try to separate that data from the global log- and archive-files and will send you a PM as soon as that's done.
Many thanks for looking into my issue!
Thought you meant some sort of output-log during the generation of the report, which would be new to me.
I'll try to separate that data from the global log- and archive-files and will send you a PM as soon as that's done.
Many thanks for looking into my issue!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Availability report is showing negative values
Please PM me instead of avandemore, or just post directly to the thread with things sanitized. Thanks!
Re: Availability report is showing negative values
Hi,
many thanks again for looking into my issue.
I have stripped down the logs to contain only (IMHO) relevant data. This is the data worth a full month and my tests after cleaning up the logs showed the expected "faulty" result.
I have additionally attached some more screenshots as well as the entire object-definition that's used to reproduce this issue.
If there's anything more that I can do in order to help investigating this issue just let me know.
Looking forward to hearing from you soon.
cheers,
Dennis
PS: You'll surely realize, that the archive-logs start with Nagios 3.5.1. That was the previous version up until thursday last week. I thought an update of Nagios-core as well as the plugins would have solved this issue, which unfortunately did not work out quite as expected...
many thanks again for looking into my issue.
I have stripped down the logs to contain only (IMHO) relevant data. This is the data worth a full month and my tests after cleaning up the logs showed the expected "faulty" result.
I have additionally attached some more screenshots as well as the entire object-definition that's used to reproduce this issue.
If there's anything more that I can do in order to help investigating this issue just let me know.
Looking forward to hearing from you soon.
cheers,
Dennis
PS: You'll surely realize, that the archive-logs start with Nagios 3.5.1. That was the previous version up until thursday last week. I thought an update of Nagios-core as well as the plugins would have solved this issue, which unfortunately did not work out quite as expected...
- Attachments
-
- nagios.zip
- (119.5 KiB) Downloaded 335 times
Re: Availability report is showing negative values
If you run the Availability report on a host for today, does it still show the error?
This would verify if there is a log file format issue.
Next, run the report again and change the option "First Assumed Service State" to UP and see if the report is correct.
This would verify if there is a log file format issue.
Next, run the report again and change the option "First Assumed Service State" to UP and see if the report is correct.
Be sure to check out our Knowledgebase for helpful articles and solutions!