Page 1 of 1

Reporting changed file's difference ?

Posted: Wed Oct 12, 2016 3:59 am
by nagmoto
I have a need to monitor file and when it got changed, trigger an alert and send out the diff.
Looking around, I can only find check_file(R1) and check_fileage(R2).
Both can send out alert when files got changed within a time range, but not the diff output of what got changed.

Is there such a plugin I am looking for ?

R1: https://exchange.nagios.org/directory/P ... le/details
R2: https://exchange.nagios.org/directory/P ... ck/details

Re: Reporting changed file's difference ?

Posted: Wed Oct 12, 2016 9:26 am
by avandemore
You could build some type of inotify daemon and have it interact w/ Nagios eg NRPE, but I'm not aware of any thing available to do that. Also the first about "build some type of inotify daemon" would be very difficult because how would it find the pre-modification state? About the easiest way I can think of doing something similar is using ZFS and doing a diff on snapshots, but that's a time not event based approach.

Re: Reporting changed file's difference ?

Posted: Wed Oct 12, 2016 12:11 pm
by nagmoto
Thanks for your analysis, please close this thread.