grafana+prometheus+hiveserver2(jmx_exporter+metrics)

监控图

一、hiveserver2开启metrics,并启动jmx_exporter

1、修改hive-site.xml文件开启metrics

<property><name>hive.server2.metrics.enabled</name><value>true</value>
</property>
<property><name>hive.service.metrics.codahale.reporter.classes</name><value>org.apache.hadoop.hive.common.metrics.metrics2.JmxMetricsReporter</value>
</property>

2、启动时带上jmx_exporter
①下载jmx_exporter安装包放在服务器上
下载路径:
prometheus常用exporter下载地址大全

/usr/local/jmx_expoter/jmx_prometheus_javaagent-0.9.0.jar
/usr/local/jmx_expoter/hiveserver2.yaml

/usr/local/jmx_expoter/hiveserver2.yaml文件内容

rules:- pattern: '.*'

②修改hive安装目录bin/hive里的内容

##把这段内容
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.properties"
##修改为,增加上 指定jar和yaml文件和指定jmx端口随意9909
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS java -javaagent:/usr/local/jmx_expoter/jmx_prometheus_javaagent-0.9.0.jar=9909:/usr/local/jmx_expoter/hiveserver2.yaml -Dlog4j.configurationFile=hive-log4j2.properties"

3、查看都有哪些metrics
访问http://hiveIP:9909/metrics
在这里插入图片描述
在这里插入图片描述

二、配置prometheus

prometheus下载地址
1、prometheus.yaml增加一下配置

scrape_configs:- job_name: "hiveserver2"static_configs:- targets: ["hiveIp:9909","hiveIp:9909"]

2、启动

nohup ./prometheus --config.file=prometheus.yaml --web.listen-address=:9090 --storage.tsdb.retention=7d > ./prometheus.log 2>&1 &

三、配置grafana

1、配置prometheus数据源
如果数据源不是这个名字,下边的json记得改名字
2、dashboards import json
其他指标可以自行添加panels(嵌板)

{"__inputs": [{"name": "VAR_JOB","type": "constant","label": "job","value": "hiveserver2","description": ""}],"__requires": [{"type": "grafana","id": "grafana","name": "Grafana","version": "5.4.2"},{"type": "panel","id": "graph","name": "Graph","version": "5.0.0"},{"type": "datasource","id": "prometheus","name": "Prometheus","version": "5.0.0"},{"type": "panel","id": "singlestat","name": "Singlestat","version": "5.0.0"}],"annotations": {"list": [{"builtIn": 1,"datasource": "-- Grafana --","enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","type": "dashboard"}]},"description": "Complete dashboard using metrics from prometheus JMX exporter, with drill down per job > instance","editable": true,"gnetId": 8563,"graphTooltip": 0,"id": null,"iteration": 1545278553000,"links": [],"panels": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 0},"id": 52,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_open_connections_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前打开的连接数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "count","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineStyle": {"fill": "solid"},"lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 0},"id": 2,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","exemplar": false,"expr": "metrics_hs2_active_sessions_Value{instance=\"$instance\",job=\"$job\"}","format": "time_series","instant": false,"legendFormat": "__auto","range": true,"refId": "A"}],"title": "当前活跃的session个数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 0},"id": 46,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_hive_tez_tasks_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "提交的Hive on Tez作业总数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 9},"id": 44,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_hs2_open_sessions_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前打开的session数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"decimals": 0,"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 9},"id": 50,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_active_calls_api_runTasks_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "当前runtask请求数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 9},"id": 48,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_cumulative_connection_count_Count{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "累计连接数","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 18},"id": 14,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 7,"y": 18},"id": 5,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "metrics_memory_total_init_Value{instance=\"$instance\",job=\"$job\"}","legendFormat": "__auto","range": true,"refId": "A"}],"title": "JVM初始化总内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 11,"y": 18},"id": 38,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用堆内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 4,"x": 15,"y": 18},"id": 8,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_total_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用总内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 3,"x": 19,"y": 18},"id": 12,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_init_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM初始化堆内存","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 10,"w": 2,"x": 22,"y": 18},"id": 60,"options": {"colorMode": "value","graphMode": "area","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "jvm_threads_peak{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": " 峰值线程数","type": "stat"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 28},"id": 18,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM最大可用堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 28},"id": 40,"options": {"legend": {"calcs": ["lastNotNull"],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_used_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已使用堆内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "percentunit"},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 28},"id": 54,"options": {"legend": {"calcs": ["lastNotNull"],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_used_Value{instance=\"$instance\",job=\"$job\"}/metrics_memory_heap_max_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM堆内存使用率","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 38},"id": 42,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_used_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已使用堆外内存量","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 38},"id": 10,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_heap_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留堆内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 38},"id": 6,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_total_committed_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM已预留总内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "decbytes"},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 47},"id": 16,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"pluginVersion": "9.0.0","targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_memory_non_heap_init_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM初始化堆外内存","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 47},"id": 22,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"decimals": 0,"mappings": [],"min": 0,"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 47},"id": 24,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_blocked_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM blocked线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 57},"id": 26,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_deadlock_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM deadlock线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 8,"x": 7,"y": 57},"id": 20,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_daemon_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM daemon线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineStyle": {"fill": "solid"},"lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null}]}},"overrides": []},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 57},"id": 30,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_runnable_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM runnable线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 66},"id": 32,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_terminated_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM terminated线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 66},"id": 28,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_new_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM new状态线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 9,"x": 15,"y": 66},"id": 34,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_waiting_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM waiting线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 7,"x": 0,"y": 76},"id": 36,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "metrics_threads_timed_waiting_count_Value{instance=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "JVM timed_waiting线程数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 10,"w": 8,"x": 7,"y": 76},"id": 58,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_sum{gc=\"G1 Old Generation\", ip=\"$instance\", job=\"$job\"}[5m])","legendFormat": "1分钟内FGC时长","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_sum{gc=\"G1 Old Generation\", ip=\"$instance\", job=\"$job\"}[5m])","hide": false,"legendFormat": " 分钟内FGC时长","range": true,"refId": "B"}],"title": "1 & 5 分钟内FGC时长","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": [{"__systemRef": "hideSeriesFrom","matcher": {"id": "byNames","options": {"mode": "exclude","names": ["5分钟内FGC次数"],"prefix": "All except:","readOnly": true}},"properties": [{"id": "custom.hideFrom","value": {"legend": false,"tooltip": false,"viz": true}}]}]},"gridPos": {"h": 9,"w": 9,"x": 15,"y": 76},"id": 56,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","exemplar": false,"expr": "irate(jvm_gc_collection_seconds_count{gc=\"G1 Old Generation\", job=\"$job\", ip=\"$instance\"}[5m])","hide": false,"instant": false,"legendFormat": "1分钟内FGC次数","range": true,"refId": "A"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"editorMode": "code","expr": "irate(jvm_gc_collection_seconds_count{gc=\"G1 Old Generation\", job=\"$job\", ip=\"$instance\"}[5m])","hide": false,"legendFormat": "5分钟内FGC次数","range": true,"refId": "B"}],"title": "1 & 5 分钟内FGC次数","type": "timeseries"},{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"fieldConfig": {"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 0,"gradientMode": "none","hideFrom": {"legend": false,"tooltip": false,"viz": false},"lineInterpolation": "linear","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "auto","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"mappings": [],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]}},"overrides": []},"gridPos": {"h": 9,"w": 7,"x": 0,"y": 86},"id": 62,"options": {"legend": {"calcs": [],"displayMode": "list","placement": "bottom"},"tooltip": {"mode": "single","sort": "none"}},"targets": [{"datasource": {"type": "prometheus","uid": "8mvN3liIz"},"expr": "jvm_classes_loaded{ip=\"$instance\",job=\"$job\"}","refId": "A"}],"title": "获取当前jvm已加载类数量","type": "timeseries"}],"refresh": "10s","schemaVersion": 16,"style": "dark","tags": ["JVM"],"templating": {"list": [{"current": {"text": "prometheus","value": "prometheus"},"hide": 0,"label": null,"name": "datasource","options": [],"query": "prometheus","refresh": 1,"regex": "","skipUrlSync": false,"type": "datasource"},{"current": {"value": "${VAR_JOB}","text": "${VAR_JOB}"},"hide": 0,"label": "job","name": "job","options": [{"value": "${VAR_JOB}","text": "${VAR_JOB}"}],"query": "${VAR_JOB}","skipUrlSync": false,"type": "constant"},{"allValue": ".*","current": {},"datasource": "$datasource","definition": "","hide": 0,"includeAll": false,"label": "instance","multi": false,"name": "instance","options": [],"query": "label_values(jvm_info{job=\"$job\"},instance)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 1,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false},{"allValue": null,"current": {},"datasource": "$datasource","definition": "","hide": 2,"includeAll": true,"label": null,"multi": true,"name": "mempool","options": [],"query": "label_values(jvm_memory_pool_bytes_max{job=\"$job\", instance=\"$instance\"}, pool)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 1,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false},{"allValue": null,"current": {},"datasource": "$datasource","definition": "","hide": 2,"includeAll": true,"label": null,"multi": true,"name": "memarea","options": [],"query": "label_values(jvm_memory_bytes_used{job=\"$job\", instance=\"$instance\"}, area)","refresh": 1,"regex": "","skipUrlSync": false,"sort": 0,"tagValuesQuery": "","tags": [],"tagsQuery": "","type": "query","useTags": false}]},"time": {"from": "now-15m","to": "now"},"timepicker": {"refresh_intervals": ["5s","10s","30s","1m","5m"],"time_options": ["5m","15m","1h","6h","12h","24h","2d","7d","30d"]},"timezone": "","title": "hiveserver2-metrics","uid": "hiveserver2-jvm-dashboard","version": 3
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/459497.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

FPGA_工程_按键控制的基于Rom数码管显示

一 信号 框图&#xff1a; 其中 key_filter seg_595_dynamic均为已有模块&#xff0c;直接例化即可使用&#xff0c;rom_8*256模块&#xff0c;调用rom ip实现。Rom_ctrl模块需要重新编写。 波形图&#xff1a; 二 代码 module key_fliter #(parameter CNT_MAX 24d9_999_99…

LEETCDE 220. 存在重复元素 III

class Solution { public:long long size;bool containsNearbyAlmostDuplicate(vector<int>& nums, int indexDiff, int valueDiff) {//桶排序unordered_map<long,long> m;sizevalueDiff1;for(int i0;i<nums.size();i){//控制数值long long idxgetID(nums[i…

实践动物姿态估计,基于最新YOLOv8全系列【n/s/m/l/x】参数模型开发构建公共场景下行人人员姿态估计分析识别系统

姿态估计&#xff08;PoseEstimation&#xff09;在我们前面的相关项目中涉及到的并不多&#xff0c;CV数据场景下主要还是以目标检测、图像识别和分割居多&#xff0c;最近正好项目中在使用YOLO系列最新的模型开发项目&#xff0c;就想着抽时间基于YOLOv8也开发构建实现姿态估…

【Linux】gdb调试与make/makefile工具

目录 导读 1. make/Makefile 1.1 引入 1.2 概念 1.3 语法规则 1.4 示例 2. Linux调试器-gdb 2.1 引入 2.2 概念 2.3 使用 导读 我们在上次讲了Linux编辑器gcc\g的使用&#xff0c;今天我们就来进一步的学习如何调试&#xff0c;以及makefile这个强大的工具。 1. mak…

STM32F1 - 工程模板_标准外设库

Project 1> 程序框架2> 文件结构3>标准外设库 - 头文件包含关系4> 移植中出现的错误4.1> 编译器版本选择4.2> 工程宏定义 N> 资料链接 1> 程序框架 根据硬件分层&#xff0c;把软件分层 2> 文件结构 为方便管理&#xff0c;将启动文件startup_stm…

零代码3D可视化快速开发平台

老子云平台 老子云3D可视化快速开发平台&#xff0c;集云压缩、云烘焙、云存储云展示于一体&#xff0c;使3D模型资源自动输出至移动端PC端、Web端&#xff0c;能在多设备、全平台进行展示和交互&#xff0c;是全球领先、自主可控的自动化3D云引擎。此技术已经在全球申请了专利…

Zoho Mail 2023:回顾过去,展望未来

当我们告别又一个非凡的一年时&#xff0c;我们想回顾一下Zoho Mail如何融合传统与创新。我们迎来了成立15周年&#xff0c;这是一个由客户、合作伙伴和我们的敬业团队共同庆祝的里程碑。与我们一起回顾这段旅程&#xff0c;探索定义Zoho Mail历史篇章的敏捷性、精确性和创新性…

分布式springboot 3项目集成mybatis官方生成器开发记录

文章目录 说明实现思路实现步骤第一步&#xff1a;创建generator子模块第二步&#xff1a;引入相关maven插件和依赖第三步&#xff1a;编写生成器配置文件第四步&#xff1a;运行查看结果 说明 该文章为作者开发学习记录&#xff0c;方便以后复习和交流主要内容为&#xff1a;…

图数据库 之 Neo4j - Browser 介绍(3)

Neo4j Browser 介绍 Neo4j Browser 中有 3 个模块&#xff0c;侧边栏&#xff0c;Cypher 编辑器与结果栏&#xff0c;在进入 Neo4j Browser 时结果栏会展示欢迎界面。 Cypher 编辑器 Cypher 是一种图形查询语言&#xff0c;用于查询和操作图形数据库。它是 Neo4j 图形数据库的…

提速MySQL:数据库性能加速策略全解析

提速MySQL&#xff1a;数据库性能加速策略全解析 引言理解MySQL性能指标监控和评估性能指标索引优化技巧索引优化实战案例 查询优化实战查询优化案例分析 存储引擎优化InnoDB vs MyISAM选择和优化存储引擎存储引擎优化实例 配置调整与系统优化配置调整系统优化优化实例 实战案例…

qt/c++实现表情选择框

&#x1f482; 个人主页:pp不会算法^ v ^ &#x1f91f; 版权: 本文由【pp不会算法v】原创、在CSDN首发、需要转载请联系博主 &#x1f4ac; 如果文章对你有帮助、欢迎关注、点赞、收藏(一键三连)和订阅专栏哦 实现功能 。编解码的设计 。映射关系设计 。匹配机制设计 演示效…

K8s环境下rook-v1.13.3部署Ceph-v18.2.1集群

文章目录 1.K8s环境搭建2.Ceph集群部署2.1 部署Rook Operator2.2 镜像准备2.3 配置节点角色2.4 部署operator2.5 部署Ceph集群2.6 强制删除命名空间2.7 验证集群 3.Ceph界面 1.K8s环境搭建 参考&#xff1a;CentOS7搭建k8s-v1.28.6集群详情&#xff0c;把K8s集群完成搭建&…