Reporting changed file's difference ?

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
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Reporting changed file's difference ?

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Reporting changed file's difference ?

Post 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.
Previous Nagios employee
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: Reporting changed file's difference ?

Post by nagmoto »

Thanks for your analysis, please close this thread.
Locked