Avatar

Correct answer by
Community Advisor

Hi,

If you're on Linux: make a new js activity and paste this in, put after scheduler activity or anywhere really:

var DIR = '/absolute/path/to/collector/dir';

var DAYS_UNTIL_THINGS_START_LOOKING_SUSPICIOUS = 2;

var modified = new Date();

modified.setTime(execCommand('stat -c %Y ' + DIR)[1] * 1000);

if((new Date() - modified) / (86400 * 1000) > DAYS_UNTIL_THINGS_START_LOOKING_SUSPICIOUS)

  logError('Error: Collector directory last updated too long ago: ' + modified);

Thanks,

-Jon

View solution in original post