Page 1 of 2

Upgraded ubuntu Nagios Server and Trends not working as exp!

PostPosted: Tue Jun 13, 2017 9:43 am
by Teja
Hi All,
I am a NewBee...here! My issue is that i have updated my Nagios Server to "4.0.2" running on ubuntu server using the command (do-release-upgrade) and Since after the updation i am unable to view the "TRENDS" for "LAST31DAYS", "ONE MONTH" "LAST YEAR" etc..respectively. I can only see the trends for last15days even after setting it for "LAST31DAYS". So could anyone PLEASE... assist me on this issue as early as Possible, if required i can share the screen shots. At present i am attaching the Screen of TRENDS report for "MEMORY USAGE" that i have ran on one of my servers.


THANKS IN ADVANCE!!!!!!

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Tue Jun 13, 2017 1:45 pm
by lmiltchev
I would recommend checking:
1. If you have any missing log files from "/usr/local/nagios/var/archives/" directory
2. If log files are not corrupted, and that they have data in them
3. If the permissions on the archives directory are 775, and 644 on the log files
4. If you have any state changes for the period May 14 - May 28

What happens if you change this:
Code: Select all
First assumed service state = Unspecified

to:
Code: Select all
First assumed service state = Service OK

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Wed Jun 14, 2017 2:37 am
by Teja
Hi lmiltchev,
Firstly thanks for your reply. I Have checked with your above mentioned points.

1. I have log files from 29th of May - 14th of June (current date).
2. The permissions are set 775 for the archives directory and 644 on the log files.
3.I don't think there are state changes .
4. I have changed "First assumed service state = Service OK" - here it shows "OK" but is says as "Fake Log Entry" and even tested it by setting "First assumed service state = Service CRITICAL" it shows as "CRITICAL" saying "Fake Log Entry".

Below i am attaching the Screen shots of Nagios Logs, Status of Trends after setting the "Service as OK" and "Service as CRITICAL".

Thank You!!

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Thu Jun 15, 2017 12:23 pm
by tgriep
What version of Nagios were you running before the upgrade to 4.0.2?
Can you go in to the archive file for May 28th, find that service and post the log entries here?

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Fri Jun 16, 2017 4:57 am
by Teja
Hi tgriep,
I am Not sure about what version we were running before mate, but i guess it was "4.0.1"
And for the log file of (28th May) which you have asked,FYI i have log files form (30th of May).As the server is hosted in AWS i keep only 15 Days of logs in order to eliminate the Storage issues.

In the Log file of 30th May on Top it says :-

LOG ROTATION :- DAILY
LOG VERSION :- 2.0

Thank You!!

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Fri Jun 16, 2017 11:14 am
by tgriep
When the trend report runs, it looks at the log files in the archives folder to gather the data to display in the Trends graph.
If the files are pruned off and only 15 days are present, then you will only be able to show the last 15 days in the Trends graph.
There is not a separate file that stores the history so it you want to view the Trends for a longer period, you will have to keep the archived log files on the system for that period of time.

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Mon Jun 19, 2017 7:49 am
by Teja
Hi tgriep,
Thanks a lot for your reply and sorry for the late response. So,Is there any way that i can get my deleted logs?


Thank You!!!!!

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Mon Jun 19, 2017 9:44 am
by tgriep
If you do not have a backup of the files before you delete them, then there is no way to recreate them.

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Fri Jun 23, 2017 7:57 am
by Teja
Hi tgreip,
Hmm.. unlucky, Anyways Thanks so much for your time,but lastly Is there anyway that i could change my default path location :- (/usr/local/nagios/var/archives) were my logs get created daily to another location were i want to attach an volume especially for storing the logs and trends could read data from that location. If yes, can you please explain me how ?



Thank you!!!

Re: Upgraded ubuntu Nagios Server and Trends not working as

PostPosted: Fri Jun 23, 2017 8:07 am
by mcapra
In the main nagios.cfg file:

Code: Select all
# LOG ARCHIVE PATH
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).

log_archive_path=/usr/local/nagios/var/archives