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

How can I use graphs from PRTG in other web pages?

Votes:

0

I want to include live Graphs from PRTG in other web pages. How can I manage this?

api did-you-know font graphs prtg tips tricks web-page

Created on Feb 3, 2010 4:23:59 PM by  Ariane Anacker

Last change on Aug 17, 2015 5:10:11 AM by  Luciano Lingnau [Paessler]



3 Replies

Votes:

0

This article applies to PRTG Network Monitor 12 or later as well as to previous (deprecated) versions

Using Graphs From PRTG Network Monitor in Other Web Pages

If you want to include live graphs that always show live traffic pattern (or other measured values) from PRTG in your own webpages (e.g., intranet), you have three options that use different authentication methods:

1. Use a Map in an <IFRAME>

The quickest solution is to create a map using the desired pixel size. This map will be included in your webpage with an IFRAME:

  1. Create a new map, select the size you need and set enable the Allow Public Access option.
  2. Create a layout for the map by placing graphs and/or other objects on the map.
  3. Go to the Get HTML tab of the map in PRTG.
  4. Copy the IFRAME HTML code provided by PRTG under Option 3 and paste it into your webpage code.

The HTML code will look similar to this:

<iframe width=250 height=400 frameborder="1"
  src="http://YOUR_PRTG_SERVER_IP/public/mapshow.htm?id=2017&mapid=775A930E-6A91-4CFD-BC31-19AB6B68331C">
 </iframe>

Hint: If you encounter issues displaying the map in an iFrame on intranet sites using Internet Explorer 11, open Compatibility View settings in IE and uncheck Display intranet sites in Compatibility View.

2. Using Group, Device, or Sensor Graphs in Other Webpages (with login/password in the URL)

The URL for a chart looks like this:

http://your_prtg_server_ip/chart.png?type=graph&width=300&height=160&username=prtgadmin&password=prtgadmin&graphid=2&id=0

The parameters are:

  • type: Must be set to "graph"
  • graphid: Selects graph number (0=live, 1=last 48 hours, 2=30 days, 3=365 days)
  • width: Width of the image in pixels
  • height: Height of the image in pixels
  • username: Username of a PRTG user account
  • password: The password for this user account
  • Alternatively: passhash: The passhash for this user account
  • id: The object ID of the desired graph object
  • graphstyling: allows to control some graph styles
    • Display legend: graphstyling=showLegend%3D%271%27
    • Hide legend: graphstyling=showLegend%3D%270%27
    • Control font size: graphstyling=baseFontSize%3D%27XX%27 (xx is the font size)
    • Control legend and font size at the same time: graphstyling=showLegend%3D%271%27+baseFontSize%3D%275%27


As of PRTG V13:

  • bgcolor
  • plotcolor
  • plotcolor1
  • plotcolor2
  • gridcolor

Note: For more details and currently available options in your PRTG version, please navigate to PRTG API Documentation in your PRTG installation: Setup | PRTG API | Live Graphs

You can find the id of an object by navigating to the object in the web interface and looking at the id parameter of the URL.

You may have noticed that the URL above contains a username and a password which can imply security concerns. Please set up a dedicated user account that only has, e.g., "read" privileges for the root group and all underlying entries. Or choose one of the other options.

3. Using Group, Device, or Sensor Graphs in Other Webpages (via the Maps Feature)

Another option is to use graph PNG files from public maps. These PNG files can be accessed without a username/password combination by adding the Map ID to the image URL. Using this option you do not need to supply a username/password. The parameters are the same as above.

  1. Create a new map and set enable the "Allow Public Access" option.
  2. Copy the mapid string as given in the Get HTML tab under Option 2 or 3. For example: 775A930E-6A91-4CFD-BC31-19AB6B68331C
  3. Edit the map and add the graphs you want to use externally to the map (this is important: only the graphs of objects that are actually shown on the map will be available).

Now use the following URL for your charts (of course, adjusted to your settings):

http://YOUR_PRTG_SERVER_IP/public/chart.png?type=graph&id=2003&graphid=0&width=200&height=100&mapid=775A930E-6A91-4CFD-BC31-19AB6B68331C

Note that authentication is now performed using the mapid parameter instead of username/password.

More

Created on Feb 3, 2010 4:26:15 PM by  Ariane Anacker

Last change on Oct 5, 2021 12:42:04 PM by  Timo Dambach [Paessler Support]



Votes:

0

hello. is it somehow possible to specify the scale? like for CPU load graphs, it always autoscales and for one graph, the max might be 25%, for another its 40% etc. besides each other on a overview page with many server cpu graphs aside each other, this looks funny and non conclusive. i would like to fix the scale to 100% for all of them. thanks for some insights, lukas

Created on Apr 23, 2014 5:24:49 PM



Votes:

0

Lukas, please try using manual scaling in the Channel Settings on those sensors (that shall have their graphs published). This might help.

Created on Apr 24, 2014 1:06:53 PM by  Torsten Lindner [Paessler Support]




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.