I have a request to check for a file modification time if its more that 10 minutes. it should alert in ITRS as well as send a mail. The netprobe is installed on Windows. I have tried to use use Toolkit plugin and placed a powershell script in the samplescript section like "powershell -command path\filename" and in the Advanced section randomly put the filename as "test.txt" and when am trying to sample its showing "script path not found"
$source="C:\Users\Desktop\manoj.txt"
$Now=GET-DATE
$ModTime=(Get-ItemProperty -path $source -Name LastWriteTime).lastwritetime
"Filename,Sysdate,Last Modified,Time difference
$source,$now,$ModTime,$TimDiff"|ConvertTo-Csv -NoTypeInformation
Requirements
Thanks in advance!!!
Sample rule:
If value > 600 then
Severity critical
Run action_name
Else
Severity ok
endif