prometheus安装、使用
本文主要参考https://songjiayang.gitbooks.io/prometheus/introduction/what.html
二进制包安装
我们可以到 Prometheus 二进制下载页面,选择自己需要的系统版本,下面我们将以 ubuntu server 作为演示。
环境准备
- linux amd64 (ubuntu server)
- prometheus 1.6.2
下载 Prometheus Server
创建下载目录,以便安装过后清理掉
mkdir ~/Download
cd ~/Download
使用 wget 下载 Prometheus 的安装包
wget https://github.com/prometheus/prometheus/releases/download/v1.6.2/prometheus-1.6.2.linux-amd64.tar.gz
创建 Prometheus 目录,用于存放所有 Prometheus 相关的运行服务
mkdir ~/Prometheus
cd ~/Prometheus
使用 tar 解压缩 prometheus-1.6.2.linux-amd64.tar.gz
tar -xvzf ~/Download/prometheus-1.6.2.linux-amd64.tar.gz
cd prometheus-1.6.2.linux-amd64
当解压缩成功后,可以运行 version 检查运行环境是否正常
./prometheus version
如果你看到类似输出,表示你已安装成功:
prometheus, version 1.6.2 (branch: master, revision: xxxx)
build user: xxxx
build date: xxxx
go version: go1.8.1
启动 Prometheus Server
./prometheus
如果 prometheus 正常启动,你将看到如下信息:
INFO[0000] Starting prometheus (version=1.6.2, branch=master, revision=b38e977fd8cc2a0d13f47e7f0e17b82d1a908a9a) source=main.go:88
INFO[0000] Build context (go=go1.8.1, user=root@c99d9d650cf4, date=20170511-13:03:00) source=main.go:89
INFO[0000] Loading configuration file prometheus.yml source=main.go:251
INFO[0000] Loading series map and head chunks... source=storage.go:421
INFO[0000] 0 series loaded. source=storage.go:432
INFO[0000] Starting target manager... source=targetmanager.go:61
INFO[0000] Listening on :9090 source=web.go:259
通过启动日志,可以看到 Prometheus Server 默认端口是 9090。
当 Prometheus 启动后,你可以通过浏览器来访问 http://IP:9090,将看到如下页面
图 1.5.1.1 - prometheus-graph.png
在默认配置中,我们已经添加了 Prometheus Server 的监控,所以我们现在可以使用 PromQL(Prometheus Query Language)来查看,比如
图 1.5.1.2 - prometheus-console.png
总结
- 可以看出 Prometheus 二进制安装非常方便,没有依赖,自带查询 web 界面。
- 在生产环境中,我们可以将 Prometheus 添加到 init 配置里,或者使用 supervisord 作为服务自启动。
prometheus安装、使用的更多相关文章
- Prometheus安装
Prometheus安装 下载地址: https://prometheus.io/download/ 现在时间是: 2019.09.07 安装环境: Linux centos7 minimal 虚拟机 ...
- Prometheus 安装
目录 简介 安装部署 环境准备 安装 配置环境变量 配置 启动 简介 prometheus存储的是时序数据,即按相同时序(相同名称和标签),以时间维度存储连续的数据的集合. 时序(time serie ...
- Prometheus 安装Alertmanager集成
Prometheus 安装Alertmanager集成 # 下载地址 地址1:https://prometheus.io/download/ 地址2:https://github.com/promet ...
- Prometheus 安装Grafana与Prometheus集成
Prometheus 安装Grafana与Prometheus集成 Grafana是一个开源的度量分析和可视化系统. 下载地址:https://grafana.com/grafana/download ...
- Prometheus 安装部署
Prometheus 安装部署 安装版本:prometheus-2.6.1 百度云下载:https://pan.baidu.com/s/1w16lQZKw8PCHqlRuSK2i7A 提取码:lw1q ...
- Prometheus安装教程
Prometheus安装教程 欢迎关注H寻梦人公众号 参考目录 docker安装Prometheus 基于docker 搭建Prometheus+Grafana prometheus官方文档 dock ...
- Prometheus安装和配置node_exporter监控主机
Node_exporter是可以在* Nix和Linux系统上运行的计算机度量标准的导出器. Node_exporter 主要用于暴露 metrics 给 Prometheus,其中 metrics ...
- Prometheus安装部署说明
本文主要介绍了如何二进制安装Prometheus.使用 Node Exporter 采集主机信息并使用Grafana来进行图形化的展示. 1. 安装Prometheus Server Promethe ...
- prometheus学习系列二: Prometheus安装
下载 在prometheus的官网的download页面,可以找到prometheus的下载二进制包. [root@node00 src]# cd /usr/src/ [root@node00 src ...
随机推荐
- jersey学习笔记
最近一个项目用到了jersey,我只是负责前端.也借此机会好好了解一下REST webservice及一大推名词. http://redhacker.iteye.com/blog/1914105 1. ...
- java web中如何获取spring容器中定义的bean----WebApplicationContext的使用
本文简单编写一个servlet来获取spring容器中管理的<bean id="dateBean" class="java.util.Date" sin ...
- The Real Meaning of Peace
The Real Meaning of Peace There once was a king who offered a prize to the artist who would paint th ...
- 发起一个NetCore技术联盟促进NetCore技术应用
一.简介 1.从十几年前开始net,到两年前转java,到去年底发现netcore2这玩艺,从此以后坚定成为netcore的追随着. 2.有心促进netcore的应用,聚集一些人员共同学习,减少技术使 ...
- 【洛谷4719】 动态dp(树链剖分,dp,矩阵乘法)
前言 其实我只是为了过掉模板而写的ddp,实际应用被吊着锤 Solution 并不想写详细的过程 一句话过程:将子树中轻儿子的贡献挂到这个点上面来 详细版:(引用yyb) 总结一下的话,大致的过程是这 ...
- akka开发(一)HelloWorld
package com.hfi.helloakka; import akka.actor.ActorRef; import akka.actor.Props; import akka.actor.Un ...
- django 获取request请求对象及response响应对象中的各种属性值
django request对象和HttpResponse对象 HttpRequest对象(除非特殊说明,所有属性都是只读,session属性是个例外) HttpRequest.scheme 请求方案 ...
- CTFcrackTools-V3 – 一款旨在帮助 CTFer 在 CTF 中发挥作用的一个框架
CTFcrackTools-V3 CTFcrackTools重置版 作者:米斯特安全-林晨.摇摆.奶权 米斯特安全团队首页:http://www.hi-ourlife.com/ 部分插件来源:希望团队 ...
- Linux 基础命令 持续更新中...
1.ls 显示当前文件/文件夹 显示文件大小: ls -lh 显示隐藏文件: ls -a 显示文件详细信息: ls -l (ll)2.pwd 显示当前所在路径 cat 显示当前文件下所有内容3.cd ...
- 多线程编程,CPU是如何解决多线程内存访问问题的
CPU对内存变量的修改是先读取内存数据到CPU Cache中,然后再由CPU做运算,运算完成后继续写入到内存中 在单核CPU中,这完全没有问题,然而在多核CPU中,每一个CPU核心都拥有自己独立的Ca ...