Description Usage Arguments Details Value See Also Examples
This function fetches time-series from ATSD and creates a data frame from it.
1 2 3 4 |
metric |
Required string argument.
The name of the metric you want to get data for.
For example, |
entity |
Optional string argument.
The name of the entity you want to get data for.
If not provided, then data for all entities will be fetched
for the specified metric.
Obtain the list of entities and their tags with the
|
entity_group |
Optional string argument.
You could specify a group of entities and extract data
for entities from this group.
For example, |
entity_expression |
Optional string argument.
Select entities matching particular name pattern and/or user-defined entity tags.
The syntax of the |
tags |
Optional string vector argument.
List of user-defined series tags to filter the fetched time-series data,
for example,
|
selection_interval |
Required string argument. This is the time interval for which the data will be selected. Specify it as "n-unit", where unit is a Second, Minute, Hour, Day, Week, Month, Quarter, or Year and n is the number of units, for example, "3-Week" or "12-Hour". |
end_time |
Optional string argument.
The end time of the selection interval, for example,
|
aggregate_interval |
Optional string argument.
The length of the aggregation interval.
The period of produced time-series will be equal to the
|
aggregate_statistics |
Optional string vector argument. The statistic function used for aggregation. List of available functions: "Avg", "Min", "Max", "Sum", "Count", "StDev", "WAvg", "WTAvg", "Percentile 50", "Percentile 75", "Percentile 90", "Percentile 95", "Percentile 99", "Percentile 99.5", "Percentile 99.9". Multiple values are supported, for example, c("Min", "Avg", "StDev"). The default value is "Avg". |
interpolation |
Optional string argument If aggregation is enabled, then the values for the periods without data will be computed by one of the following interpolation functions: "None", "Linear", "Step". The default value is "None". |
export_type |
Optional string argument.
It can take one of two values: "History" or "Forecast". The default value is "History".
For example, |
verbose |
Optional boolean argument.
If |
The function has only two required arguments:
metric
and selection_interval
.
Type
browseVignettes(package = "atsd")
to view the complete package documentation and usage examples.
The function returns a data frame. It could be empty if no data match your query or if your request could not be processed by ATSD server. In any case you will get a console diagnostic message with a short description of the server response.
Visit http://axibase.com/axibase-time-series-database/ for information about ATSD.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# Create data frame which contains time series for the given metric
# and all entities for the last 1 hour.
dfr <- query(metric = "disk_used_percent", selection_interval = "1-Hour")
dfr <- query( export_type = "Forecast",
metric = "disk_used_percent",
entity_group = "Linux",
tags = c("mount_point=/boot", "file_system=/dev/sda1"),
selection_interval = "1-Week",
aggregate_statistics = c("Avg", "Min", "Max"),
aggregate_interval = "1-Minute",
interpolation = "Linear")
# Example of the end_time argument usage.
dfr <- query( metric = "cpu_usage",
entity = "host-383",
selection_interval = "1-Day",
end_time = "date('2015-02-10 10:15:03')")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.