Introduction to adbmgr built-in jobs
adbmgr can create a number of timed tasks, of which two types are built in:
• Data collection tasks
• Node monitoring tasks
These two kinds of timing tasks are used when using DBOPS (an AntDB monitoring operation and maintenance tool).
The two types of tasks are described below.
Help information for adding built-in jobs can be obtained through \h add job.
postgres=# \h add job
Command: ADD JOB
Description: add one row job information in the job table. The column of "interval" requires an integer value, unit is "second"; The input string of "command" column should be in single quote. If using user-defined monitor item, the input of sql string format likes 'insert into tb_name select adbmonitor_job(''host_name'', ''item_name'')', the item_name in job item table.
the common used functions for monitor are:
for tps qps 'select monitor_databasetps_insert_data()'
for database summary 'select monitor_databaseitem_insert_data()'
for host 'select monitor_get_hostinfo()'
for slow log 'select monitor_slowlog_insert_data()'
for gtmcoord handle 'select monitor_handle_gtmcoord(
name 'nodename' default '''',
bool bforce default true,
int reconnect_attempts default 3,
int reconnect_interval default 2,
int select_timeout default 15)'
for coordinator handle 'select monitor_handle_coordinator()'
for datanode handle 'select monitor_handle_datanode(
name 'nodename' default '''',
bool bforce default true,
int reconnect_attempts default 3,
int reconnect_interval default 2,
int select_timeout default 15)
the limit of monitor_handle_gtmcoord and monitor_handle_datanode functions:
2<=reconnect_attempts<=60, 2<=reconnect_interval<120, 2<=select_timeout<120
reconnect_interval and select_timeout unit: "second".
Syntax:
ADD JOB [IF NOT EXISTS] job_name ( option )
where option must be the following:
NEXTTIME = next_time,
INTERVAL = interval,
STATUS = status,
COMMAND = sql_string,
DESC = description