Writing log data to multiple files

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
plauda-wf
Posts: 1
Joined: Wed May 10, 2017 1:57 pm

Writing log data to multiple files

Post by plauda-wf »

I am looking for any help I can get with this problem. We want to use ramdisk space for log files so that reports scrubbed from log files will generate faster. As of now the userbase is large enough to keep the disks spinning their heads off all day long. The ramfs works fine but we know there is huge potential for data loss. What I want to do is write log data, status.dat data, and even perfdata, to a separate location as well as to the live ramfs where report reads will still happen.

I have no idea if this is possible. I recall in *nix you can map additional stdout channels to perhaps accomplish this but I can't grok how that could work in nagios.cfg for logfile entries.

Any ideas or thoughts very welcome.

Cheers,
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Writing log data to multiple files

Post by dwhitfield »

The easiest way to do this is just going to be to copy the data off of the ramdisk. There is the possibility of some data loss, but it's minimal. I wonder what the performance hit to that would be though.

I will need to double-check with the developers, but I think any other way of doing it is going to require modifying C code and recompiling Core.
Locked