I created an exexml sensor which should only have 3 values

  • 0 = downtime
  • 50 = failed over
  • 100 = not failed over

for example the script xml output for the result "50-failed over" looks like this:

$xmlToPRTG = @" <prtg> <result> <channel> Failover Monitor </channel> <value>50</value> <LimitMode>0</LimitMode> </result> </prtg> "@;

Similar XML output exists for the 100-not_failed_over result

I also use a lookup table to convert the value 50 into the status "failed over" etc

This creates the sensor correctly. The "live data" chart looks ok - the y axis is in units "#" However the 2-day and 30-day charts have the y axis in units of "%" and i can't find what controls this?

I would like all 3 charts to have units of "#"


Article Comments

Hello,

Thank you very much for your KB-Post. The percentage graphs (2 Days, 30 Days & 365 days) on sensors which use Lookup are normal and intended.

In a Lookup you have a "Desired Value", which should be the optimal value for the sensor. For reports and sensors graphs (except the Live graph) PRTG then calculates a percentage, how much time of the average period the sensor value was the same as this desired value. Let me show a quick example, let's assume you have a report with 1 hour averages. And for 30 minutes the sensor had the result 2 and for the other 30 minutes it had the result 3. The average would now be 2.5, which does not make any sense, because it's not in the lookup at all. Thus the percentage (of the time in relation to the desired value).

best regards.


Jul, 2016 - Permalink

Hi Torsten Great i was really struggling to understand what the "Desired Value" stuff was all about for Lookups.

So basically use of lookups means that my 2-day and 30-day graphs will always show a percentage of time in "Desired Value" state.

What i'd really like to be able to do here is just to have a sensor that shows a binary value: 0 = failed over 1 = not failed over

but instead of even showing the numbers on the graph it would be nice to just show the named binary states (why i started looking into lookups).

Is there any solution for this?


Jul, 2016 - Permalink

I'm afraid graphs cannot show the lookup conventions. Sorry.


Jul, 2016 - Permalink

thanks

one last question (i think)

is there a way to set custom legends/text within each chart?

I can see that it can be done in "Maps" view, but not in regular charts..


Jul, 2016 - Permalink

Sorry, custom legends are not possible either.


Jul, 2016 - Permalink

ok many thanks!


Jul, 2016 - Permalink