This is a translation of the original English documentation page. Help us make it better.

> Task object

The following objects are directly related to the task API.

The task object has the following properties:

Property Type Description
taskid string (readonly) ID of the task.
type
(required)
integer Type of the task.

Possible values:
1 - Diagnostic information;
6 - Check now.
status integer (readonly) Status of the task.

Possible values:
1 - new task;
2 - task in progress;
3 - task is completed;
4 - task is expired.
clock timestamp (readonly) Time when the task was created.
ttl integer (readonly) The time in seconds after which task expires.
proxy_hostid string ID of the proxy about which diagnostic information statistic is collected.
Ignored for 'Check now' tasks.
request
(required)
object Task request object according to the task type:
Object of 'Check now' task is described in detail below;
Object of 'Diagnostic information' task is described in detail below.
result object (readonly) Result object of the diagnostic information task. May contain NULL if result is not yet ready. Result object is described in detail below.

'Check now' request object

A 'Check now' feladatkérési objektum a következő tulajdonságokkal rendelkezik.

Property Type Description
itemid string ID of item and low-level discovery rules.

'Diagnostic information' request object

The diagnostic information task request object has the following properties. Statistic request object for all types of properties is described in detail below.

Property Type Description
historycache object History cache statistic request. Available on server and proxy.
valuecache object Items cache statistic request. Available on server.
preprocessing object Preprocessing manager statistic request. Available on server and proxy.
alerting object Alert manager statistic request. Available on server.
lld object LLD manager statistic request. Available on server.

Statistic request object

A statisztikai kérés objektum az információ típusának meghatározására szolgál össze kell gyűjteni a szerver/proxy belső folyamatairól. Megvan benne a következő tulajdonságok.

Property Type Description
stats query Statistic object properties to be returned. The list of available fields for each type of diagnostic information statistic are described in detail below.

Default: extend will return all available statistic fields.
top object Object to sort and limit returned statistic values. The list of available fields for each type of diagnostic information statistic are described in detail below.

Example:
{ “source.alerts”: 10 }
List of statistic fields available for each type of diagnostic information request

Following statistic fields can be requested for each type of diagnostic information request property.

Diagnostic type Available fields Description
historycache items Number of cached items.
values Number of cached values.
memory Shared memory statistics (free space, number of used chunks, number of free chunks, max size of free chunk).
memory.data History data cache shared memory statistics.
memory.index History index cache shared memory statistics.
valuecache items Number of cached items.
values Number of cached values.
memory Shared memory statistics (free space, number of used chunks, number of free chunks, max size of free chunk).
mode Value cache mode.
preprocessing values Number of queued values.
preproc.values Number of queued values with preprocessing steps.
alerting alerts Number of queued alerts.
lld rules Number of queued rules.
values Number of queued values.
List of sorting fields available for each type of diagnostic information request

A következő statisztikai mezők használhatók a kérések rendezésére és korlátozására információ.

Diagnostic type Available fields Type
historycache values integer
valuecache values integer
request.values integer
preprocessing values integer
alerting media.alerts integer
source.alerts integer
lld values integer

Statistic result object

A statisztikai eredményobjektum a feladatobjektum result mezőjében található.

Property Type Description
status integer (readonly) Status of the task result.

Possible values:
-1 - error occurred during performing task;
0 - task result is created.
data string/object Results according the statistic request object of particular diagnostic information task. Contains error message string if error occurred during performing task.