將數據發送到statsd:statsd influxdb保留策略沒有發現
echo "foo:1|c" | nc -u -w0 127.0.0.1 8125
statsd將輸出更新後的結果和數據插入到influxDB:
{ counters:
{ 'statsd.bad_lines_seen': 0,
'statsd.packets_received': 1,
'statsd.metrics_received': 1,
foo: 1 },
timers: {},
gauges: { 'statsd.timestamp_lag': 0 },
timer_data: {},
counter_rates:
{ 'statsd.bad_lines_seen': 0,
'statsd.packets_received': 0.03333333333333333,
'statsd.metrics_received': 0.03333333333333333,
foo: 0.03333333333333333 },
sets: {},
pctThreshold: [ 90 ] }
運行命令來顯示influxDB信息:
$curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" --data-urlencode "q=SHOW MEASUREMENTS"
將成功地給予迴應:
{
"results": [
{
"series": [
{
"name": "measurements",
"columns": [
"name"
],
"values": [
[
"cpu_load_short"
],
[
"foo.counter"
]
]
}
]
}
]
}
那麼我想從influxDB查詢數據:
$curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" --data-urlencode "q=SELECT value FROM foo.counter"
我得到的錯誤信息:
{
"results": [
{
"error": "retention policy not found"
}
]
}
任何想法? influxDB:0.9.3