Hm, the response didn't match the shape we expected. Hm, the response didn't match the shape we expected.
Hi @imatefx,
Build from the source v0.1.4 using cargo and tried running the program.
Successfully connected to Prometheus and received Typesense data from /metrics.
But not able to get the data from /stats, Its throwing these kind of errors. Please enlighten the meaning of this error message.
Hm, the response didn't match the shape we expected.
Hm, the response didn't match the shape we expected.
Hm, the response didn't match the shape we expected.
Hm, the response didn't match the shape we expected
Same message thrown again and again.
Able to get data from Typesence directly using the curl localhost/stats.json
Hi @teenwolf99 , Can you try using the docker image? Which version of typesense are you using?
Ok, will try the docker image.
Typesense-server-0.23.1 OS - ubuntu 22.04
@imatefx tried the Docker Container too, still no luck in getting the error sorted.
| CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS |
|---|---|---|---|---|
| 4243f5f7b7a2 | imatefx/typesense-prometheus-exporter | "./typesense-prometh…" | 3 minutes ago | Up 3 minutes |
docker logs -f 4243f5f7b7a2
Starting exporter server at "0.0.0.0:7070" Hm, the response didn't match the shape we expected. Hm, the response didn't match the shape we expected. Hm, the response didn't match the shape we expected. Hm, the response didn't match the shape we expected. Hm, the response didn't match the shape we expected.
Hey, I have the same issue. I am running this under NixOS with my own packaging.
Jul 14 19:37:55 vps typesense-exporter[1305]: Hm, the response didn't match the shape we expected. reqwest::Error { kind: Decode, source: Error("missing field `system_cpu1_active_percentage`", line: 17, column: 1) }
Jul 14 19:38:25 vps typesense-exporter[1305]: Hm, the response didn't match the shape we expected. reqwest::Error { kind: Decode, source: Error("missing field `system_cpu1_active_percentage`", line: 17, column: 1) }
When querying the API I don't get any stats about the CPU percentage, maybe wrapping it in an Option should solve the issue?
root@vps:/ > curl -H 'X-TYPESENSE-API-KEY: <redacted>' 127.0.0.1:8108/metrics.json -i
HTTP/1.1 200 OK
Connection: keep-alive
access-control-allow-origin: *
content-type: application/json; charset=utf-8
transfer-encoding: chunked
{
"system_disk_total_bytes": "80049651712",
"system_disk_used_bytes": "54374744064",
"system_memory_total_bytes": "8131166208",
"system_memory_total_swap_bytes": "4065325056",
"system_memory_used_bytes": "0",
"system_memory_used_swap_bytes": "0",
"system_network_received_bytes": "0",
"system_network_sent_bytes": "0",
"typesense_memory_active_bytes": "67690496",
"typesense_memory_allocated_bytes": "61318280",
"typesense_memory_fragmentation_ratio": "0.09",
"typesense_memory_mapped_bytes": "113856512",
"typesense_memory_metadata_bytes": "12233088",
"typesense_memory_resident_bytes": "67690496",
"typesense_memory_retained_bytes": "46575616"
}#