Getting data from the metric DB

Hello everyone


I am troubleshooting an issue I have, and to do this I want to check the metric DB of the indeni server.

Normally I use this query:


curl -G -k -u "admin:admin123!" "https://localhost:9009/api/v1/metrics" --data-urlencode "query=(im.name==config-unsaved and device-id=="f72bea52-476b-4ba9-9b33-d5bce7890f8b")" --data-urlencode "start=`date -d -1hour +"%s000"`" | sed "s/tags/\ntags/g"


The device-id I got from running:

psql -c "select id,name,ip_address from device;"




This time I got this error back

{
"type": "error",
"message": "Requested history is too long, Max length is 1 hours."
}



It has worked before, and from the command it looks like I am requesting exactly one hour. So what could be wrong?

Hi Johnathan
Which version of indeni server are you using?
What is the output of the command if you pass 'end' parameter (your current time)?

Can you please share the server version that you are testing with?