Upgraded ubuntu Nagios Server and Trends not working as exp!

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Upgraded ubuntu Nagios Server and Trends not working as exp!

Postby Teja » Tue Jun 13, 2017 9:43 am

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
Nagios Trends Check.PNG
not showing the trends report for "LAST31DAYS" after the UPDATE.
Teja
 
Posts: 41
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby lmiltchev » Tue Jun 13, 2017 1:45 pm

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!
User avatar
lmiltchev
QA Manager
 
Posts: 9457
Joined: Mon May 23, 2011 12:15 pm

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby Teja » Wed Jun 14, 2017 2:37 am

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
Nagios Trends Check2.1.PNG
Status of "Service as CRITICAL"
Nagios Trends Check2.PNG
Status of "Service as OK"
Nagios Logs.PNG
Nagios logs from my Ubuntu server
Teja
 
Posts: 41
Joined: Tue Jun 13, 2017 8:13 am

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby tgriep » Thu Jun 15, 2017 12:23 pm

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby Teja » Fri Jun 16, 2017 4:57 am

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby tgriep » Fri Jun 16, 2017 11:14 am

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby Teja » Mon Jun 19, 2017 7:49 am

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby tgriep » Mon Jun 19, 2017 9:44 am

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby Teja » Fri Jun 23, 2017 7:57 am

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

Re: Upgraded ubuntu Nagios Server and Trends not working as

Postby mcapra » Fri Jun 23, 2017 8:07 am

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
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 2773
Joined: Thu May 05, 2016 3:54 pm

Next

Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 4 guests