I'm trying to include a message in our custom sensor, however the Error Limit Message doesn't seem to be coming through. There is a good chance that I have no idea what i'm doing though.
Here is the xml output from the script
<prtg> <result> <channel>Oldest Snapshot</channel> <value>65</value> <CustomUnit>Days</CustomUnit> <LimitMaxError>30</LimitMaxError> <LimitMode>1</LimitMode> <LimitErrorMsg> SWW-DMZ-LAMP-01 - presendmail : 12/6/2013 12:26:51 PM and 65 days old </LimitErrorMsg> </result> </prtg>
Article Comments
Here is what i'm trying to do. Maybe a little advice on how to implement this is what I need.
Basically i'm looking at our VMware servers for snapshots that are older than 30 days. If there are old shapshots I would like the message to be displayed with the systems that have the old snapshots. It appears however that the error message doesn't get updated each time the sensor is run, however i'm not sure if that's correct.
Another option is that I could have a channel for each guest VM, however i'm not sure what happens if a VM were to migrate from one ESX server to another.
What do you think the best option would be?
Feb, 2014 - Permalink
Hi,
thank you for the clarification.
At the moment there are two ways to implement the sensor for your needs:
- you can define a threshold-notification in combination with the '<text>your message here</text>'-tag. This is OK to be notified but there is no visible state-change in the PRTG UI.
- you can define the limit in your sensor-script and set the result to 'warning' by using the '<warning>1</warning>' in your result-set and return the message you want to return as '<text>your message here</text>'.
This is fine to get a changed state AND the value AND a custom message in one.
If you are using the '<error>1</error>'-tag the value itself can't be used as PRTG is using this state to indicate a severe error like connection-problems or similar.
Kind Regards
Feb, 2014 - Permalink
Hello,
thank you very much for your KB-Post. The problem is that if the measured value, is above the error-limit, the sensor message is overwritten (with the note, that the value is above the limit). I'm afraid this can't be changed. The only work-around would be removing the limit, and instead working with Threshold-Triggers.
best regards.
Feb, 2014 - Permalink