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

XML Sensor returning 0

Votes:

0

Hi

We try to monitor the programm version of installed products on a system trough powershell/xml sensors. Below is the Output from the Script. In PRTG the value is always 0. How can we display this value in a channel? Is it even possible with this kind of value? <prtg> <result> <channel>Version</channel> <CustomUnit>v</CustomUnit> <value> 9.4.15.2827462 </value> </result> </prtg>

Thanks for your help, Mario

custom-script-exe exexml powershell xml

Created on Jun 28, 2017 2:06:20 PM

Last change on Jun 29, 2017 8:09:56 PM by  Dariusz Gorka [Paessler Support]



3 Replies

Votes:

0

Hi there,

Unfortunately, you can't display this value in a channel as it has multiple separation points. You can however display it in the sensors message: <prtg> <result> <channel>Version</channel> <CustomUnit>v</CustomUnit> <value> 0 </value> <text>9.4.15.2827462</text> </result> </prtg>

Best regards.

Created on Jun 29, 2017 8:11:20 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hi

Thanks for your answer, this works. Ive tried to add the status with the <warning> tag which is working, but its not displaying the text. The status changes to orange but just displaying "OK" in the gui.

I got this from the forum here on paessler (https://kb.paessler.com/en/topic/59881-custom-sensor-error-message): 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.

What am i missing? Thanks.

<prtg> <result> <channel>Version</channel> <CustomUnit>#</CustomUnit> <warning>1</warning> <text>10.0.9.3917699</text> </result> </prtg>

Created on Jul 14, 2017 7:12:06 AM



Votes:

0

Hi there,

The issue is, that the "warning" and "text" tags have to be outside of the "result" tag:

 <prtg>
                <result>
                    <channel>Version</channel>
                    <CustomUnit>#</CustomUnit>	
                </result>
                <warning>1</warning>
                <text>10.0.9.3917699</text>
</prtg>


Best regards.

Created on Jul 17, 2017 8:26:34 AM by  Dariusz Gorka [Paessler Support]




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.