首页 > 其他分享 >pmm1监控es

pmm1监控es

时间:2023-06-27 11:45:35浏览次数:24  
标签:exporter -- cluster elasticsearch 监控 Export pmm1 es

环境:

OS:Centos 7

pmm server:版本1

 

##########################################被监控ES机器安装###########################

1.查看es版本

[root@localhost ~]# curl -u elastic:XXXX http://192.168.1.136:19200/?pretty
{
  "name" : "pZWD9hr",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "D90sryqyTduCUoN6fEJShQ",
  "version" : {
    "number" : "6.5.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "816e6f6",
    "build_date" : "2018-11-09T18:58:36.352602Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

 

2.下载安装包
https://prometheus.io/docs/instrumenting/exporters/
找到Elasticsearch exporter
进入链接进行下载
我这里下载的是:
elasticsearch_exporter-1.4.0.linux-amd64.tar.gz

 

3.解压安装
[root@localhost soft]# tar -xvf elasticsearch_exporter-1.4.0.linux-amd64.tar.gz
[root@localhost soft]# mv elasticsearch_exporter-1.4.0.linux-amd64 /opt/

 

4.查看使用语法

[root@localhost elasticsearch_exporter-1.4.0.linux-amd64]# ./elasticsearch_exporter --help
usage: elasticsearch_exporter [<flags>]

Flags:
  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).
      --collector.cluster-info  Enable the cluster-info collector (default: enabled).
      --web.listen-address=":9114"  
                                Address to listen on for web interface and telemetry.
      --web.telemetry-path="/metrics"  
                                Path under which to expose metrics.
      --es.uri="http://localhost:9200"  
                                HTTP API address of an Elasticsearch node.
      --es.timeout=5s           Timeout for trying to get stats from Elasticsearch.
      --es.all                  Export stats for all nodes in the cluster. If used, this flag will override the flag
                                es.node.
      --es.node="_local"        Node's name of which metrics should be exposed.
      --es.indices              Export stats for indices in the cluster.
      --es.indices_settings     Export stats for settings of all indices of the cluster.
      --es.indices_mappings     Export stats for mappings of all indices of the cluster.
      --es.aliases              Export informational alias metrics.
      --es.cluster_settings     Export stats for cluster settings.
      --es.shards               Export stats for shards in the cluster (implies --es.indices).
      --es.snapshots            Export stats for the cluster snapshots.
      --es.slm                  Export stats for SLM snapshots.
      --es.clusterinfo.interval=5m  
                                Cluster info update interval for the cluster label
      --es.ca=""                Path to PEM file that contains trusted Certificate Authorities for the Elasticsearch
                                connection.
      --es.client-private-key=""  
                                Path to PEM file that contains the private key for client auth when connecting to
                                Elasticsearch.
      --es.client-cert=""       Path to PEM file that contains the corresponding cert for the private key to connect
                                to Elasticsearch.
      --es.ssl-skip-verify      Skip SSL verification when connecting to Elasticsearch.
      --log.level="info"        Sets the loglevel. Valid levels are debug, info, warn, error
      --log.format="logfmt"     Sets the log format. Valid formats are json and logfmt
      --log.output="stdout"     Sets the log output. Valid outputs are stdout and stderr
      --version                 Show application version.

 

5.启动客户端
[root@localhost elasticsearch_exporter-1.4.0.linux-amd64]#nohup ./elasticsearch_exporter --es.uri http://elastic:[email protected]:19200> exporter.log 2>&1 &

 

6.浏览器打开,查看监控指标
exporter 监控使用的IP:的端口,默认本机的9114
# 浏览器打开,查看监控指标,监控端口9114
http://192.168.1.136:9114/metrics

 

#####################pmm server操作########################

1.登录容器修改配置
docker exec -it pmm-server /bin/bash

[root@a5914a0f9617 opt]# vi /etc/prometheus.yml

添加如下配置

- job_name: 'es-136'
  static_configs:
  - targets: 
    - 192.168.1.136:9114

 

2.重启容器(容器外执行)
docker restart pmm-server

 

3.Grafana面板配置
#下载 grafana 仪表盘
https://github.com/justwatchcom/elasticsearch_exporter/blob/master/examples/grafana/dashboard.json
或者是直接拷贝文件的内容

 

4.导入模板

 

标签:exporter,--,cluster,elasticsearch,监控,Export,pmm1,es
From: https://www.cnblogs.com/hxlasky/p/17508251.html

相关文章

  • vue3透传 Attributes
    “透传attribute”指的是传递给一个组件,却没有被该组件声明为props或emits的attribute或者 v-on 事件监听器。最常见的例子就是 class、style 和 id当一个组件以单个元素为根作渲染时,透传的attribute会自动被添加到根元素上A组件:<template><h3>ComponentA</......
  • 实用模型推荐(一)相似度,文本向量化:text2vec-base-chinese
    1.开源地址:https://github.com/shibing624/text2vec2.使用场景:文本相似度计算,文本转指令3.API封装:importuvicornfromfastapiimportFastAPIfromloguruimportloggerfrompydanticimportBaseModelfromstarlette.middleware.corsimportCORSMiddlewarefromte......
  • Spring REST 接口自定义404不能捕获NoHandlerFoundException问题
    SpringREST接口自定义404以及解决不能捕获NoHandlerFoundException问题  一、自定义404响应内容版本说明:SpringBoot2.0.1.RELEASEREST风格默认PostMan请求的404响应如下:{"timestamp":"2018-06-07T05:23:27.196+0000","status":404,"error":&quo......
  • mybatics之prefixOverrides
    1.<trimprefix=""suffix=""suffixOverrides=""prefixOverrides=""></trim>prefix:在trim标签内sql语句加上前缀。suffix:在trim标签内sql语句加上后缀。suffixOverrides:指定去除多余的后缀内容,如:suffixOverrides=",",去除trim标签内sql语句......
  • js-关于数组中includes()的使用方法
    关于数组中includes()的使用方法1.includes简单介绍说明 1.includes()方法是用来判断一个数组是否包含一个指定的值,返回一个布尔值,如果是返回true,否则false。2.其中,includes(a,b)括号里第一个参数a为必选参数,表示要查找的某个参数;第二位b为可选参数,表示从某个索引位置开始......
  • CodeForces 605E Intergalaxy Trips 题解
    题意有一张\(n\)个点的有向完全图,边\(i\toj\)有\(p_{i,j}\)的概率出现(\(p_{i,i}=1\))。你要从\(1\)开始,每天可以走一条出边或留在原地,求最优策略下走到\(n\)的期望天数。输出小数(不取模)。\(n\le10^3\)思路设\(f(i)\)表示从\(i\)走到\(n\)的期望天数,那么......
  • TreeSelect 树形选择 选中子级显示所有父级及本身
    由于需求的需要,需要在选中二级的时候,将全部路径完整的在输入框显示:如图所示 看了一下,tree自带的属性没有此功能,经过一番思考,直接可以给绑定的model赋值的操作实现,代码如下:<template><el-tree-select:disabled='props.disabled'ref='treeRef'node-key='value':props="t......
  • configure: error: udev support requested but libudev header not installed
    ./configure --host=arm-none-linux-gnueabi错误提示:configure:error:udevsupportrequestedbutlibudevheadernotinstalled解决办法 --disable-udev取消对libudev的依赖   ./configure --host=arm-none-linux-gnueabi --disable-udev make  ......
  • Ingress Nginx Controller 使用
    1.IngressNginxController安装helm安装[root@k8s-master0126]#wgethttps://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz[root@k8s-master0126]#tar-zxvfhelm-v3.0.0-linux-amd64.tar.gz[root@k8s-master0126]#mvlinux-amd64/helm/usr/local/bin/helm[root@k8s-m......
  • F5iRules第二期iRules之进阶篇​
    F5iRules第二期iRules之进阶篇测试结果如下:......