Prometheus是一个开源的,基于metrics(度量)的一个开源监控系统,它有一个简单而强大的数据模型和查询语言,让我们分析应用程序。Prometheus诞生于2012年主要是使用go语言编写的,并在Apache2.0许可下获得许可,目前有大量的组织正在使用Prometheus在生产。2016年,Prometheus成为云计算组织(CNCF)第二个成员。
下载对应平台的安装包解压的目录
hostname$ tar xf prometheus-2.10.0.linux-amd64.tar.gz hostname$ mv prometheus-2.10.0.linux-amd64 /opt/
启动脚本
hostname$ sudo vim /usr/lib/systemd/system/prometheus.service [Unit] Description=Prometheus instance Wants=network-online.target After=network-online.target After=postgresql.service mariadb.service mysql.service [Service] User=prometheus Group=prometheus Type=simple Restart=on-failure WorkingDirectory=/opt/prometheus/ RuntimeDirectory=prometheus RuntimeDirectoryMode=0750 ExecStart=/opt/prometheus/prometheus --storage.tsdb.retention=15d --config.file=/opt/prometheus/prometheus.yml --web.max-connections=512 --web.read-timeout=5m --storage.tsdb.path="/opt/data/prometheus \ --query.timeout=2m --query.max-concurrency=200" LimitNOFILE=10000 TimeoutStopSec=20 [Install] WantedBy=multi-user.target
启动参数说明
原文:https://www.cnblogs.com/sellsa/p/11112249.html