Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24448

history.get with Oracle backend returns small float values using ANSI SQL (omit leading zero)

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 6.0.29, 6.4.14, 7.0.0beta3
    • API (A)
    • Oracle 19.13/Zabbix 6.4.14 from sources with Oracle support compiled in
    • Support backlog

      Steps to reproduce:

      1. Setup Zabbix Server/Frontend to work with Oracle backend: https://cdn.zabbix.com/zabbix/sources/stable/6.4/zabbix-6.4.14.tar.gz
      2. Collect something small like '0.1234', less than 1 (ANSI SQL)
      3. Use history.get to retrieve values
      {
          "jsonrpc": "2.0",
          "method": "history.get",
          "params": {
              "output": "extend",
              "history": 0,
              "itemids": "2519553",
              "sortfield": "clock",
              "sortorder": "DESC",
              "limit": 30
          },
          "auth": "<token>",
          "id": 1
      }
      

      Result:

      "jsonrpc": "2.0",
          "result": [
              {
                  "itemid": "2519553",
                  "clock": "1715070873",
                  "value": "2.4746",
                  "ns": "326318488"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070813",
                  "value": ".2766",
                  "ns": "327087402"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070753",
                  "value": "1.0149",
                  "ns": "326483154"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070693",
                  "value": "4.7388",
                  "ns": "326467468"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070633",
                  "value": "1.6332",
                  "ns": "326241143"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070573",
                  "value": "3.0834",
                  "ns": "326283218"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070513",
                  "value": "1.2202",
                  "ns": "326683267"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070453",
                  "value": "5.0921",
                  "ns": "326252500"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070393",
                  "value": "13.3636",
                  "ns": "327107353"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070333",
                  "value": "11.8662",
                  "ns": "326971416"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070273",
                  "value": "7.2838",
                  "ns": "326262691"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070213",
                  "value": "5.8413",
                  "ns": "327051187"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070153",
                  "value": "23.4586",
                  "ns": "326265076"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070093",
                  "value": ".7196",
                  "ns": "326417751"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715070033",
                  "value": "1.4171",
                  "ns": "326619535"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069973",
                  "value": "1.1489",
                  "ns": "327156905"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069913",
                  "value": "5.5853",
                  "ns": "326367597"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069853",
                  "value": ".3052",
                  "ns": "326580782"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069793",
                  "value": "3.5333",
                  "ns": "326202314"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069733",
                  "value": "5.0647",
                  "ns": "301490441"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069673",
                  "value": "6.2006",
                  "ns": "326269673"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069613",
                  "value": "3.8239",
                  "ns": "326215659"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069553",
                  "value": "19.1406",
                  "ns": "326814560"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069493",
                  "value": "12.4639",
                  "ns": "326387019"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069433",
                  "value": "2.9048",
                  "ns": "326434813"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069373",
                  "value": "18.9377",
                  "ns": "326651994"
              },
              {
                  "itemid": "2519553",
                  "clock": "1715069313",
                  "value": "18.0979",
                  "ns": "327191165"
              },
      

      Expected:
      '0.xxxx' values since ANSI SQL is followed by Frontend and it shows values with no issues, but API integrations are not working, for example with Grafana through API.

            edgar.akhmetshin Edgar Akhmetshin
            edgar.akhmetshin Edgar Akhmetshin
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: