Forum Discussion
Yes, but I want the email to include the filename that triggers the alert.
If you're okay with only checking every 15 minutes, you could turn this into an active discovery script and make the filename the wildalias or a property that gets discovered and then in your alert email reference the instance or property name with like ##INSTANCE## or ##PROPERTYNAME##.
- 10 hours ago
Did not check it, could not find any good documentation about this how to implement.
- Justin_Lanoue9 hours ago
Advisor
I don't currently have time to write it but basically you want the active discovery script out to be like below in the format of "WILDVALUE##WILDALIAS##DESCRIPTION"
Write-Host "NewestFile##NewestFile##NewestFileDate"
This will discover an instance.
Then to output values on that instance in your collection script, you need to format like "NewestFile.NumberofFiles=Value"
It's a little messy and you might want to have the discovery script discover like a "Dummy" instance to display your NumberofFiles datapoint always and then when that file you want to alert on gets discovered, maybe have script logic to only alert on instances that aren't called "Dummy" with an "Alert" datapoint if that makes sense.