I am using the latest version of Nagios and am curious if there is a way to have more logs than what shows? I had a server go down and unfortunately in the morning when I went to check the logs only errors I had were what looks like knee deep in the middle of a bunch of messages you would expect when the system was down. No messages specific to right before it happened and what caused it, just resulting services not responding. Do I have to install some kind of database or something on top of what I have in order to have extended logs? Look like they are just same day entries or something. Know I had a MySQL DB behind Nagios before at my old job, just don't recall what I did since I didn't take my documentation with me.
Thanks.
JR
Extend log history
Re: Extend log history
Which log file are you looking at? Is this your nagios.log or do you mean your syslog?
Rob Hassing


Re: Extend log history
If you mean by syslog the CentOS logs obviously not those as I wouldn't expect Nagios to manage that. I'm talking like the log of what events happened on each host and what errors were sent out by each service, etc.
Thanks.
JR
Thanks.
JR
Re: Extend log history
Looks like there is all kinds of stuff in there but when I sort the history from oldest to newest it's just for the last 12 hours or so.
Thanks.
JR
Thanks.
JR
Re: Extend log history
SO I select a host, click View Alert History for this host. It shows data for two hours ago. Click the arrow that says "Latest Archive". It says "No history information was found for this host in this archived log file". Oh wow. Do I have to keep clicking back? I noticed when I click on earlier archive again and again it keeps cycling thru each log file one at a time showing me what's relevant for this host.
Re: Extend log history
You could also try and change the date in the top of the screen and set the start date back a few days.
Rob Hassing


Re: Extend log history
Brutal. Does it work any differently if you install ndoutils? Though I've tried that a few times and although successful keeps complaining "Support for the specified database server is either not yet supported, or was not found on your system." even though DB is running. If that's how it works all good just thought it would show more per file since I don't have a lot going on in each day. How frequently does it switch to a new log file and can that be controlled?
Funny, if ndoutils is a good answer, there are all these docs on installing it on nagios 4 with Centos 7 and talk about installing MySQL-server which isn't used anymore so curious how they got it working with a simple yum statement like all the docs say.
Thanks.
JR
Funny, if ndoutils is a good answer, there are all these docs on installing it on nagios 4 with Centos 7 and talk about installing MySQL-server which isn't used anymore so curious how they got it working with a simple yum statement like all the docs say.
Thanks.
JR
Re: Extend log history
I might have answered this indirectly in your other thread: https://support.nagios.com/forum/viewto ... 95#p176268jriker1 wrote:Does it work any differently if you install ndoutils?
But basically, Core does not read from NDO, so no.
That would be configured in nagios.cfg by setting the log_rotation_method directive.jriker1 wrote:How frequently does it switch to a new log file and can that be controlled?
https://assets.nagios.com/downloads/nag ... ion_method
I think you can basically replace "MySQL" with "MariaDB" and get the same results. The underlying protocols are the same.jriker1 wrote:Funny, if ndoutils is a good answer, there are all these docs on installing it on nagios 4 with Centos 7 and talk about installing MySQL-server which isn't used anymore so curious how they got it working with a simple yum statement like all the docs say.
Former Nagios employee