Upgraded ubuntu Nagios Server and Trends not working as exp!

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.
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Upgraded ubuntu Nagios Server and Trends not working as exp!

Post 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!!!!!!
Attachments
not showing the trends report for "LAST31DAYS" after the UPDATE.
not showing the trends report for "LAST31DAYS" after the UPDATE.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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!!
Attachments
Status of "Service as CRITICAL"
Status of "Service as CRITICAL"
Status of "Service as OK"
Status of "Service as OK"
Nagios logs from my Ubuntu server
Nagios logs from my Ubuntu server
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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!!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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!!!!!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post by tgriep »

If you do not have a backup of the files before you delete them, then there is no way to recreate them.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Teja
Posts: 53
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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!!!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Upgraded ubuntu Nagios Server and Trends not working as

Post 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
Former Nagios employee
https://www.mcapra.com/
Locked