CentOS-Docker搭建远程监控服务器指标
注:远程监控服务器指标,可查看、CPU、内存、网络信息等,搭建依赖Docker环境,可参考:yum安装Docker环境
服务端:Grafana(可视化展示) + Prometheus(数据源,配置客户端信息)
CentOS客户端导出机器指标:node_exporter
Windows客户端导出机器指标:wmi_exporter
使用grafana-dashboards说明
CentOS仪表盘:https://grafana.com/grafana/dashboards/8919
Windows仪表盘:https://grafana.com/grafana/dashboards/2129
下载相关镜像
$ docker pull prom/prometheus
$ docker pull prom/node-exporter
$ docker pull grafana/grafana
创建相关配置
配置数据源文件(样例仅监控本机,如需监控其他机器修改-targets即可,如: ['localhost:9100','192.168.1.100:9100','192.168.1.200:9182'])
$ vim /home/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).
external_labels:
monitor: 'server-monitor'# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5sstatic_configs:
- targets: ['localhost:9090']
labels:
instance: prometheus
- targets: ['localhost:9100']
labels:
#nodename: test
instance: local
运行镜像
1.客户端导出机器指标(本实例监控本机)
$ docker run --restart=unless-stopped -d --name=node-exporter -p 9100:9100 -v /etc/localtime:/etc/localtime prom/node-exporter
2.可视化展示grafana服务
$ docker run --restart=unless-stopped -d --name=grafana -p 3000:3000 grafana/grafana
3.数据源prometheus服务
$ docker run --restart=unless-stopped -d --name=prometheus -p 9090:9090 -v /home/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
配置grafana服务
1.访问:http://ip:3000 默认用户名/密码:admin/admin
2.配置数据源-prometheus,填写http地址后保存(Save & Test)
3.导入仪表盘
4.填写仪表盘id(Centos:8919,Windows:2129)
5.仪表盘预览,点击保存即可
CentOS监控最终展示效果
Windows监控最终展示效果
CentOS-Docker搭建远程监控服务器指标的更多相关文章
- centos + docker搭建深度学习环境以及一些问题解决
必须要说容器是一个很牛逼的思想!注意,是思想!也许docker有种种问题,但是不管docker能否茁壮地发展下去,未来这种方式的环境搭建一定会变得越来越流行! 网上有很多这方面的教程,但大多数都不太好 ...
- Docker实现CentOS容器SSH远程登录
Docker实现CentOS容器SSH远程登录 https://blog.csdn.net/A632189007/article/details/78625378 这里根据Dockerfile方式构建 ...
- 服务器搭建远程docker深度学习环境
服务器搭建远程docker深度学习环境 本文大部分内容参考知乎文章 Docker+PyCharm快速搭建机器学习开发环境 搭建过程中出现ssh连接问题可以查看最后的注意事项 Docker Docker ...
- 使用Docker搭建CentOS 7 + Apache 2.4+ PHP7
从Docker Hub上Pull最新的CentOS 7镜像并新建容器 # sudo docker pull centos docker run -p 8082:80 --name centos_c - ...
- ubuntu 或centos 使用Docker搭建anaconda+python基本环境
ubuntu 16 使用Docker安装anacondaubuntu docker 安装centos docker 安装搜索可用镜像 docker search anaconda 拉取你中意的镜像 d ...
- 基于Docker搭建大数据集群(一)Docker环境部署
本篇文章是基于Docker搭建大数据集群系列的开篇之作 主要内容 docker搭建 docker部署CentOS 容器免密钥通信 容器保存成镜像 docker镜像发布 环境 Linux 7.6 一.D ...
- Docker入门详解——安装docker并利用docker搭建lnmp
首先我们需先安装docker环境,这个比较简单,以centos7为例 docker在centos7上安装需要系统内核版本3.10+,可以通过uname -r查看内核版本号,如果版本不符请自行查阅资料更 ...
- Docker搭建Zentao(禅道)
禅道搭建方式有很多种,可参考官方文档搭建,这里介绍的是参考官方文档以docker方式搭建. 禅道内部默认会自动安装mysql数据库. 一.下载地址 禅道开源版: http://dl.cnezsof ...
- [转帖]基于docker 搭建Prometheus+Grafana
基于docker 搭建Prometheus+Grafana https://www.cnblogs.com/xiao987334176/p/9930517.html need good study 一 ...
随机推荐
- BogoMips 和cpu主频无关 不等于cpu频率
http://tinylab.org/explore-linux-bogomips/ 内核探索:Linux BogoMips 探秘 Tao HongLiang 创作于 2015/05/12 打赏 By ...
- 4 系统的 CPU 使用率很高,但为啥却找不到高 CPU的应用?
上一节讲了 CPU 使用率是什么,并通过一个案例教你使用 top.vmstat.pidstat 等工具,排查高 CPU 使用率的进程,然后再使用 perf top 工具,定位应用内部函数的问题.不过就 ...
- VFB FEEDBACK
- Linux 使用命令发送邮件
1.关闭本机的sendmail服务或者postfix服务 #执行下面的命令,关闭sendmail和postfix服务 #sendmial [root@db-backup ~]# service sen ...
- 一个很好的网站 有3D漂浮框 有动态小人数字时钟
http://www.cnblogs.com/jingmoxukong/p/7867397.html
- Navigation 实现不同fragment之间的view的共享(含动画过渡)
以imageView的共享举例 两个fragment都要有各自的imageview视图,id可以不同,但transitonName一定要相同, 都要指定相同的src 例如: fragment A &l ...
- 重新整理 .net core 实践篇—————配置系统之强类型配置[十]
前言 前文中我们去获取value值的时候,都是通过configurationRoot 来获取的,如configurationRoot["key"],这种形式. 这种形式有一个不好的 ...
- 1. 回顾Servlet
回顾Servlet 创建web工程 servlet-api:http://dwz.date/aTGa 编写Servlet import javax.servlet.ServletException; ...
- 达梦数据库产品支持技术学习分享_Week2
本周主要从以下几个方面进行本人对达梦数据库学习的分享,学习进度和学习情况因人而异,仅供参考. 一.文本命令行工具使用的方法(Disql和dmfldr) 二.数据库备份 三.定时作业功能 四.系统表和动 ...
- SQL Server 将两行或者多行拼接成一行数据
一个朋友,碰到一个问题. 就是查询出来的结果集,需要每隔三行.就将这三行数据以此拼接为一行显示.起初我想着用ROW_NUMBER加CASE WHEN去做,发现结果并非我预期那样. 结果如下: 由于别人 ...