Book Contents

Book Index

Next Topic

Home

Using the SQL Monitoring API

Vertica provides an API for monitoring various features and functions within a database in the form of virtual tables that can be queried using a limited form of the SELECT statement, as described below.

You can use external tools to query the virtual tables and act upon the information as desired. For example, you can a third-party monitoring tool to periodically query the K-Safety level of the database. If it falls below the desired level indicating a host failure, the monitoring tool can use any means necessary to notify the database administrator and/or appropriate IT personnel.

The virtual tables that make up the monitoring API are described in the SQL Reference Manual. They are:

Virtual Table

Description

VT_COLUMN_STORAGE

monitors the amount of disk storage used by each column of each projection on each node.

VT_DISK_STORAGE

monitors the amount of disk storage used by the database on each node.

VT_LOAD_STREAMS

monitors load metrics for each load stream on each node.

VT_PROJECTION_STORAGE

monitors the amount of disk storage used by each projection on each node.

VT_QUERY_METRICS

monitors the sessions and queries executing on each node.

VT_RESOURCE_USAGE

monitors system resource management on each node.

VT_SESSION

monitors external sessions.

VS_SESSION

monitors internal and external sessions on each node.

VT_SYSTEM

monitors the overall state of the database.

VT_TABLE_STORAGE

monitors the amount of disk storage used by each table on each node.

VT_TUPLE_MOVER

monitors the status of the Tuple Mover on each node.

Query Syntax

Virtual table queries use a different processing mechanism than database queries Thus, the virtual tables support only a very limited set of query capabilities:

Examples

SELECT CURRENT_EPOCH, K_SAFETY FROM VT_SYSTEM;

SELECT * FROM VT_RESOURCE_USAGE;

SELECT NODE, TOTAL_USER_SESSIONS, TOTAL_QUERIES_EXECUTED FROM VT_QUERY_METRICS;