当前位置: 首页 > news >正文

Prometheus-JVM

在这里插入图片描述

一. JVM监控

  • 通过 jmx_exporter 启动端口来实现JVM的监控

Github

Kubernetes Deployment Java 服务,修改

wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.19.0/jmx_prometheus_javaagent-0.19.0.jar# 编写配置文件,我是通过 hostPath 方式挂进 pod 中的
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
rules:- pattern: 'java.lang<type=OperatingSystem><>((?!process_cpu_time)\w+):'name: os_$1type: GAUGEattrNameSnakeCase: true# 加入启动参数,其他部分省略,只看增加的spec:containers:- command:- java- -javaagent:/home/prometheus/jmx/jmx_prometheus_javaagent-0.19.0.jar=9999:/home/prometheus/jmx/config.yml		# 加入启动参数,指定端口为9999,并指定配置文件volumeMounts:        - mountPath: /home/prometheus/jmxname: jmxvolumes:- hostPath:path: /home/prometheus/jmxtype: ""name: jmx        

Service 修改或增加

apiVersion: v1
kind: Service
metadata:annotations:					# Service加入2行注释prometheus.io/jvm: "true"prometheus.io/port: "9999"name: yff-uef-apinamespace: yff
spec:ports:- name: httpport: 8080protocol: TCPtargetPort: 8080- name: jmx-metrices			# 并增加jmx所暴露的端口port: 9999protocol: TCPtargetPort: 9999selector:name: yff-uef-apiservice/env: prodtype: ClusterIP

Prometheus 增加 jvm 的配置

    - job_name: 'jvm'kubernetes_sd_configs:- role: endpointsrelabel_configs:- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_jvm]action: keepregex: true- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]action: replacetarget_label: __address__regex: ([^:]+)(?::\d+)?;(\d+)replacement: $1:$2- source_labels: [__meta_kubernetes_service_name]action: replaceregex: (.+)target_label: applicationreplacement: $1- action: labelmapregex: __meta_kubernetes_service_label_(.+)

Grafana 增加面板

  • 可以在官网寻找面板 JXM dashboard
  • 如下是我的 dashboard json信息
{"annotations": {"list": [{"builtIn": 1,"datasource": {"type": "datasource","uid": "grafana"},"enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","type": "dashboard"},{"datasource": {"type": "prometheus","uid": "xpMiKxl4k"},"enable": true,"expr": "resets(process_uptime_seconds{application=\"$application\", instance=\"$instance\"}[1m]) > 0","hide": false,"iconColor": "rgba(255, 96, 96, 1)","name": "Restart Detection","showIn": 0,"step": "1m","tagKeys": "restart-tag","textFormat": "uptime reset","titleFormat": "Restart"}]},"description": "Complete dashboard using metrics from prometheus JMX exporter, with drill down per job > instance","editable": true,"fiscalYearStartMonth": 0,"gnetId": 8563,"graphTooltip": 0,"id": 81,"links": [],"liveNow": false,"panels": [{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"0": {"text": "DOWN"},"1": {"text": "UP"}},"type": "value"},{"options": {"match": "null","result": {"text": "DOWN"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "#d44a3a","value": null},{"color": "#e24d42","value": 0},{"color": "#299c46","value": 1}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 3,"x": 3,"y": 0},"hideTimeOverride": false,"id": 21,"links": [{"targetBlank": true,"title": "Tomcat dashboard","url": "/d/chanjarster-tomcat-dashboard/tomcat-dashboard?$__url_time_range&$__all_variables"}],"maxDataPoints": 100,"options": {"colorMode": "value","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "up{job=\"$job\",instance=\"$instance\"}","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "Status","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"decimals": 0,"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "s"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 6,"y": 0},"id": 14,"links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "time() - process_start_time_seconds{job=\"$job\",instance=\"$instance\"}","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "Uptime","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "#299c46","value": null},{"color": "rgba(237, 129, 40, 0.89)","value": 35},{"color": "#d44a3a","value": 50}]},"unit": "dateTimeAsIso"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 10,"y": 0},"id": 15,"interval": "","links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "process_start_time_seconds{job=\"$job\",instance=\"$instance\"}*1000","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "Start time","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"decimals": 0,"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 7,"x": 14,"y": 0},"id": 19,"links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "/^jdk$/","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "label_join(jvm_info{job=\"$job\",instance=\"$instance\"}, \"jdk\", \", \", \"vendor\", \"runtime\", \"version\")","format": "table","instant": true,"intervalFactor": 1,"legendFormat": "","refId": "A"}],"title": "JVM Version","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 6,"y": 4},"id": 39,"interval": "","links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "os_available_processors{job=\"$job\",instance=\"$instance\"}","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "Available CPUs","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 10,"y": 4},"id": 23,"links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["mean"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "os_system_load_average{job=\"$job\",instance=\"$instance\"}","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "System load average","type": "stat"},{"datasource": {"uid": "$datasource"},"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"mappings": [{"options": {"match": "null","result": {"text": "N/A"}},"type": "special"}],"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 80}]},"unit": "none"},"overrides": []},"gridPos": {"h": 4,"w": 4,"x": 14,"y": 4},"id": 38,"links": [],"maxDataPoints": 100,"options": {"colorMode": "none","graphMode": "none","justifyMode": "auto","orientation": "horizontal","reduceOptions": {"calcs": ["mean"],"fields": "","values": false},"textMode": "auto"},"pluginVersion": "9.5.7","targets": [{"datasource": {"uid": "$datasource"},"expr": "os_open_file_descriptor_count{job=\"$job\",instance=\"$instance\"}","format": "time_series","instant": true,"intervalFactor": 1,"refId": "A"}],"title": "Open file descriptors","type": "stat"},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"decimals": 1,"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 24,"x": 0,"y": 8},"hiddenSeries": false,"id": 29,"legend": {"alignAsTable": true,"avg": false,"current": true,"max": true,"min": false,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "os_system_cpu_load{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "System","refId": "B"},{"datasource": {"uid": "$datasource"},"expr": "os_process_cpu_load{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "JVM","refId": "A"}],"thresholds": [],"timeRegions": [],"title": "CPU load","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"decimals": 1,"format": "percentunit","logBase": 1,"show": true},{"format": "short","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 0,"y": 17},"hiddenSeries": false,"id": 8,"legend": {"alignAsTable": true,"avg": true,"current": true,"max": true,"min": true,"rightSide": false,"show": true,"sortDesc": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"maxPerRow": 2,"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","repeat": "memarea","repeatDirection": "h","seriesOverrides": [{"alias": "Usage %","bars": true,"color": "#6d1f62","legend": false,"lines": false,"yaxis": 2,"zindex": -1}],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "jvm_memory_bytes_used{area=\"$memarea\",job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "Used","refId": "A"},{"datasource": {"uid": "$datasource"},"expr": " jvm_memory_bytes_max{area=\"$memarea\",job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "Max","refId": "B"},{"datasource": {"uid": "$datasource"},"expr": "jvm_memory_bytes_used{area=\"$memarea\",job=\"$job\",instance=\"$instance\"} / jvm_memory_bytes_max >= 0","format": "time_series","intervalFactor": 1,"legendFormat": "Usage %","refId": "C"}],"thresholds": [],"timeRegions": [],"title": "Memory area [$memarea]","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"format": "bytes","logBase": 1,"show": true},{"format": "percentunit","label": "","logBase": 1,"max": "1","min": "0","show": true}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 0,"y": 26},"hiddenSeries": false,"id": 2,"legend": {"alignAsTable": true,"avg": true,"current": true,"max": true,"min": true,"rightSide": false,"show": true,"sort": "current","sortDesc": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"maxPerRow": 2,"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","repeat": "mempool","repeatDirection": "h","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "jvm_memory_pool_bytes_max{pool=\"$mempool\",job=\"$job\",instance=\"$instance\"}","format": "time_series","interval": "","intervalFactor": 1,"legendFormat": "Max","metric": "jvm_memory_bytes_used","refId": "B","step": 5},{"datasource": {"uid": "$datasource"},"expr": "jvm_memory_pool_bytes_used{pool=\"$mempool\",job=\"$job\",instance=\"$instance\"}","format": "time_series","interval": "","intervalFactor": 1,"legendFormat": "Used","metric": "jvm_memory_bytes_used","refId": "A","step": 5},{"datasource": {"uid": "$datasource"},"expr": "jvm_memory_pool_bytes_committed{pool=\"$mempool\",job=\"$job\",instance=\"$instance\"}","format": "time_series","interval": "","intervalFactor": 1,"legendFormat": "Committed","metric": "jvm_memory_bytes_used","refId": "C","step": 5}],"thresholds": [],"timeRegions": [],"title": "Memory pool [$mempool]","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"format": "bytes","logBase": 1,"show": true},{"format": "short","logBase": 1,"show": true}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"decimals": 0,"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 0,"y": 53},"hiddenSeries": false,"id": 6,"legend": {"alignAsTable": true,"avg": false,"current": true,"max": true,"min": true,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "increase(jvm_gc_collection_seconds_count{job=\"$job\",instance=~\"$instance\"}[$__interval])","format": "time_series","interval": "60s","intervalFactor": 1,"legendFormat": "{{gc}}","metric": "","refId": "A","step": 10}],"thresholds": [],"timeRegions": [],"title": "GC count increase","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"decimals": 0,"format": "short","logBase": 1,"show": true},{"format": "short","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"decimals": 0,"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 12,"y": 53},"hiddenSeries": false,"id": 5,"legend": {"alignAsTable": true,"avg": false,"current": true,"max": true,"min": true,"rightSide": false,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "increase(jvm_gc_collection_seconds_sum{job=\"$job\",instance=~\"$instance\"}[$__interval])","format": "time_series","interval": "60s","intervalFactor": 1,"legendFormat": "{{gc}}","metric": "jvm_gc_collection_seconds_sum","refId": "A","step": 10}],"thresholds": [],"timeRegions": [],"title": "GC time","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"format": "s","logBase": 1,"show": true},{"format": "short","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"uid": "$datasource"},"decimals": 0,"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 0,"y": 62},"hiddenSeries": false,"id": 3,"legend": {"alignAsTable": true,"avg": false,"current": true,"hideZero": true,"max": true,"min": false,"rightSide": false,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"expr": "jvm_threads_current{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 5,"legendFormat": "JVM current threads","metric": "jvm_threads_current","refId": "A","step": 10},{"datasource": {"uid": "$datasource"},"expr": "jvm_threads_daemon{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 5,"legendFormat": "JVM daemon threads","metric": "jvm_threads_daemon","refId": "B","step": 10},{"datasource": {"uid": "$datasource"},"expr": "jvm_threads_deadlocked{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "JVM deadlocked threads","refId": "C"}],"thresholds": [],"timeRegions": [],"title": "Threads used","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"decimals": 0,"format": "short","logBase": 1,"show": true},{"format": "short","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"type": "prometheus","uid": "$datasource"},"fill": 1,"fillGradient": 0,"gridPos": {"h": 9,"w": 12,"x": 12,"y": 62},"hiddenSeries": false,"id": 4,"legend": {"alignAsTable": true,"avg": false,"current": true,"max": true,"min": true,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"editorMode": "code","expr": "jvm_classes_loaded_total{job=\"$job\", instance=\"$instance\"}","format": "time_series","interval": "","intervalFactor": 5,"legendFormat": "loaded","metric": "jvm_classes_loaded","range": true,"refId": "A","step": 10}],"thresholds": [],"timeRegions": [],"title": "Class loading","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"$$hashKey": "object:412","decimals": 0,"format": "short","label": "","logBase": 1,"show": true},{"$$hashKey": "object:413","format": "short","logBase": 1,"show": false}],"yaxis": {"align": false}},{"aliasColors": {},"bars": false,"dashLength": 10,"dashes": false,"datasource": {"type": "prometheus","uid": "$datasource"},"fill": 1,"fillGradient": 0,"gridPos": {"h": 10,"w": 24,"x": 0,"y": 71},"hiddenSeries": false,"id": 44,"legend": {"alignAsTable": true,"avg": false,"current": true,"max": true,"min": true,"show": true,"total": false,"values": true},"lines": true,"linewidth": 1,"links": [],"nullPointMode": "null","options": {"alertThreshold": true},"percentage": false,"pluginVersion": "9.5.7","pointradius": 5,"points": false,"renderer": "flot","seriesOverrides": [],"spaceLength": 10,"stack": false,"steppedLine": false,"targets": [{"datasource": {"uid": "$datasource"},"editorMode": "code","expr": "os_total_physical_memory_size{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "Total physical memory","range": true,"refId": "A"},{"datasource": {"uid": "$datasource"},"editorMode": "code","expr": "os_committed_virtual_memory_size{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "Committed virtual memory","range": true,"refId": "B"},{"datasource": {"uid": "$datasource"},"editorMode": "code","expr": "os_free_physical_memory_size{job=\"$job\",instance=\"$instance\"}","format": "time_series","intervalFactor": 1,"legendFormat": "Free physical memory","range": true,"refId": "C"}],"thresholds": [],"timeRegions": [],"title": "Physical memory","tooltip": {"shared": true,"sort": 0,"value_type": "individual"},"type": "graph","xaxis": {"mode": "time","show": true,"values": []},"yaxes": [{"$$hashKey": "object:486","format": "decbytes","logBase": 1,"show": true},{"$$hashKey": "object:487","format": "short","logBase": 1,"show": true}],"yaxis": {"align": false}}],"refresh": "5s","schemaVersion": 38,"style": "dark","tags": ["JVM","Kubernetes"],"templating": {"list": [{"current": {"selected": false,"text": "Prometheus","value": "Prometheus"},"hide": 0,"includeAll": false,"multi": false,"name": "datasource","options": [],"query": "prometheus","queryValue": "","refresh": 1,"regex": "","skipUrlSync": false,"type": "datasource"},{"current": {"selected": true,"text": "jvm","value": "jvm"},"hide": 0,"label": "job","name": "job","options": [{"selected": true,"text": "jvm","value": "jvm"}],"query": "jvm","skipUrlSync": false,"type": "textbox"},{"current": {"selected": false,"text": "digitalclinic-queueflow-api-jmx","value": "digitalclinic-queueflow-api-jmx"},"datasource": {"type": "prometheus","uid": "xpMiKxl4k"},"definition": "label_values(jvm_info{job=\"$job\"},application)","hide": 0,"includeAll": false,"label": "Application","multi": false,"name": "application","options": [],"query": {"query": "label_values(jvm_info{job=\"$job\"},application)","refId": "StandardVariableQuery"},"refresh": 2,"regex": "","skipUrlSync": false,"sort": 0,"tagValuesQuery": "","tagsQuery": "","type": "query","useTags": false},{"allValue": ".*","current": {"selected": false,"text": "172.17.204.47:9999","value": "172.17.204.47:9999"},"datasource": {"type": "prometheus","uid": "xpMiKxl4k"},"definition": "label_values(jvm_info{application=\"$application\"},instance)","hide": 0,"includeAll": false,"label": "instance","multi": false,"name": "instance","options": [],"query": {"query": "label_values(jvm_info{application=\"$application\"},instance)","refId": "StandardVariableQuery"},"refresh": 1,"regex": "","skipUrlSync": false,"sort": 0,"tagValuesQuery": "","tagsQuery": "","type": "query","useTags": false},{"current": {"selected": true,"text": ["All"],"value": ["$__all"]},"datasource": {"type": "prometheus","uid": "$datasource"},"definition": "","hide": 2,"includeAll": true,"multi": true,"name": "mempool","options": [],"query": {"query": "label_values(jvm_memory_pool_bytes_max{job=\"$job\", instance=\"$instance\"}, pool)","refId": "Prometheus-mempool-Variable-Query"},"refresh": 1,"regex": "","skipUrlSync": false,"sort": 1,"tagValuesQuery": "","tagsQuery": "","type": "query","useTags": false},{"current": {"selected": true,"text": ["All"],"value": ["$__all"]},"datasource": {"type": "prometheus","uid": "$datasource"},"definition": "","hide": 2,"includeAll": true,"multi": true,"name": "memarea","options": [],"query": {"query": "label_values(jvm_memory_bytes_used{job=\"$job\", instance=\"$instance\"}, area)","refId": "Prometheus-memarea-Variable-Query"},"refresh": 1,"regex": "","skipUrlSync": false,"sort": 0,"tagValuesQuery": "","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": "JVM dashboard","uid": "chanjarster-jvm-dashboard","version": 3,"weekStart": ""
}

相关文章:

Prometheus-JVM

一. JVM监控 通过 jmx_exporter 启动端口来实现JVM的监控 Github Kubernetes Deployment Java 服务&#xff0c;修改 wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.19.0/jmx_prometheus_javaagent-0.19.0.jar# 编写配置文件&#xff0…...

flink sql1.18.0连接SASL_PLAINTEXT认证的kafka3.3.1

阅读此文默认读者对docker、docker-compose有一定了解。 环境 docker-compose运行了一个jobmanager、一个taskmanager和一个sql-client。 如下&#xff1a; version: "2.2" services:jobmanager:image: flink:1.18.0-scala_2.12container_name: jobmanagerports:…...

pytorch张量的创建

张量的创建 张量&#xff08;Tensors&#xff09;类似于NumPy的ndarrays &#xff0c;但张量可以在GPU上进行计算。从本质上来说&#xff0c;PyTorch是一个处理张量的库。一个张量是一个数字、向量、矩阵或任何n维数组。 import torch import numpy torch.manual_seed(7) # 固…...

Web自动化测试工具的优势分析

Web自动化测试工具在现代软件开发中扮演着关键的角色&#xff0c;帮助团队确保Web应用程序的质量和稳定性。然而&#xff0c;选择合适的Web自动化测试工具对项目的成功至关重要。本文将介绍Web自动化测试工具优势是什么! 1. 自动化执行 Web自动化测试工具能够模拟用户的行为&am…...

黑豹程序员-读properties属性文件本地正常,打包jar后运行出错

读properties属性文件本地正常&#xff0c;打包jar后运行出错 java.io.FileNotFoundException:file:\D:\code\xml-load\target\XX.jar!\XXX(文件名、目录名或卷标语法不正确。)原因是读取方式不正确 当使用Spring Boot将应用打成jar时&#xff0c;需要读取resources目录下配置…...

PyQt6 QTimer计时器控件

锋哥原创的PyQt6视频教程&#xff1a; 2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~共计52条视频&#xff0c;包括&#xff1a;2024版 PyQt6 Python桌面开发 视频教程(无废话版…...

Vue:defineAsyncComponent(异步组件)、component(动态组件)、keep-alive(缓存组件)

异步组件&#xff1a;defineAsyncComponent Vue3 的 defineAsyncComponent 特性可以让我们延迟加载组件。因为在默认情况下&#xff0c;在构建项目或运行项目时&#xff0c;会将所有所需要的打包成一个整体&#xff0c;vue为单页面应用&#xff0c;同步加载大量的页面代码会导…...

14 款最佳文件恢复软件 [2024 年最佳精选工具]

顶级文件恢复软件的综合列表和比较。阅读此详细评论以选择最佳文件恢复工具并轻松恢复您的文件&#xff1a; 您在选择文件恢复工具时遇到困难吗&#xff1f;在阅读了对十大文件恢复软件的评论后&#xff0c;您可以做出正确的决定。 数据丢失是一个严重的问题&#xff0c;会损…...

Redis基础篇-004 Redis的Java客户端

Redis客户端分为三类&#xff1a; 命令行客户端图形化桌面客户端编程客户端&#xff08;java客户端&#xff09; redis可视化工具和客户端 1、 Jedis快速入门 Jedis的官网地址&#xff1a; https://github.com/redis/jedis 1.1 新建一个Maven工程并引入以下依赖 <!--引入…...

【数据结构和算法】---栈和队列的互相实现

目录 一、用栈实现队列1.1初始化队列1.2模拟入队列1.3模拟出队列1.4取模拟的队列头元素1.5判断队列是否为空 二、用队列实现栈2.1初始化栈2.2模拟出栈2.3模拟入栈2.4取模拟的栈顶元素2.5判读栈是否为空 一、用栈实现队列 具体题目可以参考LeetCode232. 用栈实现队列 首先要想到…...

机场信息集成系统系列介绍(6):机场协同决策支持系统ACDM

目录 一、背景介绍 1、机场协同决策支持系统是什么&#xff1f; 2、发展历程 3、机场协同决策参与方 4、相关定义 二、机场协同决策ACDM的建设目标 &#xff08;一&#xff09;机场协同决策支持系统的宏观目标 1、实现运行数据共享和前序航班信息透明化 2、实现地面资源…...

GO设计模式——17、解释器模式(行为型)

目录 解释器模式&#xff08;Interpreter Pattern&#xff09; 解释器模式的核心角色&#xff1a; 优缺点 代码实现 解释器模式&#xff08;Interpreter Pattern&#xff09; 解释器模式&#xff08;Interpreter Pattern&#xff09;提供了评估语言的语法或表达式的方式&am…...

基于SSM的大学生兼职平台的设计与实现

文章目录 项目介绍主要功能截图:部分代码展示设计总结项目获取方式🍅 作者主页:超级无敌暴龙战士塔塔开 🍅 简介:Java领域优质创作者🏆、 简历模板、学习资料、面试题库【关注我,都给你】 🍅文末获取源码联系🍅 项目介绍 基于SSM的大学生兼职平台的设计与实现,j…...

Ignite内存配置

配置内存 #1.内存架构 #1.1.概述 Ignite内存架构通过可以同时在内存和磁盘上存储和处理数据及索引&#xff0c;得到了支持磁盘持久化的内存级性能。 多层存储的运行方式类似于操作系统&#xff08;例如Linux&#xff09;的虚拟内存。但是这两种类型架构之间的主要区别是&…...

前端基础vue路由懒加载

为什么用路由懒加载 首屏组件加载速度更快一些&#xff0c;解决白屏问题&#xff0c;常言道需要就加载&#xff0c;不需要就先放一边 懒加载定义 懒加载简单来说就是延迟加载或按需加载&#xff0c;即在需要的时候的时候进行加载。 使用 常用的懒加载方式有两种&#xff1a;即…...

C++系列第九篇 数据类型下篇 - 复合类型(指针高级应用)

系列文章 C 系列 前篇 为什么学习C 及学习计划-CSDN博客 C 系列 第一篇 开发环境搭建&#xff08;WSL 方向&#xff09;-CSDN博客 C 系列 第二篇 你真的了解C吗&#xff1f;本篇带你走进C的世界-CSDN博客 C 系列 第三篇 C程序的基本结构-CSDN博客 C 系列 第四篇 C 数据类型…...

python三大开发框架django、 flask 和 fastapi 对比

本文讲述了什么启发了 FastAPI 的诞生&#xff0c;它与其他替代框架的对比&#xff0c;以及从中汲取的经验。 如果不是基于前人的成果&#xff0c;FastAPI 将不会存在。在 FastAPI 之前&#xff0c;前人已经创建了许多工具 。 几年来&#xff0c;我一直在避免创建新框架。首先&…...

html基础2

视频video <video src"视频的路径"controls"控制播放、暂停、音量等"autoplay"自动播放"loop"循环播放"width"视频播放器的宽度"height"视频播放器的高度"> </video>还有做浏览器兼容的方式&#xf…...

基于博弈树的开源五子棋AI教程[5 启发式搜索]

文章目录 1 最大化攻击者/最小化防守者排序2 置换表启发3 杀手表启发4 历史表启发历史表以及杀手表的维护初始化追加杀手表项清空杀手表 启发式搜索的姿势千奇百怪&#xff0c;本文只讨论一下几种 //搜索空间 #define Search_Space_MVA 0 //最优价值攻击者[分数最大] #d…...

JavaScript原型,原型链 ? 有什么特点?

一、原型 JavaScript 常被描述为一种基于原型的语言——每个对象拥有一个原型对象 当试图访问一个对象的属性时&#xff0c;它不仅仅在该对象上搜寻&#xff0c;还会搜寻该对象的原型&#xff0c;以及该对象的原型的原型&#xff0c;依次层层向上搜索&#xff0c;直到找到一个…...

Unity 问题 之 ScrollView ,LayoutGroup,ContentSizeFitter 一起使用时,动态变化时无法及时刷新更新适配界面的问题

Unity 问题 之 ScrollView ,LayoutGroup,ContentSizeFitter 一起使用时&#xff0c;动态变化时无法及时刷新更新适配界面的问题 目录 Unity 问题 之 ScrollView ,LayoutGroup,ContentSizeFitter 一起使用时&#xff0c;动态变化时无法及时刷新更新适配界面的问题 一、简单介绍…...

linux 中 C++的环境搭建以及测试工具的简单介绍

文章目录 makefleCMakegdb调试 与 coredumpValgrind 内存检测gtest 单元测试 makefile 介绍 安装 : sudo apt install make makefile 的规则: 举例说明 包括&#xff1a;目标文件 、 依赖文件 、 生成规则 使用 &#xff1a; make make clean CMake : CMake是一个…...

448. 找到所有数组中消失的数字

找到所有数组中消失的数字 描述 : 给你一个含 n 个整数的数组 nums &#xff0c;其中 nums[i] 在区间 [1, n] 内。请你找出所有在 [1, n] 范围内但没有出现在 nums 中的数字&#xff0c;并以数组的形式返回结果。 题目 : LeetCode 448. 找到所有数组中消失的数字: 448. 找…...

为何在下雪天它“失宠”了,传统雪地靴居然不适合下雪穿

随着冬至的到来&#xff0c;一年之中最寒冷的“三九天”正式拉开序幕。近期各地纷纷下起了大雪&#xff0c;在这场大雪中雪地靴似乎“失宠”了。在社交媒体上&#xff0c;有网友吐槽“雪地靴根本不能下雪穿”&#xff0c;后面有不少网友纷纷分享了自己在雪地靴上尴尬的经历&…...

第34节: Vue3 调用内联处理程序中的方法

在UniApp中使用Vue3框架时&#xff0c;你可以在模板中直接调用组件内联处理程序中的方法。以下是一个示例&#xff1a; <template> <view> <button click"handleClick">Click me</button> <p>{{ message }}</p> </view&…...

JavaScript--明明白白Promise (Park One)

明明白白Promise (Park One) Promise是一种用于处理异步操作的特殊对象。它代表了一个尚未完成但最终会完成的操作&#xff0c;并可以在操作完成后返回结果或错误。 Promise有三种状态&#xff1a;pending&#xff08;进行中&#xff09;、fulfilled&#xff08;已完成&#…...

el-form与el-upload结合上传带附件的表单数据(后端篇)

1.写在之前 本文采用Spring Boot MinIO MySQLMybatis Plus技术栈&#xff0c;参考ruoyi-vue-pro项目。 前端实现请看本篇文章el-form与el-upload结合上传带附件的表单数据&#xff08;前端篇&#xff09;-CSDN博客。 2.需求描述 在OA办公系统中&#xff0c;流程表单申请人…...

postMessage——不同源的网页直接通过localStorage/sessionStorage/Cookies——技能提升

最近遇到一个问题&#xff0c;就是不同源的两个网页之间进行localstorage或者cookie的共享。 上周其实遇到过一次&#xff0c;觉得麻烦就让后端换了种方式处理了&#xff0c;昨天又遇到了同样的问题。 使用场景 比如从网页A通过iframe跳转到网页B&#xff0c;而且这两个网页…...

上市公司-绿色投资者数据集(2000-2022)

上市公司-绿色投资者数据&#xff08;2000-2022年&#xff09;是一份涵盖了过去二十多年中国上市公司绿色投资情况的详细数据集。该数据集包括了各上市公司的股票代码、年份、会计年度、股票简称&#xff0c;以及STPT&#xff08;特殊处理股票的标识&#xff09;&#xff0c;行…...

3 pandas之dataframe

定义 DataFrame是一个二维数据结构&#xff0c;即数据以行和列的方式以表格形式对齐。 DataFrame特点&#xff1a; 存在不同类型的列大小可变带有标签的轴可对列和行进行算数运算 构造函数 pandas.DataFrame( data, index, columns, dtype, copy)参数解释&#xff1a; 序号…...

免费网站申请/百度手机助手app下载并安装

国战按计划进行,插7灵壁并在此集合,国战开始后很快就拿下寿春,并改7寿春雕像.这次好多了,绝大部分人都执行了命令,但还是有个别团友没有改7.吴攻寿春,被击退;龙攻许昌,也被击退.这种情况对我们很有利,许昌寿春两边刷,兄弟们想不上榜也难.可惜,人算不如天算,龙出重兵攻许昌,于是…...

找客户在公司做网站/新闻报道最新消息今天

之前都是使用OpenCV/C来做的图像处理。因为python更轻量&#xff0c;更方便所以硕士毕业论文使用python处理下&#xff0c;做的过程中记录下使用python处理特征提取遇到的一些问题&#xff0c;以上为背景。 开发环境 windows8.1 pycharm anaconda2 (自带很多包) opencv2.4…...

做校园二手交易网站的目的/seo搜索优化专员

在numpy中&#xff0c;使用等号&#xff08;&#xff09;直接赋值返回的是一个视图&#xff0c;属于浅拷贝&#xff1b;要完整的拷贝一个numpy.ndarray类型的数据的话&#xff0c;只能调用copy()函数 # coding utf-8 import numpy as np t np.zeros(24).reshape(4, 6) t1 t …...

生态农业网站建设方案/网站建设制作教程

一&#xff0c;数据库初识 Q1&#xff1a;为什么要用数据库 将文件和程序存在一台机器上上很不合理的 操作文件是一件很麻烦的事 Q2:数据库的优势 程序稳定性&#xff1a;这样任意一台服务所在的机器崩溃了都不会影响数据和另外的服务 数据一致性&#xff1a;所有的数据都存储在…...

买做指甲的材料在哪个网站/最新足球消息

说多了都是泪。。。 最后&#xff0c;我们还是要用一首“500的歌”来共勉&#xff1a;来来来&#xff0c;加完今天&#xff0c;还有三天&#xff01; 文章转载自 开源中国社区 [http://www.oschina.net]...

西藏山南建设局网站/手机百度下载app

希望能够帮助到一些朋友&#xff0c;认识到数据库索引正确设计的重要性。 由于我比较懒&#xff0c;就简单用文字描述一下&#xff0c;就懒得切图片证明了&#xff0c;懂技术的朋友可以自己测试一下&#xff0c;可证实我的测试结果是否真实。不懂技术的朋友信不信也无妨。 测…...