#general

Resolving API Dashboard Issue

TLDR Pankaj faced an issue with an API dashboard. Prashant suggested a different dashboard to import, which solved the problem. Tim faced a similar issue, which was also resolved by Prashant's solution.

Powered by Struct AI
+12
tada2
white_check_mark1
14
1w
Solved
Join the chat
Sep 14, 2023 (1 week ago)
Pankaj
Photo of md5-ac3f5ee51cdd3a250e2558583ff8c497
Pankaj
07:08 AM
Hi channel. I’m facing this issue for a dashboard that our team has built:

API responded with 400 - json: cannot unmarshal number into Go struct field CompositeQuery.compositeQuery.queryType of type v3.QueryType
white_check_mark1
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
07:22 AM
What version are you using? Are you migrating from some existing version?
Pankaj
Photo of md5-ac3f5ee51cdd3a250e2558583ff8c497
Pankaj
07:22 AM
We used this script to generate a dashboard:

for node in $(kubectl get nodes -o name | sed -e "s/^node\///");
do
  curl -sL  \
    | HOSTNAME="$node" DASHBOARD_TITLE="HostMetrics Dashboard for $node" bash
done
07:22
Pankaj
07:22 AM
This generates the dashboard JSON.
07:23
Pankaj
07:23 AM
It seems like the panelType property in the JSON has incorrect values.
07:23
Pankaj
07:23 AM
Can you please share the panelType property enum? Thanks in advance
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
07:34 AM
Hi Pankaj, can you import the following dashboard instead?

https://github.com/SigNoz/dashboards/blob/main/hostmetrics/hostmetrics-k8s.json
07:35
Prashant
07:35 AM
Do let us know if that works for you.
07:35
Prashant
07:35 AM
Meanwhile, let me work on updating the docs for the same.
Pankaj
Photo of md5-ac3f5ee51cdd3a250e2558583ff8c497
Pankaj
08:27 AM
Hi Prashant. It worked. Thank you.
tada2
Tim
Photo of md5-28828af00909b68c6b7c08d0e82fec54
Tim
05:29 PM
Hi Prashant, I'm facing same issue, but our team use VM only.
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
05:57 PM
Tim If you are not using K8s but only VM.

You will need to import the following dashboard:
https://github.com/SigNoz/dashboards/blob/main/hostmetrics/hostmetrics-with-variable.json
+11
Sep 15, 2023 (1 week ago)
Tim
Photo of md5-28828af00909b68c6b7c08d0e82fec54
Tim
12:11 AM
Hi Prashant, It worked, Thank you.
+11