> Task object

The following objects are directly related to the task API.

The task object has the following properties:

PropertyTypeDescription
taskidstringID of the task.

Property behavior:
- read-only
typeintegerType of the task.

Possible values:
1 - Diagnostic information;
2 - Refresh proxy configuration;
6 - Execute now.

Property behavior:
- required
statusintegerStatus of the task.

Possible values:
1 - new task;
2 - task in progress;
3 - task is completed;
4 - task is expired.

Property behavior:
- read-only
clocktimestampTime when the task was created.

Property behavior:
- read-only
ttlintegerThe time in seconds after which task expires.

Property behavior:
- read-only
proxy_hostidstringID of the proxy about which diagnostic information statistic is collected.

Property behavior:
- supported if type is set to “Diagnostic information” or “Refresh proxy configuration”
requestobjectTask request object according to the task type:
Object of ‘Execute now’ task is described in detail below;
Object of ‘Refresh proxy configuration’ task is described in detail below;
Object of ‘Diagnostic information’ task is described in detail below.

Property behavior:
- required
resultobjectResult object of the diagnostic information task.
May contain NULL if result is not yet ready.
Result object is described in detail below.

Property behavior:
- read-only

‘Execute now’ request object

The ‘Execute now’ task request object has the following properties.

PropertyTypeDescription
itemidstringID of item and low-level discovery rules.

‘Refresh proxy configuration’ request object

The ‘Refresh proxy configuration’ task request object has the following properties.

PropertyTypeDescription
proxy_hostidsarrayProxy IDs.

‘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.

PropertyTypeDescription
historycacheobjectHistory cache statistic request. Available on server and proxy.
valuecacheobjectItems cache statistic request. Available on server.
preprocessingobjectPreprocessing manager statistic request. Available on server and proxy.
alertingobjectAlert manager statistic request. Available on server.
lldobjectLLD manager statistic request. Available on server.

Statistic request object

Statistic request object is used to define what type of information should be collected about server/proxy internal processes. It has the following properties.

PropertyTypeDescription
statsqueryStatistic 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.
topobjectObject 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 typeAvailable fieldsDescription
historycacheitemsNumber of cached items.
valuesNumber of cached values.
memoryShared memory statistics (free space, number of used chunks, number of free chunks, max size of free chunk).
memory.dataHistory data cache shared memory statistics.
memory.indexHistory index cache shared memory statistics.
valuecacheitemsNumber of cached items.
valuesNumber of cached values.
memoryShared memory statistics (free space, number of used chunks, number of free chunks, max size of free chunk).
modeValue cache mode.
preprocessingvaluesNumber of queued values.
preproc.valuesNumber of queued values with preprocessing steps.
alertingalertsNumber of queued alerts.
lldrulesNumber of queued rules.
valuesNumber of queued values.
List of sorting fields available for each type of diagnostic information request

Following statistic fields can be used to sort and limit requested information.

Diagnostic typeAvailable fieldsType
historycachevaluesinteger
valuecachevaluesinteger
request.valuesinteger
preprocessingvaluesinteger
alertingmedia.alertsinteger
source.alertsinteger
lldvaluesinteger

Statistic result object

Statistic result object is retrieved in result field of task object.

PropertyTypeDescription
statusintegerStatus of the task result.

Possible values:
-1 - error occurred during performing task;
0 - task result is created.

Property behavior:
- read-only
datastring/objectResults according the statistic request object of particular diagnostic information task.
Contains error message string if error occurred during performing task.