由于Prometheus是go语言写的,所以不需要编译,安装的过程非常简单,仅需要解压然后运行。
Prometheus官方下载地址:https://prometheus.io/download/

安装Prometheus server

# 解压
# tar xf prometheus-2.4..linux-amd64.tar.gz # 运行
# cd prometheus-2.4.3.linux-amd64/
# ./prometheus --config.file=prometheus.yml

node_exporter安装

# 解压
# tar xf node_exporter-0.16.0.linux-amd64.tar.gz # 运行
# cd node_exporter-0.16.0.linux-amd64/
# ./node_exporter # 验证node_exporter是否安装成功
# curl 127.0.0.1:9100 # 查看性能指标
# curl 127.0.0.1:9100/metrics

配置(关闭之前运行的node_exporter及prometheus)

创建目录

# mkdir /etc/prometheus

# 拷贝上面解压的prometheus.yml文件到/etc/prometheus
# cp /root/prometheus-2.4.3.linux-amd64/prometheus.yml /etc/prometheus/

添加启动脚本

下载地址:https://github.com/youerning/blog/tree/master/prometheus

# cp node-exporter.service /etc/init.d/node-exporter
# cp prometheus.service /etc/init.d/prometheus
# chmod +x /etc/init.d/node-exporter
# chmod +x /etc/init.d/prometheus # 创建工作目录(Prometheus的数据会存在这,启动脚本里面我写的是/data)
# mkdir /data # 启动服务
# service prometheus start
# service node-exporter start

启动prometheus服务如果出现报错:

start-stop-daemon: command not found

解决方法:

# 安装依赖包
# yum install gcc-c++ ncurses-devel -y # wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.17.25.tar.xz
# tar -xf  dpkg_1.17.25.tar.xz
# cd dpkg-1.17.25
# ./configure
# make
# cd utils
# make 
# cp start-stop-daemon /usr/sbin/

Promethus安装指南的更多相关文章

  1. nGrinder安装指南

    NGrinder 由两个模块组成,其运行环境为 Oracle JDK 1.6 nGrinder controller  web 应用程序,部署在Tomcat 6.x 或更高的版本 nGrinder A ...

  2. postgresql pgsql最新版安装指南及数据存储路径更改及主从配置

    postgresql pgsql最新版安装指南及数据存储路径更改及主从配置 安装指南 首先在apt的list添加你当前系统版本对应的apt列表 目前官网有16.04,14.04,12.04 分别对应下 ...

  3. 全新 Mac 安装指南(编程篇)(环境变量、Shell 终端、SSH 远程连接)

    注:本文专门用于指导对计算机编程与设计(尤其是互联网产品开发与设计)感兴趣的 Mac 新用户,如何在 Mac OS X 系统上配置开发与上网环境,另有<全新 Mac 安装指南(通用篇)>作 ...

  4. 全新 Mac 安装指南(通用篇)(推荐设置、软件安装、推荐软件)

    注:本文将会不定期维护与更新,有需要的朋友请在 Github 上订阅该条 Issues:<全新 Mac 安装指南(通用篇)>. 在 Mac 电脑上只用 Windows 操作系统的同学请看到 ...

  5. ArchLinux安装指南

    将ArchLinux作为进阶Linux发行版,主要看重滚动更新和深入理解Linux的安装过程. 由于是新手,所以先选择在公司电脑上用VMware来安装.然后渐进到借助U盘在win10笔记本上安装双系统 ...

  6. Linux环境中Openfire安装指南

    Linux环境中Openfire安装指南 安装环境: 安装软件:Openfire 4_1_0 http://download.igniterealtime.org/openfire/openfire_ ...

  7. scrapy3_ 安装指南

    安装指南 安装Scrapy 注解 请先阅读 平台安装指南. 下列的安装步骤假定您已经安装好下列程序: Python 2.7 Python Package: pip and setuptools. 现在 ...

  8. storm 原理简介及单机版安装指南——详细版【转】

    storm 原理简介及单机版安装指南 本文翻译自: https://github.com/nathanmarz/storm/wiki/Tutorial 原文链接自:http://www.open-op ...

  9. mac osx 系统 brew install hadoop 安装指南

    mac osx 系统 brew  install hadoop 安装指南   brew install hadoop 配置 core-site.xml:配置hdfs文件地址(记得chmod 对应文件夹 ...

随机推荐

  1. python(十)、进程

    一.基本概念 进程和线程是编程中非常重要的概念,它是并发和异步的基础性知识. 1.进程 概念:程序在并发环境中的执行过程.进程作为系统资源分配.调度.管理和独立运行的基本单位,决定了操作系统的四大特性 ...

  2. mysql 关联左表不存在数据 并 根据身份证计算查找大于65岁以上老人

    --- //查找左边不存在数据,不能用 = '' SELECT m.uid FROM es_members m LEFT JOIN es_user_self_care_assessment u ON ...

  3. 在线编辑器KindEditor的使用

    1.官网下载:点击进入 2.解压后目录说明 ├── asp asp示例 ├── asp.net asp.net示例 ├── attached 空文件夹,放置关联文件attached ├── examp ...

  4. 实例-系数可配置的fir滤波器

  5. yugabyte cloud native db 基本试用

    备注: 测试环境使用docker进行安装试用 1. 安装 a. Download mkdir ~/yugabyte && cd ~/yugabyte wget https://down ...

  6. python 怎么和命令行交互

    http://www.cyberciti.biz/faq/python-run-external-command-and-get-output/ http://stackoverflow.com/qu ...

  7. STM32启动过程解读与跟踪验证

    经过查阅各种官方文献和对代码进行单步跟踪,详细地叙述了STM32加电启动的具体过程.对于关键性的语句都指明了出处.下面将学习成果分享给大家,由于笔者知识有限,不当之处敬请指出. 为了更好的说明问题,先 ...

  8. EasyUI 左,右(上、下)布局

    左,右(上.下)布局 <body class="easyui-layout"> <div data-options="region:'west',col ...

  9. C++Windows核心编程读书笔记

    转自:http://www.makaidong.com/%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%96%87/71405.shtml "C++Windows核心编程读书笔 ...

  10. ftp之心脏病

    FTP基础 FTP只通过TCP连接,没有用于FTP的UDP组件.FTP不同于其他服务的是它使用了两个端口, 一个数据端口和一个命令端口(或称为控制端口).通常21端口是命令端口,20端口是数据端口.当 ...