内容简介:在Prometheus 配置文件使用了 YAML 格式,默认为根目录通过
下载
在 下载 页面,下载最新版本的 Prometheus 分发包,解压缩。
配置
Prometheus 配置文件使用了 YAML 格式,默认为根目录 prometheus.yml
配置文件,可以通过 --config.file
参数指定配置文件。
通过 --web.enable-lifecycle
参数,可以通过 HTTP POST 请求 /-/reload
触发重新加载配置。
可以通过 Prometheus 提供的工具,校验配置文件:
./promtool check config prometheus.yml
启停服务
启动服务脚本 start-prom.sh 文件:
#/bin/sh
pid_file=`dirname $0`/prometheus.pid
if [ -f "$pid_file" ] ; then
echo "Prometheus is still running, please stop first."
exit
fi
nohup ./prometheus --config.file=prometheus.yml --web.enable-lifecycle > prometheus.log 2>&1 &
echo $! > prometheus.pid
停止服务脚本 stop-prom.sh 文件:
pid_file=`dirname $0`/prometheus.pid
if [ ! -f "$pidfile" ] ; then
echo "Prometheus already stopped."
exit
fi
pid=`cat $pid_file`
echo -e "Stopping Prometheus $pid ... "
kill $pid
if [ -f "$pid_file" ] ; then
rm $pid_file
exit
fi
参考
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
OKR:源于英特尔和谷歌的目标管理利器
(美) 保罗R.尼文(Paul R. Niven)、本•拉莫尔特(Ben Lamorte) / 况阳 / 机械工业出版社 / 2017-8-1 / 59.00元
内在动机驱动,而非绩效考核驱动 尤其适用快速扩张和转型期组织 谷歌、英特尔、领英、推特、星佳等硅谷知名企业成功的法宝 OKR(目标与关键结果法)是一套严密的思考框架和持续的纪律要求,旨在确保员工紧密协作,把精力聚焦在能促进组织成长的、可衡量的贡献上。 如何更好地将OKR集成到企业现有的绩效评估体系中? 如何确保OKR由高管团队来领导,而不仅仅是HR、IT或财务等职能部......一起来看看 《OKR:源于英特尔和谷歌的目标管理利器》 这本书的介绍吧!