Sie sind auf Seite 1von 4

PRTG Tools Family

Addons for your PRTG Network Monitor Server

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.

Command line tool

Custom sensor

www: prtgtoolsfamily.com

email: support@prtgtoolsfamily.com

PRTG Tools Family


Addons for your PRTG Network Monitor Server

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

PRTG Tools Family


Addons for your PRTG Network Monitor Server

Parameters
The mandatory parameters are used to connect to your PRTG Server:
-pu=
-pp=
-ps=
-s=

The username to connect to your PRTG Server.


The password (or PassHash) to connect to your PRTG Server.
The ip-address or hostname with optional port number of your PRTG Server if not protocol is
supplied, HTTP is assumed. (e.g. ps=192.168.1.1:8080 or ps=https://myprtgserver)
A comma separated list of object IDs to get the data for
(e.g. s=1024,1025,1026 or s=1024 for just one sensor)

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

PRTG Tools Family


Addons for your PRTG Network Monitor Server

Export time parameter


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.

Comma Separated Values


In csv files the values are as the name already suggests- separated by commas . This might
however not be consistent with the List Separator setting in your Regional Settings, causing Excel
to open the .csv file like:

Instead off:

Take a look at http://hotware.wordpress.com/2009/12/16/trouble-with-opening-csv-files-withexcel-the-comma-and-semicolon-issue-in-excel-due-to-regional-settings-for-europe/ for an


explanation of this behavior.
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.

www: prtgtoolsfamily.com

email: support@prtgtoolsfamily.com

Das könnte Ihnen auch gefallen