Professional Documents
Culture Documents
CSVExport PDF
CSVExport PDF
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
Parameters
PTF CSVExport comes with a set of mandatory and optional parameters. Double clicking the .exe
shows a list of all available parameters.
Parameters
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= Average interval in seconds. use 0 to download raw data (= results of all single
monitoring requests)
-sd= 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.
-ed= 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.
-fc= A comma separated list of column names to be used as export filter e.g. fc=datetime,value
-ac= A list of columns and fixed values to be added to the result.
e.g. -ac="Probe,NewYork|Device,WinXP"
-wu= 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
valid Windows account that has sufficient rights to create files. Use this parameter to supply
the username.
-wp= The password (or PassHash *) of the Windows account to use.
-f= The folder where the exported data should be copied to.
-e= By default, a .csv file is created. Supplying e=XML will create a .xml file.
-t= 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)
-to= The connection timeout to your PRTG server in seconds (default = 10 sec).
-co 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!
-nh Using this switch, the column headers of a .csv file are not exported.
-ns Using this switch, the summary line (last line in a .csv file) is not exported.
-id Using this switch, the sensor-ID is added to each line or xml section in the export file.
-spm 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.
If you want to use PTF CSVExport as a sensor on your PRTG Server, set the sensor to run every 30
minutes. By supplying the t=02:00 parameter, it will only export data once a day the first time its
run after 02:00.
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:
To overcome this behavior, PTF CSVExport takes a look at the List Separator setting in your
Regional Settings and uses this character to separate the values. So a comma separated value file
might in fact become a semicolon separated value file or a tab separated value file or a.