Indeterminted and Insufficient Data on Reports

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
is_kim
Posts: 9
Joined: Tue Feb 04, 2020 9:38 am

Indeterminted and Insufficient Data on Reports

Post by is_kim »

Hi,

I've been using Nagios for a year and a half so far, and now I'm facing a problem with generating reports on Trends and Availability Report, both of them showing "Indeterminate" and "Insufficient Data", respectively, if the selected time period exceeds more than 48 hours.
I read in documentation that this is because Nagios can't find information for that host/service on a given time period. Please, correct me if I'm wrong about this.

Recently I erased log older than 31 days, because I was running out of space, and there's no need to keep more than this time period. So I'm not sure if this is totally related to the problem.

The logs are where they're supposed to be (/usr/local/nagios/var/ and /usr/local/nagios/var/archives), being generated every midnight, rotated by syslog.
The ownership and permissions are correct (user 'nagios', group 'nagios') for the installation directories (especially 'var', 'sbin' and 'share').
My Apache user (wwwrun) is running on the Nagios group and I don't have any difficult using others parts of the interface/CGI.

User exists on the system:

Code: Select all

grep ^nag /etc/passwd
nagios:x:1000:100::/home/nagios:/bin/bash
And the group is ok, including the Apache user:

Code: Select all

grep ^nag /etc/group
nagios:x:1000:nagios,wwwrun
And the installation directory:

Code: Select all

ls -l /usr/local/nagios/share
total 176
drwxrwxr-x 4 nagios nagios 4096 Mar 20  2018 angularjs
drwxrwxr-x 3 nagios nagios 4096 Mar 19  2018 bootstrap-3.3.0
-rw-rw-r-- 1 nagios nagios  576 Mar 20  2018 config.inc.php
drwxrwxr-x 2 nagios nagios 4096 Mar 20  2018 contexthelp
drwxrwxr-x 2 nagios nagios 4096 Mar 20  2018 d3
drwxrwxr-x 3 nagios nagios 4096 Mar 19  2018 docs
-rw-rw-r-- 1 nagios nagios  879 Mar 20  2018 graph-header.html
-rw-rw-r-- 1 nagios nagios 4136 Mar 20  2018 histogram-form.html
-rw-rw-r-- 1 nagios nagios 5579 Mar 20  2018 histogram-graph.html
-rw-rw-r-- 1 nagios nagios 2372 Mar 20  2018 histogram-links.html
-rw-rw-r-- 1 nagios nagios 2855 Mar 20  2018 histogram.html
drwxr-xr-x 3 nagios nagios 4096 Mar 20  2018 images
drwxrwxr-x 2 nagios nagios 4096 Mar 20  2018 includes
-rw-rw-r-- 1 nagios nagios 1930 Mar 20  2018 index.php
-rw-rw-r-- 1 nagios nagios 1660 Mar 20  2018 infobox.html
drwxrwxr-x 2 nagios nagios 4096 Mar 20  2018 js
-rw-rw-r-- 1 nagios nagios 1177 Mar 20  2018 jsonquery.html
drwxr-xr-x 4 root   root   4096 Mar 19  2018 locale
-rw-rw-r-- 1 nagios nagios 9162 Mar 20  2018 main.php
-rw-rw-r-- 1 nagios nagios 2015 Mar 20  2018 map-directive.html
-rw-rw-r-- 1 nagios nagios 3824 Mar 20  2018 map-form.html
-rw-rw-r-- 1 nagios nagios  647 Mar 20  2018 map-links.html
-rw-rw-r-- 1 nagios nagios 1723 Mar 20  2018 map-popup.html
-rw-rw-r-- 1 nagios nagios 4275 Mar 20  2018 map.php
drwxrwxr-x 2 nagios nagios 4096 Mar 19  2018 media
-rw-rw-r-- 1 nagios nagios   26 Mar 20  2018 robots.txt
-rw-rw-r-- 1 nagios nagios 6193 Mar 20  2018 side.php
drwxrwxr-x 2 nagios nagios 4096 Mar 20  2018 spin
drwxrwxr-x 2 nagios nagios 4096 May  9  2018 ssi
drwxr-xr-x 2 nagios nagios 4096 Mar 20  2018 stylesheets
-rw-rw-r-- 1 nagios nagios 4245 Mar 20  2018 trends-form.html
-rw-rw-r-- 1 nagios nagios 4256 Mar 20  2018 trends-graph.html
-rw-rw-r-- 1 nagios nagios  852 Mar 20  2018 trends-host-yaxis.html
-rw-rw-r-- 1 nagios nagios 3586 Mar 20  2018 trends-links.html
-rw-rw-r-- 1 nagios nagios 1065 Mar 20  2018 trends-service-yaxis.html
-rw-rw-r-- 1 nagios nagios 2990 Mar 20  2018 trends.html
So, I kindly ask for help here, because I don't know what else I can do, I'm stucked on this. I attached two screenshots of those reports, both for the same host, just to show the results. On both of them I backtracked 14 logs, but made no difference.

If anyone ran into to the same problem and can share the experience, I'd really appreciate!

Thanks in advance. Have a nice day : )
Attachments
trends_indeterminate.png
availability-report_undetermined.png
User avatar
Rfferrao13
Posts: 12
Joined: Tue Aug 09, 2016 3:56 pm

Re: Indeterminted and Insufficient Data on Reports

Post by Rfferrao13 »

Could you share the query string used for the report generated by the cgi's?

e.g.

Code: Select all

/avail.cgi?show_log_entries=&hostgroup=all&timeperiod=last7days&smon=11&sday=1&syear=2020&shour=0&smin=0&ssec=0&emon=11&eday=29&eyear=2020&ehour=24&emin=0&esec=0&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=0&initialassumedservicestate=0&backtrack=4
is_kim
Posts: 9
Joined: Tue Feb 04, 2020 9:38 am

Re: Indeterminted and Insufficient Data on Reports

Post by is_kim »

Rfferrao13 wrote:Could you share the query string used for the report generated by the cgi's?

e.g.

Code: Select all

/avail.cgi?show_log_entries=&hostgroup=all&timeperiod=last7days&smon=11&sday=1&syear=2020&shour=0&smin=0&ssec=0&emon=11&eday=29&eyear=2020&ehour=24&emin=0&esec=0&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=0&initialassumedservicestate=0&backtrack=4
Hi Rfferrao13,

This is a report made for the "Last 7 Days" preset option of the reports. The URL that's generated is the following :

Code: Select all

/nagios/cgi-bin/avail.cgi?show_log_entries=&host=celnagrel&timeperiod=last7days&smon=12&sday=1&syear=2020&shour=0&smin=0&ssec=0&emon=12&eday=1&eyear=2020&ehour=24&emin=0&esec=0&rpttimeperiod=&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=0&initialassumedservicestate=0&backtrack=4
Even if I increase the number of backtracked logs, the situation remains the same.
I'm not sure what can be done to Nagios properly parse the log and generate correctly the report, but I'm missing something very trivial.
is_kim
Posts: 9
Joined: Tue Feb 04, 2020 9:38 am

Re: Indeterminted and Insufficient Data on Reports

Post by is_kim »

I tried another thing. I manage a few Nagios installations, so I tried to compare the configs between them, and everything in the nagios.cfg is the same, because they were cloned from the same base image, and the difference I noticed on the var directory was that the logs were being generated and rotated, but in the server where I'm facing the problem has a zero-byte log created after rotation.

As it follows:

Code: Select all

# ll
total 917232
-rw-r----- 1 nagios nagios        0 Nov 11 00:02 nagios-11-10-2020-00.log
-rw-r--r-- 1 nagios nagios 35596721 Nov  9 23:59 nagios-11-10-2020-00.log-20201111
-rw-r----- 1 nagios nagios        0 Nov 12 00:02 nagios-11-11-2020-00.log
-rw-r--r-- 1 nagios nagios 35647387 Nov 10 23:59 nagios-11-11-2020-00.log-20201112
-rw-r----- 1 nagios nagios        0 Nov 13 00:02 nagios-11-12-2020-00.log
-rw-r--r-- 1 nagios nagios 37132418 Nov 11 23:59 nagios-11-12-2020-00.log-20201113
-rw-r----- 1 nagios nagios        0 Nov 14 00:02 nagios-11-13-2020-00.log
-rw-r--r-- 1 nagios nagios 37328267 Nov 12 23:59 nagios-11-13-2020-00.log-20201114
-rw-r----- 1 nagios nagios        0 Nov 15 00:02 nagios-11-14-2020-00.log
-rw-r--r-- 1 nagios nagios 37081198 Nov 13 23:59 nagios-11-14-2020-00.log-20201115
-rw-r----- 1 nagios nagios        0 Nov 16 00:02 nagios-11-15-2020-00.log
-rw-r--r-- 1 nagios nagios 36100077 Nov 14 23:59 nagios-11-15-2020-00.log-20201116
-rw-r----- 1 nagios nagios        0 Nov 17 00:02 nagios-11-16-2020-00.log
-rw-r--r-- 1 nagios nagios 37996624 Nov 15 23:59 nagios-11-16-2020-00.log-20201117
-rw-r----- 1 nagios nagios        0 Nov 18 00:02 nagios-11-17-2020-00.log
-rw-r--r-- 1 nagios nagios 38153343 Nov 16 23:59 nagios-11-17-2020-00.log-20201118
-rw-r----- 1 nagios nagios        0 Nov 20 00:02 nagios-11-18-2020-00.log
-rw-r--r-- 1 nagios nagios 39458178 Nov 18 00:00 nagios-11-18-2020-00.log-20201120
-rw-r----- 1 nagios nagios        0 Nov 20 00:02 nagios-11-19-2020-00.log
-rw-r--r-- 1 nagios nagios 38740113 Nov 18 23:59 nagios-11-19-2020-00.log-20201120
-rw-r----- 1 nagios nagios        0 Nov 21 00:02 nagios-11-20-2020-00.log
-rw-r--r-- 1 nagios nagios 40044364 Nov 19 23:59 nagios-11-20-2020-00.log-20201121
-rw-r----- 1 nagios nagios        0 Nov 22 00:02 nagios-11-21-2020-00.log
-rw-r--r-- 1 nagios nagios 44492451 Nov 20 23:59 nagios-11-21-2020-00.log-20201122
-rw-r----- 1 nagios nagios        0 Nov 23 00:02 nagios-11-22-2020-00.log
-rw-r--r-- 1 nagios nagios 47471032 Nov 21 23:59 nagios-11-22-2020-00.log-20201123
-rw-r----- 1 nagios nagios        0 Nov 24 00:02 nagios-11-23-2020-00.log
-rw-r--r-- 1 nagios nagios 44581576 Nov 22 23:59 nagios-11-23-2020-00.log-20201124
-rw-r----- 1 nagios nagios        0 Nov 25 00:02 nagios-11-24-2020-00.log
-rw-r--r-- 1 nagios nagios 44039476 Nov 23 23:59 nagios-11-24-2020-00.log-20201125
-rw-r----- 1 nagios nagios        0 Nov 26 00:02 nagios-11-25-2020-00.log
-rw-r--r-- 1 nagios nagios 44932608 Nov 24 23:59 nagios-11-25-2020-00.log-20201126
-rw-r----- 1 nagios nagios        0 Nov 27 00:02 nagios-11-26-2020-00.log
-rw-r--r-- 1 nagios nagios 43018793 Nov 25 23:59 nagios-11-26-2020-00.log-20201127
-rw-r----- 1 nagios nagios        0 Nov 28 00:02 nagios-11-27-2020-00.log
-rw-r--r-- 1 nagios nagios 44599590 Nov 26 23:59 nagios-11-27-2020-00.log-20201128
-rw-r----- 1 nagios nagios        0 Nov 29 00:02 nagios-11-28-2020-00.log
-rw-r--r-- 1 nagios nagios 45523113 Nov 27 23:59 nagios-11-28-2020-00.log-20201129
-rw-r----- 1 nagios nagios        0 Nov 30 00:02 nagios-11-29-2020-00.log
-rw-r--r-- 1 nagios nagios 44341109 Nov 28 23:59 nagios-11-29-2020-00.log-20201130
-rw-r----- 1 nagios nagios        0 Dec  1 00:02 nagios-11-30-2020-00.log
-rw-r--r-- 1 nagios nagios 41590232 Nov 29 23:59 nagios-11-30-2020-00.log-20201201
-rw-r----- 1 nagios nagios        0 Dec  2 00:02 nagios-12-01-2020-00.log
-rw-r--r-- 1 nagios nagios 42252079 Nov 30 23:59 nagios-12-01-2020-00.log-20201202
-rw-r--r-- 1 nagios nagios 38985494 Dec  1 23:59 nagios-12-02-2020-00.log
Maybe this doesn't represent any problem at all, but that's what I found.

So I'd gladly accept any tips to fix this odd behavior, because honestly, I'm not sure where's the problem or where to start resolving it.
Thanks in advance.
is_kim
Posts: 9
Joined: Tue Feb 04, 2020 9:38 am

Re: Indeterminted and Insufficient Data on Reports

Post by is_kim »

Hi,

I figured out the problem. My logs are being named wrong.
I don't know why they're being named with the date appended at the end of the file, but that's the reason my reports (Trends and Availability) are being generated with so much time on "insufficient" or "indeterminate" states.

Thanks for your time and effort @Rfferrao13 !

For the mods, you can close this thread, because Nagios is working properly, only the rotation that is weird (you can see it on the above message), but I believe that it deserves its own thread, if I find anything worth to open a new one, of course.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Indeterminted and Insufficient Data on Reports

Post by scottwilkerson »

This is very likley because you have logrotate rotating the logs which is changing the names. Nagios rotates its own logs and should not be done outside of the program
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked