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>

Article Comments

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


Mar, 2020 - Permalink