How to display JSON format data in grafana

then use key value pairs for Format in the Extract transformation

but it does not show every record under the same column. it creates columns for each record separately

we cant remotely see your computer so not sure what you mean.

Format: key+values pairs is giving me result for just last to records from the json data.

1 Like
[
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-redis-ha-haproxy-6bbf6475d7-6hqnm",
		"namespace": "argocd",
		"status": "Pending"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-repo-server-9f64dfc4d-8fwff",
		"namespace": "argocd",
		"status": "Pending"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-redis-ha-haproxy-6bbf6475d7-42l8l",
		"namespace": "argocd",
		"status": "Pending"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-server-544d778bb8-9md9z",
		"namespace": "argocd",
		"status": "Pending"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-redis-ha-server-1",
		"namespace": "argocd",
		"status": "Pending"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "kibana-84cf7f59c-x6x66",
		"namespace": "kube-logging",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "local-path-provisioner-84bb864455-pgxs7",
		"namespace": "kube-system",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "coredns-7796b77cd4-wkhrv",
		"namespace": "kube-system",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-applicationset-controller-54d7d99b6-nwjdn",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-notifications-controller-7cd5964665-6d2cn",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "celebration",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-dex-server-5fb5c6bb84-jxgxl",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "fluent-bit-w5qs2",
		"namespace": "kube-logging",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "counter",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "metrics-server-ff9dbcb6c-k6lg7",
		"namespace": "kube-system",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-redis-ha-haproxy-6bbf6475d7-mvvnx",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-application-controller-0",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "es-cluster-0",
		"namespace": "kube-logging",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-repo-server-9f64dfc4d-l4f6f",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "es-cluster-2",
		"namespace": "kube-logging",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "es-cluster-1",
		"namespace": "kube-logging",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-server-544d778bb8-ptc9z",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "argocd-redis-ha-server-0",
		"namespace": "argocd",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "prometheus-prometheus-node-exporter-mv8mp",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "prometheus-kube-prometheus-operator-5656d999c5-l57kv",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "prometheus-kube-state-metrics-8fb8d57b7-gvw29",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "alertmanager-prometheus-kube-prometheus-alertmanager-0",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "prometheus-prometheus-kube-prometheus-prometheus-0",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "prometheus-grafana-579cc47dd9-5ltd7",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "failed",
		"namespace": "default",
		"status": "Failed"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "failed-pod",
		"namespace": "default",
		"status": "Failed"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "failed-pod2",
		"namespace": "default",
		"status": "Failed"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "restart",
		"namespace": "default",
		"status": "Running"
	},
	{
		"time": "2024-04-24T06:29:05Z",
		"name": "restart-pod",
		"namespace": "default",
		"status": "Running"
	}
]

this is my complete data and i just get these two in the columns
{ “time”: “2024-04-24T06:29:05Z”, “name”: “restart”, “namespace”: “default”, “status”: “Running” }, { “time”: “2024-04-24T06:29:05Z”, “name”: “restart-pod”, “namespace”: “default”, “status”: “Running” }

ok I see the issue now, it does collapse it into one :frowning: @isaqueprofeta is a sme with zabbix maybe he can help

Hey everyone, thx for pinging.

Hello @sanashahbaz, and welcome to the foruns.

Well in your place I wouldn’t work directly from zabbix using one json text data and making grafana work. Because the data that’s grafana Plug-in pools from zabbix is already one json with other information, like the host, item name, etcetera.

My best advice for you is transforming each json record in a set of items in zabbix side (using preprocessing with dependent data) and them querying them and transforming them into the table. Some information on querying multiple items and querying them here: Multiple Metrics one table - #7 by isaqueprofeta