elasticsearch _xpack/monitoring
时间: 2023-07-08 15:46:50 浏览: 63
`_xpack/monitoring` 是 Elasticsearch X-Pack 的一部分,用于监控 Elasticsearch 集群的健康状况、性能指标和操作日志。您可以使用以下命令来查看 `_xpack/monitoring` 索引中存储的数据:
```
GET _xpack/monitoring/_search
```
该命令将返回 `_xpack/monitoring` 索引中的所有文档。您可以使用各种查询参数来过滤和排序结果。例如,要过滤指定时间范围内的数据,您可以使用以下命令:
```
GET _xpack/monitoring/_search
{
"query": {
"range": {
"timestamp": {
"gte": "now-1h",
"lte": "now"
}
}
}
}
```
此命令将返回最近一小时内的所有监视数据。
请注意,如果您没有安装和启用 X-Pack,则无法访问 `_xpack/monitoring` 索引。
相关问题
failed to set monitoring pipeline [xpack_monitoring_6]
这个错误可能是由于 Elasticsearch 监控插件未正确安装或配置引起的。您可以检查以下几个方面:
1. 检查您的 Elasticsearch 版本是否兼容您安装的监控插件版本。
2. 确认您已经正确安装了监控插件。您可以使用以下命令检查插件是否已经安装:`curl -XGET 'http://localhost:9200/_cat/plugins?v'`。
3. 如果您已经正确安装了插件,那么您需要配置监控插件的参数。您可以在 Elasticsearch 的配置文件中添加以下内容:
```
xpack.monitoring.enabled: true
```
4. 如果您使用的是基于 Docker 的 Elasticsearch,可以尝试使用以下命令启动容器:
```
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.monitoring.enabled=true" docker.elastic.co/elasticsearch/elasticsearch:6.0.0
```
希望这些信息对您有所帮助。
elasticsearch No monitoring data found
If you are seeing the message "No monitoring data found" in Elasticsearch, it means that there is no data available in the monitoring indices.
To resolve this issue, you can try the following steps:
1. Check if monitoring is enabled in your Elasticsearch cluster by running the following command:
```
GET _cluster/settings?include_defaults=true
```
If monitoring is not enabled, you can enable it by updating the cluster settings:
```
PUT _cluster/settings
{
"persistent": {
"xpack.monitoring.enabled": true
}
}
```
2. Check if the monitoring indices exist by running the following command:
```
GET _cat/indices/.monitoring*
```
If the indices do not exist, you can create them by running the following command:
```
PUT _cluster/settings
{
"persistent": {
"xpack.monitoring.collection.enabled": true
}
}
```
3. Check if there are any errors in the Elasticsearch logs related to monitoring. If there are, you may need to troubleshoot those errors to resolve the issue.
4. If none of the above steps work, you can try restarting the Elasticsearch cluster to see if that resolves the issue.
I hope this helps! Let me know if you have any further questions.
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)