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


How can I change the size of graphs in reports?

Votes:

0

Your Vote:

Up

Down

I would like to change the size of graphs in reports. How can I do this?

how-to modify-templates prtg reporting template

Created on Nov 10, 2017 9:24:48 AM by  Brandy Mauff [Paessler Support]



1 Reply

Accepted Answer

Votes:

0

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 17.4.35 or later

Changing the Size of Graphs in Reports

Graphs are added to reports as include files. To change the appearance of a graph, you can create a custom graph include file and add a separate main report template file, in which you are using your custom graph file.

A template consists of several template files. When creating a report, the web engine pastes all these "includes" together into one HTML file to generate the report. In order to modify a report template, changes to the main file, to one of the include files, or both are necessary.

Note: Good knowledge of HTML is a minimum requirement to make any of the following modifications! Please note that modifications are unsupported.

Make a backup of every file you are going to change!

  • Step 1: In the \webroot\reporttemplates subfolder of your PRTG installation, locate the main report template file of the report of which you want to change the graphs, for example, "A50 Graph with Data Table - Graph 24h - Table 24h.htm". Please make sure that you actually choose a report that contains a graph.
  • Step 2: Once you've found the right template file, duplicate it and save it with a custom name.
    Tip: Choose a filename with a leading 0 (zero) and your template will appear at the top of the list later on. The entries in the dropdown list are sorted alphabetically based on the filenames.
  • Step 3: Open the file with a text editor. You may need to open the editor as an administrator user to be write-enabled.
  • Step 4: Choose a name for your report template and write it into the HTML comment in the first line of the source code. The format is "category: name". Category (with grey background) and name will appear in the template selection dropdown in the PRTG web interface later on. Save the HTM file.
  • Step 5: Search for a line containing the string #report type="list", for example <#report type="list" name="details\Graph plus 30day graph and Table.htm" subname"details\Detail Loop.htm" graphaverage="86400" tableaverage="86400"> This is the place where the graph is included. Remember the HTM filename.
  • Step 6: In this include call, change the filename of the HTM file that is called. For example, append _custom to the filename call. The changed line will look like this: <#report type="list" name="details\Graph plus 30day graph and Table_custom.htm" subname"details\Detail Loop.htm" graphaverage="86400" tableaverage="86400">
  • Step 7: Go to the \webroot\reporttemplates\details subfolder of your PRTG installation.
  • Step 8: Find the HTM file that is called in the source code of the main report template file (see Step 5).
  • Step 9: Duplicate this HTM file and save it with the custom name you used in Step 6. For example, append _custom to the filename. Make sure the resulting file name matches the one you used in Step 6.
  • Step 10: Open the file with a text editor. You may need to open the editor as an administrator user to be write-enabled.
  • Step 11: Search for lines containing the string #report type="chart". For example, you will find the line: <#report type="chart" graphid="<@subid>" repsensid="<@objectid>" avg="<@graphaverage>" sdate="<@start>" edate="<@end>" width=850 height=630 graphstyling="baseFontSize='12'%20showLegend='0'" tooltexts="1" refreshable="true"> <div style="width:850px"><#report type="legend" repnodeid="<@subid>" repsensid="<@objectid>" width="850">
  • Step 12: In this code, change the width=850 height=630 values (in pixels) as you like and save your changes.
  • Step 13: In PRTG, create a report using the new template you created in Step 4 and check the modified layout.

See Also

Created on Nov 10, 2017 10:29:33 AM by  Brandy Mauff [Paessler Support]

Last change on Mar 23, 2018 12:42:26 PM by  Brandy Mauff [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.