Professional Documents
Culture Documents
CSV Export
CSV Export
CSVEXPORT
PTF CSVExport retrieves monitoring data from your PRTG Server and exports it to a .csv or .xml file.
Prerequisites
CSVExport targets the .Net Framework 2.0 that comes with Windows update and is already included
in the default installation of Windows 7
Tool or Sensor
Actually, its both. CSVExport by default gets yesterdays monitoring data for the given sensors.
Adding CSVExport to your Windows task scheduler can give you multiple export files (one for every
sensor that you supply) in the folder of your choice every day. Adding CSVExport as a custom sensor
to your PRTG Server can do the same thing.
Custom sensor
www: prtgtoolsfamily.com
email: support@prtgtoolsfamily.com
Parameters
PTF CSVExport comes with a set of mandatory and optional parameters. Double clicking the .exe
shows a list of all available parameters.
www: prtgtoolsfamily.com
email: support@prtgtoolsfamily.com
Parameters
The mandatory parameters are used to connect to your PRTG Server:
-pu=
-pp=
-ps=
-s=
Thats it! With these parameters CSVExport will get yesterdays data for the given sensors and
produce .csv files in the folder where CSVExport is started from.
Optional parameters
-av=
-sd=
-ed=
-fc=
-ac=
-wu=
Average interval in seconds. use 0 to download raw data (= results of all single
monitoring requests)
If you dont want to export yesterdays data , you can use this parameter to provide your
own start date and time in the yyyy-mm-dd-hh-mm-ss format.
A start date of 01/01/2009 at 01:00 would look like sd=2009-01-01-01-00-00
Entering a numeric value like sd=60 will subtract the number of minutes from the current
date and time.
The end date of your custom time range.
Entering a numeric value like ed=60 will subtract the number of minutes from the current
date and time.
A comma separated list of column names to be used as export filter e.g. fc=datetime,value
A list of columns and fixed values to be added to the result.
e.g. -ac="Probe,NewYork|Device,WinXP"
If you want to export the sensor data to a file on a location (server\share) where the default
(system) account that your PRTG Server runs on has no rights, you can supply credentials of
a
-wp=
-f=
-e=
-t=
-to=
-co
-nh
-ns
-id
-spm
valid Windows account that has sufficient rights to create files. Use this parameter to supply
the username.
The password (or PassHash *) of the Windows account to use.
The folder where the exported data should be copied to.
By default, a .csv file is created. Supplying e=XML will create a .xml file.
This parameter is used to set the export time in 24h format when PTF CSVExport is used as a
Sensor. (e.g. t=02:00 will export the data the first time the sensor is run after 02:00 every
day)
The connection timeout to your PRTG server in seconds (default = 10 sec).
Using this switch, the data of multiple sensors is exported into one file.
This automatically includes the ns and id option. As different sensor types have different
output structures, only combine the output of sensors that are of the same type when using
.csv files!
Using this switch, the column headers of a .csv file are not exported.
Using this switch, the summary line (last line in a .csv file) is not exported.
Using this switch, the sensor-ID is added to each line or xml section in the export file.
The maximum numbers of sensors to process per minute (default = 5).
This prevents PRTGs overload protection, allowing only 5 API requests of this kind per
minute, from kicking in.
www: prtgtoolsfamily.com
email: support@prtgtoolsfamily.com
PassHash
If you dont want to supply you passwords as clear text on the command line or parameter section
of the sensor, you can use the PassHash Tool to encrypt your password.
Instead off:
www: prtgtoolsfamily.com
email: support@prtgtoolsfamily.com