Need to monitor the file deletion

Hi All,

I am looking forward to monitoring the file deletion from my system and trying to generate the alert when its deleted or modified.

Can you please help me out to get the same achieved.

Appreciate the quick turnaround.

Hi, @Avneesh.Jain: You may be able to use the Flex integration to send the result of a dir or ls command to New Relic. You may then configure an alert condition to notify you if the command returns an unexpected result.

I am aware of the flex but somehow couldn’t make for file deletion.

If this is on Linux, I would have Flex execute a command like:

find /path -maxdepth 1 -name 'filename' | wc -l

That will return the number of files matching 'filename' and send it to New Relic with the attribute name you specify.

Then create an NRQL alert condition to notify you if the attribute has a value of 0.

2 Likes