Hey,
I would like to know, where I can set a value to update the "Last report" after a warning occured, if even possible...
To explain a bit more: I am using a powershell script to monitor large files. The script checks for files larger than 50GB in a certain directory. After the directory is processed the script also outputs my thresholds (hardcoded, just so I can see some lines in the PRTG graphs.
ForEach{ Write-Host "<result>" Write-Host "<Channel>$filename</Channel>" Write-Host "<Value>$filesize</Value>" Write-Host "</result>" } # threshold warning @ 55GB Write-Host "<result>" Write-Host "<Channel>Grenzwert Warnung</Channel>" Write-Host "<Value>59055800320</Value>" Write-Host "<CustomUnit>MB</CustomUnit>" Write-Host "<VolumeSize>MegaByte</VolumeSize>" Write-Host "</result>" # threshold error @ 60GB Write-Host "<result>" Write-Host "<Channel>Grenzwert Fehler</Channel>" Write-Host "<Value>64424509440</Value>" Write-Host "<CustomUnit>MB</CustomUnit>" Write-Host "<VolumeSize>MegaByte</VolumeSize>" Write-Host "</result>"
I wrote the thresholds at the end, so I can see the largest file as primary channel in PRTG
Everything works as intended and I get the following warning once a file got above 55GB
Now here is the problem: After shrinking the file below 50GB I of course get "no value" for the channel that was created for the former large file.
But the "last report" from the seconds screenshot persists!
I noticed I can get rid of the warning by switching primary channel to e.g. "Laufzeit" and back again, but would like to know:
-> Would there be a programmable solution for this? Can I tell PRTG that if the value for a channel is "no data / no value" the last report should change to OK:
Add comment