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

Advanced Custom XML sensor

Votes:

0

Hello All,
With the sensor above a powershell script is querying several remote windows services. It successfully return value but and values are showed in the channel. My problems is how can I set the channel in error state? actually are always in green status. Below the XML output-.
Tried also adding tag <error></error> no changes.

Thanks,

<PRTG>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>2</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
  <result>
    <channel>WINDOWS_SERVICE</channel>
    <value>0</value>
  </result>
</PRTG>

#customsensors #powershell #xml

Created on Mar 20, 2020 10:03:25 AM

Last change on Mar 20, 2020 10:10:52 AM by  Birk Guttmann [Paessler Support]



1 Reply

Votes:

0

Hi there,

You can configure thresholds or lookps the same way than it's possible for other sensors here. Therefore, you need to open the channel settings by clicking on the corresponding channel gauge. Here you can enable limits or set a lookup.

If you directly want to set those limits or lookups in the script, you need to use specific XML tags. You can find a full list of those in the API manual. Therefore, navigate to Setup | PRTG API | Custom Sensors. Note, that limits wont change after the sensor is already created.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Mar 20, 2020 10:46:10 AM by  Birk Guttmann [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.