See www.zabbix.com for the official Zabbix site.

Docs/protocols/queue/2.4

From Zabbix.org
Jump to: navigation, search

Starting with Zabbix 2.2, queue is not calculated by the frontend, based on the data in the database - instead, frontend requests information from the Zabbix server using a specific protocol.

Queue requests

Requesting a queue information requires passing a currently active session ID in the variable sid. An example request:

{
    "request": "queue.get",
    "sid": "02c412e863883395f4f52fc5e9f2efc9",
    "type": "overview"
}
Note: Full SID is to be used, not the short version as passed in the URLs by the frontend.

Valid values for type are:

  • overview: number of delayed items per item per delay period
  • overview by proxy: number of delayed items per proxy per delay period
  • details: list of delayed items

Responses

Responses to valid requests

Delay periods in seconds are:

  • delay5 (includes items delayed by 5-9 seconds)
  • delay10 (includes items delayed by 10-29 seconds)
  • delay30 (includes items delayed by 30-59 seconds)
  • delay60 (includes items delayed by 60-299 seconds)
  • delay300 (includes items delayed by 300-599 seconds)
  • delay600 (includes items delayed by 600 and more seconds)

Overview

Response to valid overview requests includes statistics for all item types.

{
        "response":"success",
        "data":[
                {
                        "itemtype":4,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":1},
                {
                        "itemtype":7,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":18},
                {
                        "itemtype":5,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":1},
                {
                        "itemtype":3,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":2},
                {
                        "itemtype":0,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":9}]}

Values for item types are the same as for the API calls, for example.

Note: Information is returned only about those item types that actually have some queue

Overview by proxy

{
        "response":"success",
        "data":[
                {
                        "proxyid":0,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":11},
                {
                        "proxyid":10064,
                        "delay5":0,
                        "delay10":0,
                        "delay30":0,
                        "delay60":0,
                        "delay300":0,
                        "delay600":20}]}

Proxy ID of 0 represents Zabbix server.

Information is only returned about the proxies that have any queue. If server has no queue, it is not included in the response.

Details

{
        "response":"success",
        "data":[
                {
                        "itemid":31685,
                        "nextcheck":1376918075},
                {
                        "itemid":31686,
                        "nextcheck":1376918076},
                {
                        "itemid":31688,
                        "nextcheck":1376918078}]}

The entries are sorted by nextcheck and limited to 501.

Responses to invalid requests

Invalid session

{
        "response":"failed",
        "info":"Permission denied."}

Invalid request type

Invalid or missing request type:

{
        "response":"failed",
        "info":"Unsupported request type."}

Invalid JSON

Example request:

{
    "request": "queue.get",
    "sid": "3aeda606f6414a2c22d3a1eed5f73f14",
    type: "details"
}

In this case the response is a simple:

 OK
Note: This will be changed by ZBX-7572