opentsdb restful api使用方法

opentsdb restful api 使用方法

curl -X POST http://localhost:4242/api/put?details -d @hi2 | json_reformat

Unknown metric

---这是什么错误-----这都是什么,下面这个文档会告诉你怎么用

https://blog.fatedier.com/2016/03/12/install-and-use-opentsdb/

这是官网的案例:

http://opentsdb.net/docs/build/html/api_http/put.html

查找

下面这个错误要怎么解?

One or more data points had errors

在/api/put后面加上?details,会显示详细的信息

-----query的方法

curl localhost:4242/api/query -d @query3 | json_reformat

{
"start": 1356998400,
"end": 1356998460,
"queries": [
{
"aggregator": "sum",
"metric": "opentsdb_test",
"rate": "true",
"tags": {
"host": "*"
}
},
{
"aggregator": "sum",
"tsuids": [
"000001000002000042",
"000001000002000043"
]
}
]
}

https://www.baeldung.com/java-http-response-body-as-string

要如何打印出string

sudo ./tsdb tsd --port=4242 --staticroot=./staticroot --cachedir=./cachedir --config=src/opentsdb.conf

原文地址:https://www.cnblogs.com/honpey/p/14903777.html