About keeping historical data

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
NagAlf
Posts: 26
Joined: Mon Aug 19, 2013 5:43 am

About keeping historical data

Post by NagAlf »

Hi!
Please advice. I see Nagios does keep historical data some about 3 days. If I correct, is it possible to some devices/hosts to set keeping history for longer time period? I'm using Nagios 3 on SLES.
More thanks, Alar.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: About keeping historical data

Post by sreinhardt »

Which historical data? In general it should be kept for a much longer time than that, however it may get moved to rotating archives opposed to live history, again depending on which particular data you are referring to.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
NagAlf
Posts: 26
Joined: Mon Aug 19, 2013 5:43 am

Re: About keeping historical data

Post by NagAlf »

Hi and thanks!
Well, yes, You're correct, after some three days logs rotated to zipped archives and via console I get error "Error: Could not open log file '/var/log/nagios/archives/nagios-10-26-2013-00.log' for reading!".
More thanks, Alar.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: About keeping historical data

Post by slansing »

What are the permissions on this file:

Code: Select all

ll /var/log/nagios/archives/nagios-10-26-2013-00.log
NagAlf
Posts: 26
Joined: Mon Aug 19, 2013 5:43 am

Re: About keeping historical data

Post by NagAlf »

Hi again and thanks!
Sorry, missed this post. "nagios - User for Nagios" has Read and write, group nagios Read-only and Others Read-only.
More thanks, Alar.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: About keeping historical data

Post by slansing »

What report are you getting this error on?
NagAlf
Posts: 26
Joined: Mon Aug 19, 2013 5:43 am

Re: About keeping historical data

Post by NagAlf »

Hi and thanks!
Well, whatever - I suppose - report I try to see I see only last three days. But when I click on Notifications and Latest Archive then at some point to move onto earlier than three days ... I get this error I described (Error: Cannot open log file '/var/log/nagios/archives/nagios-11-09-2013-00.log' for reading!). Well, just sometimes is good to have an earlier look.
More thanks, Alar.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: About keeping historical data

Post by abrist »

What is the output of (post in code wraps please):

Code: Select all

ls -lad /var/log/nagios/archives/
ls -la /var/log/nagios/archives/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked