網站首頁 編程語言 正文
在mac下載安裝prometheus
- 在https://prometheus.io/download/下載prometheus放到自定義的位置。
- 解壓壓縮包
- 創建data文件夾
mkdir -p data
mac下安裝Node Exporter
(NodeExporter是Prometheus提供的一個可以采集到主機信息的應用程序,它能采集到機器的 CPU、內存、磁盤等信息)
cd到目標目錄,然后用命令下載二進制包
curl -OL https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.darwin-amd64.tar.gz
解壓這個二進制包
tar -xzf node_exporter-1.3.1.darwin-amd64.tar.gz
進入&運行node exporter
cd node_exporter-1.3.1.darwin-amd64 cd ..
cp node_exporter-1.3.1.darwin-amd64/node_exporter /usr/local/bin/node_exporter
運行
cd ... cd /usr/local/bin ./node_exporter
訪問http://localhost:9100/看到
點擊http://localhost:9100/metrics進去可以看到
# HELP node_cpu Seconds the cpus spent in each mode. # TYPE node_cpu counter node_cpu{cpu="cpu0",mode="idle"} 362812.7890625 # HELP node_load1 1m load average. # TYPE node_load1 gauge node_load1 3.0703125
數據說明
- HELP 解釋當前指標的含義
- TYPE 說明當前指標的數據類型
- node_cpu的注釋表明當前指標是cpu0上idle進程占用CPU的總時間
- CPU占用時間是一個只增不減的度量指標,從類型中也可以看出node_cpu的數據類型是計數器(counter)
- node_load1 該指標反映了當前主機在最近一分鐘以內的負載情況 指標類型為儀表盤(gauge)
參考文檔?https://yunlzheng.gitbook.io/prometheus-book/
原文鏈接:https://segmentfault.com/a/1190000042115225
相關推薦
- 2022-05-27 Python腳本傳參數argparse模塊的使用_python
- 2022-07-27 Python?迭代器Iterator詳情_python
- 2023-02-01 Python動態演示旋轉矩陣的作用詳解_python
- 2022-10-29 MultipartFile工具類的簡單介紹
- 2022-09-16 Android?Jetpack架構中ViewModel接口暴露的不合理探究_Android
- 2023-10-26 ElementUI日期轉為“yyyy-MM-dd“格式
- 2023-01-05 Kotlin?掛起函數CPS轉換原理解析_Android
- 2022-04-16 python?configparser中默認值的設定方式_python
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支