Hello
I am trying to create PowerShell XML sensor for bandwidth I/O. Currently , I can see my value as Mbyte in prtg , I would like to see it as Mbyte/s ,Similar to In-built SNMP traffic sensor. Could you teach me settings I should use for the following things in my script - <Unit> <SpeedSize> <VolumeSize> <Mode>
Note - I have my channel settings set to Mbyte and Mbyte / Second
Thanks a lot, Amar
Article Comments
Hi Arne,
Thank you for your reply.
I want to measure actual bandwidth IN/OUT per sec. I tried using speednet in Unit and I am getting MBit/s Can I use <SpeedSize> and convert it to MegaByte ?
Regards
Nov, 2014 - Permalink
Using a Custom Unit will get you the result you're looking for:
<prtg> <result> <Channel>Download Speed</Channel> <Unit>Custom</Unit> <CustomUnit>Mb/s</CustomUnit> <Float>1</Float> <Value>122.06</Value> </result> </prtg>
Nov, 2014 - Permalink
Hello,
Thank you all for the reply. I could accomplish this using Unit - speednet and changing volume size to MegaBit. Also from the webui , If I change default channel unit to MegaByte , All the graphs are showing in MegaBytes/s.
I am now confused about what mode to use - Absolute / Difference. Could you please tell me when to use Aboslute OR Difference. I want to be able to see traffic going in and coming out of my device.
Thanks a lot !
Nov, 2014 - Permalink
You would use the 'difference' mode when the target device returns data that keeps adding up and you want the sensor to show the data used per scan interval.
Absolute mode | Difference mode | ||
---|---|---|---|
Scan interval | Device returns | Sensor reports | Sensor reports |
1 | 100 | 100 | |
2 | 200 | 200 | 100 |
3 | 250 | 250 | 50 |
Nov, 2014 - Permalink
Hi,
Great , Thank you so much for the explanation. I realized big mistake in my script. Could you help me with the following , I don't want to see traffic_in (volume) , I haven't included any volume parameter in <result> and I cant figure out how to get rid of it also is it possible to get in traffic_total somehow ?
Screen shot - http://prntscr.com/58huwr
Regards
Nov, 2014 - Permalink
Dear amarc
The available units are:
BytesBandwidth BytesMemory BytesDisk Temperature Percent TimeResponse TimeSeconds Custom Count CPU BytesFile SpeedDisk SpeedNet TimeHours
("CPU" actually is "Percent")Depending on what the sensor is measuring (increasing traffic volume or actual bandwidth) you either need to use the <Mode> Difference, or Absolute.
As you want to get Mbyte/s, please use the according <SpeedSize> of MegaByte.
Nov, 2014 - Permalink