Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (56 sloc) 4.14 KB

JDBC Job

Overview

JDBC (Java Database Connectivity Technology) is an API for Java which provides methods for querying and updating a database.

Axibase Collector can be configured to query a remote database to either obtain current statistics for the purpose of accumulating their history in Axibase Time Series Database or to offload incremental statistics into ATSD for long-term retention and analytics.

Supported Databases

  • ORACLE
  • Microsoft SQL Server
  • IBM DB2
  • MYSQL
  • POSTGRESQL
  • SYBASE
  • Apache DERBY
  • SAP HANA
  • CUSTOM

Examples

Job Settings

Apart from common, JDBC job has an additional field.
Data Source list allows you to select a database that will be queried. The list contains all databases connected as data sources.

JDBC job settings

Job Configuration

To add a new query, on the JDBC Job page click 'Create Query'.
Use the table below to fill in the fields and configure the query.

FIELD DESCRIPTION
Query Query field must contain the entity name, time, and a collection of metric columns.
Default Entity Assign a default entity to the collected metrics.
Entity Column Assign a column that contains the entity names.
Replacement Table Select a replacement table to convert entities.
Split Condition Split result set into multiple smaller result sets by entering WHERE conditions to be inserted into the query text. Each condition must be specified on a separate line. The query text should include ${SPLIT_CONDITION} placeholder which will be replaced with the condition text at each iteration.
Tag Columns Columns that contain tags or meta data defining the series.
Default Tags Assign predefined tags to all series.
Put Type Type of data. Possible values: SERIES, PROPERTY, BOTH.
Default Metric Assign a default metric to the collected series. All series will be stored in ATSD with this metric.
Metric Columns Column containing metric values.
Ignored Metric Columns Metric columns that you want to skip.
Metric Name Column Column containing metric (series) names.
Metric Value Column Column containing metric (series) values. It is possible to collect multiple value columns for the same metric, as is common in aggregation queries. For example: cnt, avg, max, min, sum.
Example query:
SELECT st.SAMPLE_TIME, e.ENTITY_NAME, sd.NAME AS METRIC,
COUNT(hs.STAT_VAL) AS "cnt",
AVG(hs.STAT_VAL) AS "avg",
SUM(hs.STAT_VAL) AS "sum",
MAX(hs.STAT_VAL) AS "max",
MIN(hs.STAT_VAL) AS "min"
FROM VPX_HIST_STAT1 ...
Metric Prefix Metric prefix can be assigned to easily sort and differentiate metrics in ATSD.
Ignore Number Parse Errors Ignore cells that fail to parse from string into number without raising error. Default: false.
Time Column Column containing the time stamp.
Time Type Time-stamp type.
Possible values: TIMESTAMP, TIVOLI, TEXT, UNIX
Time Format Format of the timestamp.
Time Round Time will be rounded before storing the series in ATSD.
Possible values: MILLISECOND, SECONDS, MINUTE, HOUR, DAY
Time Zone Time zone in which the data was originally collected and stored.
Check Last Time Ignore metrics that have time set to less than the previous entry.
Query With Time When executing the job, the server will be set to the maximum time of the previous data.
Max Rows Maximum number of rows that will be collected with each batch, -1 is unlimited.
Query Timeout Seconds Number of seconds after which the query will be interrupted, -1 is unlimited.

Configuration Example

The image below shows an example JDBC query configuration.

JDBC Query