Omit Column From Visualization

This is gonna be a very beginner question, trying to plot my first time series and learning grafana. I’m sure I’m just lost in the UI and can’t find what I want in among the multitude of configuration options nor can I seem to think of the proper search term for Brave/Google.

Gonna go watch some Grafana tutorials right after posting this.

  • What Grafana version and what operating system are you using?

I’m running the open source Grafana 10.2 service on a Pi4 4GB connected via LAN using a vanilla Debian Bookworm installation (not Raspbian)

  • What are you trying to achieve?

I’m trying to plot latency times (as well as dropped packets) between my server and an arduino uno R4.

  • How are you trying to achieve it?

My server is recording ping and pong times in Postgres DB table with two columns (ping and pong), both as BigInt values storing Unix Epoch values. In grafana my query is such:

SELECT ping AS "Ping", pong AS "Pong" FROM liveness_logs LIMIT 50;

I then performed 2 transformations on the data. First was to convert the Ping field type to a date type to fulfill the missing time series requirement. Second was to perform a calculation to find the difference between Ping and Pong to show Latency.

  • What happened?

Both Pong and Latency are plotted on the graph, with the time at the bottom. Because latency is ~10ms and Pong is 1698518912828, this results in an unreadable graph with two strait lines at the very top and bottom because the y axis scale is thrown way off.

  • What did you expect to happen?

I wanted just Latency plotted and neither of the raw Ping or Pong values from the SQL query. There must a check box list somewhere I’m missing for which data fields to include in the visualization but retain in the table view.

  • Can you copy/paste the configuration(s) that you are having problems with?

I’m not sure if this was what the template was asking me to provide but this is the JSON for the panel I’m working on.

{
  "datasource": {
    "type": "postgres",
    "uid": "e73d307c-8238-4516-a941-340ecf289414"
  },
  "description": "",
  "fieldConfig": {
    "defaults": {
      "custom": {
        "align": "auto",
        "cellOptions": {
          "type": "auto"
        },
        "inspect": false
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      },
      "color": {
        "mode": "thresholds"
      }
    },
    "overrides": []
  },
  "gridPos": {
    "h": 8,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "id": 1,
  "options": {
    "showHeader": true,
    "cellHeight": "sm",
    "footer": {
      "show": false,
      "reducer": [
        "sum"
      ],
      "countRows": false,
      "fields": ""
    }
  },
  "pluginVersion": "10.2.0",
  "targets": [
    {
      "datasource": {
        "type": "postgres",
        "uid": "e73d307c-8238-4516-a941-340ecf289414"
      },
      "editorMode": "builder",
      "format": "table",
      "rawSql": "SELECT ping, pong FROM liveness_logs LIMIT 50 ",
      "refId": "A",
      "sql": {
        "columns": [
          {
            "parameters": [
              {
                "name": "ping",
                "type": "functionParameter"
              }
            ],
            "type": "function"
          },
          {
            "parameters": [
              {
                "name": "pong",
                "type": "functionParameter"
              }
            ],
            "type": "function"
          }
        ],
        "groupBy": [
          {
            "property": {
              "type": "string"
            },
            "type": "groupBy"
          }
        ],
        "limit": 50
      },
      "table": "liveness_logs"
    }
  ],
  "title": "Latency",
  "transformations": [
    {
      "id": "calculateField",
      "options": {
        "alias": "Latency (ms)",
        "mode": "reduceRow",
        "reduce": {
          "reducer": "diff"
        }
      }
    }
  ],
  "type": "table"
}
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

None

  • Did you follow any online instructions? If so, what is the URL?

Nope, just tried winging it.

Best to do your calculations in the postgres query itself and try to avoid transformation. Also you can use Organize Field transformation if you want to eliminate some columns. Below it is using ms sql just for mocking data.