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 With multiple channels the default Unit name.

Votes:

0

Hi team,

I have created a powershell script that will create the following XML file:

<prtg>
   <result>
      <channel>Total Points</channel>
      <value> 43140 </value>
   </result>
   <result>
      <channel>Members</channel>
      <value> 49 </value>
   </result>
   <result>
      <channel> AfgPijnGiver.XL </channel>
      <value> 5140 </value>
   </result>
   <result> 
      <channel> Jeroen </channel>
      <value> 5019 </value>
   </result>
   <result>
      <channel> Floris I </channel>
      <value> 4976 </value>
   </result>
   <result>
      <channel> ~Dr@gonEyez~ </channel>
      <value> 4954 </value> 
   </result>
</prtg>

It works. But the default unit name for the points is # and I would like to have it changed to "Points". Is there a XML line I can add per result where I can define the unit name?

custom-unit prtg unit xml

Created on Feb 8, 2016 8:49:09 PM

Last change on Feb 9, 2016 7:34:47 AM by  Luciano Lingnau [Paessler]



2 Replies

Accepted Answer

Votes:

0

Yes, that's possible.
You have to include <CustomUnit>My Unit</CustomUnit> within each <result>, your script's output has to look like the following:

<prtg>
   <result>
      <channel>Total Points</channel>
      <value> 43140 </value>
      <CustomUnit>Points</CustomUnit>
   </result>
   <result>
      <channel>Members</channel>
      <value> 49 </value>
      <CustomUnit>Points</CustomUnit>
   </result>
   <result>
      <channel> AfgPijnGiver.XL </channel>
      <value> 5140 </value>
      <CustomUnit>Points</CustomUnit>
   </result>
   <result> 
      <channel> Jeroen </channel>
      <value> 5019 </value>
      <CustomUnit>Points</CustomUnit>
   </result>
   <result>
      <channel> Floris I </channel>
      <value> 4976 </value>
      <CustomUnit>Points</CustomUnit>
   </result>
   <result>
      <channel> ~Dr@gonEyez~ </channel>
      <value> 4954 </value> 
      <CustomUnit>Points</CustomUnit>
   </result>
</prtg>

PRTG's API for Custom Sensors is further documented within PRTG under Setup > PRTG API on the Custom Sensors tab.

Note: The values defined with this element will be considered only on the first sensor scan, when the channel is newly created; they are ignored on all further sensor scans (and may be omitted). If you need to you can change this initial setting in the Channel's settings of the sensor later.

Note2: Your "Total Points" don't appear to add up, the sum of all channels is 20138 whilst your total channel outputs 43140.

Created on Feb 9, 2016 7:32:28 AM by  Luciano Lingnau [Paessler]

Last change on Feb 9, 2016 7:37:02 AM by  Luciano Lingnau [Paessler]



Votes:

0

That work. Thanks :)

Created on Feb 9, 2016 7:45:03 AM




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.