Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
72:custom_reports_accessing_data_reading_data [2019/02/07 14:06] – created ext-bkkr | 72:custom_reports_accessing_data_reading_data [2019/03/06 18:53] – ext-bkkr | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Reading Data Collector Results ====== | ====== Reading Data Collector Results ====== | ||
+ | To read the results that a data collector has written into the metric database, you can use the javascript funtion ' | ||
+ | |||
+ | Prerequisites: | ||
+ | |||
+ | * An existing Data Collector | ||
+ | * The Data Collector has collected some valid data. | ||
+ | |||
+ | If there is no Data Collector, you have to create one. | ||
+ | |||
+ | // | ||
+ | |||
+ | 1. Create a Report with a Stages Data Source and a Data Set | ||
+ | |||
+ | 2. Add the Result Set Columns which you want to retrieve from your data collector. | ||
+ | |||
+ | //Notice: The data collector automatically adds a column with the name ' | ||
+ | |||
+ | 3. Copy the Data Set Script from below into your Data Set. | ||
+ | |||
+ | 4. Change the CollectorName variable to match with your collector name. | ||
+ | |||
+ | 5. Add your column names in the array AllColumns. | ||
+ | |||
+ | //Notice: The column CreationTime is always available.// | ||
+ | |||
+ | < | ||
+ | function GetMetricResults(myMetric, | ||
+ | var metrics_collectors = | ||
+ | | ||
+ | for (var j = 0; j < | ||
+ | if (metrics_collectors[j].getProperty(" | ||
+ | var metrics_results = | ||
+ | | ||
+ | for (var i = 0; i < | ||
+ | for (var k = 0; k < | ||
+ | | ||
+ | | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | var CollectorName = "My First Collector"; | ||
+ | var AllColumns = new Array(" | ||
+ | GetMetricResults(currentMetric, | ||
+ | </ | ||