栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Grafana配置es数据源

Grafana配置es数据源

ES版本:elasticsearch-7.15.2

Grafana版本:grafana-8.1.2

Mac安装ES

安装es参考Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [7.15] | Elastic


建议:指定data和logs目录

启动

cd elasticsearch-7.15.2;./bin/elasticsearch -d -p pid

验证

curl http://localhost:9200

响应信息

{
  "name" : "MacBook-Pro.local",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "A5JGCshoT-uoYKVyy6L5Xw",
  "version" : {
    "number" : "7.15.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "93d5a7f6192e8a1a12e154a2b81bf6fa7309da0c",
    "build_date" : "2021-11-04T14:04:42.515624022Z",
    "build_snapshot" : false,
    "lucene_version" : "8.9.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
插入数据到ES
curl -XPUT "http://localhost:9200/twitter/tweet/1"; -H 'Content-Type: application/json' -d'
{
    "user" : "kimchy",
    "post_date" : "2021-11-10T14:12:12",
    "message" : "trying out Elasticsearch"
}'

curl -XPUT "http://localhost:9200/twitter/tweet/2"; -H 'Content-Type: application/json' -d'
{
    "user" : "kimchy2",
    "post_date" : "2021-11-11T01:45:12",
    "message" : "trying out Elasticsearch"
}'

curl -XPUT "http://localhost:9200/twitter/tweet/3"; -H 'Content-Type: application/json' -d'
{
    "user" : "kimchy3",
    "post_date" : "2021-11-11T01:45:12",
    "message" : "trying out Elasticsearch"
}'

配置Grafana数据源

  

post_date在插入数据的时候,指定为"2021-11-10T14:12:12" 格式时,在配置数据源中可识别。默认时间为UTC时间。

数据展示

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/488257.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号