I process a kubernetes proxy on my local machine through kubectl proxy. And I deployed heapster onto my kubernetes environment as well as influxdb and grafana. I can see the metrics of filesystem usage retrieved by grafana.
However, I cannot get the filesystem usage through heapster REST API through:
Please help me to check if there is any misconfigured or url wrong or other issue? Thanks.
In some pods there is no such type of metrics as filesystem/usage
:
Here is an example of available metrics list for etcd-minikube pod:
$ curl http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/heapster/proxy/api/v1/model/namespaces/kube-system/pods/etcd-minikube/metrics/
[
"network/rx_errors_rate",
"cpu/usage_rate",
"network/rx_errors",
"memory/request",
"memory/page_faults_rate",
"network/rx_rate",
"network/tx_errors_rate",
"memory/limit",
"network/rx",
"memory/major_page_faults_rate",
"uptime",
"memory/rss",
"memory/working_set",
"restart_count",
"network/tx_errors",
"cpu/request",
"cpu/limit",
"network/tx",
"memory/usage",
"network/tx_rate"
]
In this example, there is no filesystem/usage in the list.
If I try to get it, I'll get exactly the same result to the one you’ve posted in the question:
$ curl http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/heapster/proxy/api/v1/model/namespaces/kube-system/pods/etcd-minikube/metrics/filesystem/usage
{
"metrics": [],
"latestTimestamp": "0001-01-01T00:00:00Z"
}
Therefore, check the available options for the pod using URL similar to the first example.