New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


XML With multiple channels the default Unit name.

Votes:

0

Your Vote:

Up

Down

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> [email protected]~ </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 by  Jeroen (0) 1

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



2 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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> [email protected]~ </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 Support]

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



Votes:

0

Your Vote:

Up

Down

That work. Thanks :)

Created on Feb 9, 2016 7:45:03 AM by  Jeroen (0) 1



Please log in or register to enter your reply.


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.