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


Retrieving Channel Maximum Values via API

Votes:

0

Your Vote:

Up

Down

I have a large population of gigabit switches and I am looking to decide where to deploy replacement 10gigabit switches.

I want to target locations where links are close to saturation at 1gbps and could benefit from the additional bandwidth.

I have bandwidth sensors on all of the switch ports and from the web interface I can look at the sensor channels and see the maximum values for Traffic In and Traffic Out. I want to be able to write a script that will extract these Maximum values and provide me with a report on the switches with the highest peak traffic interfaces.

I guess I can pull the full data set and then find the maximum value myself but since the Maximum is shown in the web interface I was wondering if it can be extracted more efficiently.

api bandwidth script

Created on Dec 13, 2019 2:36:36 PM by  Ed McGuigan (180) 1 1



2 Replies

Accepted Answer

Votes:

1

Your Vote:

Up

Down

I actually found that I was able to get that value via the API.

<YourPRTGServer>/api/table.json?content=channels&output=json&columns=name,maximum_&id=69214&username=*******&passhash=******
{
  "prtg-version": "19.4.54.1506",
  "treesize": 0,
  "channels": [
    {
      "name": "Broadcast in",
      "name_raw": "Broadcast in",
      "maximum": "1,137 #",
      "maximum_raw": 1136.9242
    },

:
    {
      "name": "Traffic In",
      "name_raw": "Traffic In",
      "maximum": "3,069,067 KByte",
      "maximum_raw": 3142724860.0000
    },
    {
      "name": "Traffic Out",
      "name_raw": "Traffic Out",
      "maximum": "3,250,588 KByte",
      "maximum_raw": 3328601710.6920
    },
:
    {
      "name": "Unicast out",
      "name_raw": "Unicast out",
      "maximum": "2,251,595 #",
      "maximum_raw": 2251595.0507
    }
  ]
}

I took the maximum_raw value and multiplied by 8 to get a bits count, then divided by my polling interval size ( 300 seconds in my case ).

I had hoped to be able to apply a filter on the returned channels because I only want 'Traffic In' and 'Traffic Out' but I don't think it can be done.

What I also found though was that the absolute peak value isn't as useful to me as I hoped. One freak event can generate this peak value and it may not be reflective of what I really wanted which would be the "average daily peak" a measure of the maximum demand regularly placed on the links. I think I am going to look at pulling out raw data through the Report API and then filtering out weekends and non-business hours before looking at the data.

Created on Dec 18, 2019 3:00:09 PM by  Ed McGuigan (180) 1 1

Last change on Dec 19, 2019 9:47:19 AM by  Birk Guttmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

Thanks for sharing your knowledge. Yes, you are right, one time peeks are usually not very expressive.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Dec 19, 2019 9:46:24 AM by  Birk Guttmann [Paessler Support]



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.