Hi support,
I have this code (showed below just the first chanel of the sensor) :
Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Age labase.sql (local)</channel>" Write-Host "<value>"([math]::Round(((get-date)-$valeur_labase_sql.LastWriteTime).Totalminutes))"</value>" Write-Host "<LimitMaxError>1440</LimitMaxError>" Write-Host "<LimitMode>1</LimitMode>" Write-Host "</result>" [...] Write-Host "</prtg>" Exit 0
And powershell return this:
<prtg> <result> <channel>Age labase.sql (local)</channel> <value> 3562 </value> <LimitMaxError>1440</LimitMaxError> <LimitMode>1</LimitMode> </result> [...] <prtg>
However, my sensor never goes down.
What should I do ?
Cordially.
Article Comments
Hello,
I understand. But on fresh installation, the sensor does not use the limit.
I think that will not do the job: my script will use different limit depending the day of the week. By exemple : if the day is monday, the limit is 1440 if the day if saturday, the limit is 4320
Is this possible ?
May, 2018 - Permalink
Hello John,
By default this is not possible. As workaround you can do the following:
- Create one Sensor with the limit for Monday and one with the limit for Saturday.
- Create a schedule (Setup | Account Settings | Schedules) for only Monday and one for only Saturday.
- Assign this schedules in the corresponding Sensor settings
This way the Sensors with the corresponding limits will only run in the specified time spans.
Kind regards,
Birk Guttmann, Tech Support Team
May, 2018 - Permalink
Hello there,
Thanks for your inquiry, we appreciate your contact regarding this matter!
The limits set in a script are only used when creating the Sensor, after the sensor has been created, these are no longer taken into account. You can change the limits in the channel settings (click on the corresponding channel in the sensor overview).
Please let me know if this explains the behavior.
Kind regards,
Birk Guttmann, Tech Support Team
Apr, 2018 - Permalink