What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Custom Sensor with text values, not numbers

Votes:

0

I am trying to monitor status of an HP p2000 using the technique listed here http://www.remilner.co.uk/?p=276

This works, but many of the values returned from the p2000 command line do not display as numbers, they display as text statuses, for example they return the value "OK"

In turn, my XML looks like this

<prtg> <result> <channel>Power Supply 1</channel> <value>OK</value> </result> </prtg>

In the prtg monitor this shows up as just as the number Zero in the table of channels for my custom Sensor.

Is it possible for the <value></value> field to to have a non numeric value?

I have searched the faq on line and I cannot find any examples of using non numbers in this field.

api powershell xml

Created on Jan 21, 2013 4:39:05 AM



Best Answer

Accepted Answer

Votes:

1

If you modify your custom sensor, to return numeric values instead of text: i.e. if ($value -eq "OK") { Write-Host "<value>1</value>" } else { Write-Host "<value>0</value>" }

then you can use the PRTG lookups feature to recreate a meaningful message for the value

For more information, see PRTG Manual: Define Lookups.

Created on Jun 17, 2013 2:04:29 PM

Last change on Jul 18, 2018 1:44:11 PM by  Brandy Greger [Paessler Support]



3 Replies

Votes:

0

I'm afraid the value field has to be provided with a numerical entry.

Created on Jan 22, 2013 12:49:07 PM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Accepted Answer

Votes:

1

If you modify your custom sensor, to return numeric values instead of text: i.e. if ($value -eq "OK") { Write-Host "<value>1</value>" } else { Write-Host "<value>0</value>" }

then you can use the PRTG lookups feature to recreate a meaningful message for the value

For more information, see PRTG Manual: Define Lookups.

Created on Jun 17, 2013 2:04:29 PM

Last change on Jul 18, 2018 1:44:11 PM by  Brandy Greger [Paessler Support]



Votes:

0

We always love to see if one customer helps another. In this case the answer is absolutely perfect. At the time, when Patrick answered the ticket, the lookup feature was not yet available. Thank you very much!

Created on Jun 17, 2013 3:32:48 PM by  Johannes Herrmann [Paessler Support] (1,360) 2 2




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.