最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Retrieve first epoch time of dps from openTSDB - Stack Overflow

programmeradmin1浏览0评论

I need to perform query operation on openTSDB to get the dps points for last 1 year. Suppose opentsdb is having dps only for last 1 month. There will be unnecessary quering happening for 11 more months.

I tried below approach.
 
curl -X POST -H "Content-Type: application/json" -d '{
  "start": "0",
  "queries": [
    {
      "metric": "abc",
      "aggregator": "sum"
    }
  ]                                  
}' http://localhost:4242/api/query | jq '.[0].dps | keys | .[0]'

Is there a better/direct way to get the first data point in opentsdb beforehand? Please note, if I query for last 1 year for 1.7 billion dps, opentsdb throttles and terminate in between using the above query. So i need a way which can directly give me the first epoch time present in opentsdb.

发布评论

评论列表(0)

  1. 暂无评论