What is the PRTG Billing Tool and where can I find it?
Important note: The information in this article is outdated. The PRTG Billing Tool is not available anymore. As an alternative, please use the PRTG SLA plugin and customize it to your needs.
The PRTG Billing Tool is an application that can read PRTG sensor data and generate bills in PDF format. It is an Open Source project that uses .NET and Lua scripting. The Billing Tool queries monitoring data via the PRTG API. Please contact us if you would like to have access to the source code.
Managed Service Providers (MSPs) can use this tool to bill their customers for certain traffic usage reported by a specific PRTG sensor. Templates and calculation are customizable to fit many use cases. We provide this tool as a basis to develop your own billing applications.
Note: This tool is intended for advanced users with PRTG experience. We cannot guarantee that it suits your needs. We provide the application "as is". Although we try to answer all questions, this tool is not covered by Paessler's regular next-business-day support offer.
- Microsoft Windows XP or later (except Windows 2008 R2)
- Microsoft .NET version 4
- PRTG V8.2 or later
- PRTG web server must be accessible from the machine running the billing tool.
After installation of the PRTG Billing Tool, at first start-up, the program will ask for information to connect to your PRTG server. Enter the server IP/DNS name, port number, and credentials. Click Ok to connect.
Once connected to your PRTG server, you can add a group and one or more reports in each group. Add new items by clicking the Add buttons.
To generate a report, a few settings are necessary:
- Name: Enter a meaningful name for the report. This will appear in your list of reports.
- Sensor ID: Click the arrow next to this field to see the device tree of your PRTG installation. Select a sensor you want to create the billing report for. You can only select one sensor for each report. Note: If you want to combine the data of multiple sensors, please use a Sensor Factory sensor to consolidate monitoring data and create a billing report for this new sensor.
- Script: Select the Lua script that will be used for the calculation. Scripts are stored in the scripts subfolder of your Billing Tool installation directory.
- Template: Select an HTML template that will be used for PDF generation. Templates are stored in the templates subfolder of your Billing Tool installation directory.
- Average: Define for which time span the monitoring data will be averaged. You can select between several intervals, from a minimum of 5 minutes to a maximum of 1 day.
- Client Address: Enter the client's address. To add this to the bill, use the <#clientAddress> placeholder in your template file.
- Client Info: Enter additional client information. To add this to the bill, use the <#clientInfo> placeholder in your template file.
- Billing Header: Enter a header text to appear on the bill. To add this to the bill, use the <#header> placeholder in your template file.
- Billing Footer: Enter a footer text to appear on the bill. To add this to the bill, use the <#listfooter> placeholder in your template file.
- Percentile: If you want to use a percentile calculation, enable this option and set the respective values. Percentile values will then be available via the Lua function GetPercentile().
- Additional placeholders for template files: <#startdate> and <#enddate> are replaced by the start and end of the selected time span when creating a bill report. <#sensorname> is replaced by the sensor name and ID information. You can also use <#invoicedate>, <#itemtable>, and <#graphpath>.
Click Ok to save your settings. The report is now added to the Reports list.
Click the Run report or Run report group button to generate PDF files. You will be asked for the time period you want to create the report for and then the tool will start querying monitoring data and generate one or more PDF files. You will find them in the directory defined in the Options, by default this is the Documents folder.
Click Configuration | Options to change several settings.
- Company Logo: Define the location of the company logo, including absolute path. To add this to the bill, use the <#headLogopath> placeholder in your template file.
- Report Output Folder: Define the directory where the finished PDF files will be stored.
- Billing Footer: Define a global billing footer text. To add this to the bill, use the <#footer> placeholder in your template file.
PRTG Server Connection
Use these settings to add or edit the connections to your PRTG installation(s).
- Default Billing Header Text: Enter a default Billing Header text that will be applied when creating a new report. You can change this text while creating a new report.
- Default Billing Footer Text: Enter a default Billing Footer text that will be applied when creating a new report. You can change this text while creating a new report.
Once you have configured your report, click Run report to create your report.
Data is written into subfolders of both your Billing Tool installation directory and %LOCALAPPDATA%\Paessler, as well as into the output directory defined in the program's options.