prometheus安装全过程

#安装prometheus

wget https://github.com/prometheus/prometheus/releases/download/v2.5.0/prometheus-2.5.0.linux-amd64.tar.gz
tar -xvf prometheus-2.5.0.linux-amd64.tar.gz
cd prometheus-2.5.0.linux-amd64/
mv * /home/work/prometheus/
cd /home/work/prometheus/
mkdir {data,cfg,logs,bin} -p
mv prometheus promtool bin/
mv prometheus.yml cfg/
vim /etc/systemd/system/prometheus.service

[Unit]
Description=Prometheus
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
User=root
ExecStart=/home/work/prometheus/bin/prometheus --config.file=/home/work/prometheus/cfg/prometheus.yml --storage.tsdb.path=/home/work/prometheus/data
Restart=on-failure

[Install]
WantedBy=multi-user.target

vim /home/work/prometheus/cfg/prometheus.yml

#安装node_exporter

wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.darwin-amd64.tar.gz
tar -zxvf node_exporter-0.17.0-rc.0.linux-amd64.tar.gz -C cd /home/work/prometheus/
cd /home/work/prometheus/
mv node_exporter-0.17.0-rc.0.linux-amd64 node_exporter
vim /etc/systemd/system/node_exporter.service

[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
Type=simple
User=root
ExecStart=/home/work/prometheus/node_exporter/node_exporter
Restart=on-failure
[Install]
WantedBy=multi-user.target

#安装grafana

wget https://dl.grafana.com/oss/release/grafana-6.1.3-1.x86_64.rpm
yum -y localinstall grafana-6.1.3-1.x86_64.rpm

#安装alertmanager

wget https://github.com/prometheus/alertmanager/releases/download/v0.20.0/alertmanager-0.20.0.linux-amd64.tar.gz
tar -xvf alertmanager-0.20.0.linux-amd64.tar.gz -C /home/work/prometheus/
cd /home/work/prometheus/ && mv alertmanager-0.20.0.linux-amd64/ alertmanager
cd alertmanager/
mkdir {bin,cfg,data}
mv alertmanager amtool bin/
mv alertmanager.yml cfg/
vim /usr/lib/systemd/system/alertmanager.service
[Unit]
Description=alertmanager
Documentation=https://prometheus.io/
After=network.target

[Service]
Type=simple
User=root
ExecStart=/home/work/prometheus/alertmanager/bin/alertmanager --config.file=/home/work/prometheus/alertmanager/cfg/alertmanager.yml --web.listen-address=10.10.2.17:9093 --cluster.listen-address=0.0.0.0:8001 --storage.path=/home/work/prometheus/alertmanager/data --log.level=info
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target

#安装pushgateway

wget https://github.com/prometheus/pushgateway/releases/download/v1.0.1/pushgateway-1.0.1.linux-amd64.tar.gz
tar xzvf pushgateway-1.0.1.linux-amd64.tar.gz
mv pushgateway-1.0.1.linux-amd64 /home/work/prometheus/pushgateway
./pushgateway &

原文地址:https://www.cnblogs.com/tengfei520/p/12109612.html

时间: 2024-08-30 18:09:49

prometheus安装全过程的相关文章

生产环境可用redis4.0.11安装全过程

生产环境可用redis4.0.11安装全过程操作系统版本为 centos6.5 先执行initialization.sh优化脚本 详情见 初始化脚本我们线上用的是redis-4.0.11.tar.gz根据日志内容进行优化 //后面会提现处理,我们这里可以先执行,不明白的同学,可以继续往后看. 优化1: [[email protected] conf]# echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf [[email p

prometheus安装

使用docker安装 vi prometheus.yml global: scrape_interval: 15s # By default, scrape targets every 15 seconds. # Attach these labels to any time series or alerts when communicating with # external systems (federation, remote storage, Alertmanager). externa

Prometheus安装和配置node_exporter监控主机

Node_exporter是可以在* Nix和Linux系统上运行的计算机度量标准的导出器. Node_exporter 主要用于暴露 metrics 给 Prometheus,其中 metrics 包括:cpu 的负载,内存的使用情况,网络等. 官方下载地址:https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz 1.安装Node_

生产环境可用mysql5.7.23安装全过程

生产环境安装5.7.23全过程 先执行initialization.sh优化脚本 详情见 Linux 在安装mysql前,需要先查看一下是否清空了系统自带了mysql我们这里需要删除系统自带了mysql lib 我们先把mysql放置在/opt下先上传与线上版本一致的 [[email protected] opt]# cat /etc/redhat-release CentOS release 6.5 (Final) [[email protected] opt]# ll total 62932

Prometheus 安装和配置

Prometheus的安装和配置 Linux环境下下载二进制分发包,解压后就安装完了. 1. 启动 解压后,在解压后的路径内执行命令./premetheus 即可以使用默认配置启动Prometheus应用. 默认使用的是同目录下的prometheus.yml文件 可以通过浏览器访问http://宿主机ip:9090 测试启动情况. 2. 配置 执行 prometheus 命令的时候可以通过参数 --config.file 来指定配置文件路径.Prometheus 服务运行过程中如果配置文件有改动

(1)prometheus安装部署

什么是prometheus? Prometheus 是由 SoundCloud 开源监控告警解决方案,从 2012 年开始编写代码,再到 2015 年 github 上开源以来,已经吸引了 9k+ 关注,以及很多大公司的使用:2016 年 Prometheus 成为继 k8s 后,第二名 CNCF(Cloud Native Computing Foundation) 成员. 主要功能: 多维 数据模型(时序由 metric 名字和 k/v 的 labels 构成).灵活的查询语句(PromQL)

普罗米修斯Prometheus 安装配置

一.基础环境 系统 IP 监控主机 CentOS 7 192.168.56.200 被监控主机 CentOS 7 192.168.56.201 二.Prometheus服务端安装 以下操作皆在监控主机(192.168.56.200)上执行. 2.0 关闭机器防火墙 # systemctl stop firewalld # systemctl disable firewalld 2.1 安装 go 环境 由于Prometheus是由go语言开发的,所以在安装Prometheus之前需要先在监控主机

grafana+prometheus安装

一些软件包 环境:1台centos7 一.普罗米修斯安装 官网下载https://prometheus.io/download/prometheus-2.15.1.linux-amd64.tar.gz 上传至/opt 解压tar xf prometheus-2.15.1.linux-amd64.tar.gz -C /usr/local/ 名字太长修改,mv /usr/local/prometheus-2.15.1.linux-amd64 /usr/local/prometheus 在/usr/l

pentaho saiku 安装全过程

公司希望也开发一套多维分析系统,以解决运营/产品无休止的需求和技术人力不足的矛盾! 一.开发选型: 一.BIRT:易用性差,所以没再使用 二.JasperReport+ireport:文档收费,不支持ETL工具 三.Pentaho:在中国比较普及,文档多,报表是其中的一部分,比如数据同步和ETL也都有 四.Openi:老牌BI工具,以前淘宝等公司都使用过,可惜过时啦 结合公司实际,综合考虑决定使用Pentaho的saiku做为报表平台 二.搭建环境: 选型结束后,就开始准备,搭建环境! 方案一.