安装与配置
prometheus安装与配置
- 源码安装,只需要下载prometheus,并解压即可
- 使用docker安装,使用docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
启动可指定端口
./prometheus –config.file=prometheus.yml -web.listen-address 127.0.0.1:9090
使用文件动态发现配置
- job_name: 'applications'
file_sd_configs:
- files:
- config/applications/*.json
refresh_interval: 5m
grafana安装与配置
源码安装
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.4.3-1.x86_64.rpm
sudo yum install initscripts fontconfig
sudo rpm -Uvh grafana-4.4.3-1.x86_64.rpm邮件配置,只需要将defaults.ini中的smtp section配置好即可
至此,安装已经完毕