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 一 ...
随机推荐
- 攻防世界(十二)upload1
攻防世界系列 :upload1 1.打开题目,文件上传. 2.立即上传shell 1.php <?php @eval($_POST[root]); ?> 提示只能上传图片 3.burp改报 ...
- LTC4020锂电池充电模块开发记录
前期不断的查找手册 翻译LTC4020的英文手册 同时在论坛上找帖子 参照比较多的帖子如下: http://adi.eefocus.com/module/forum/forum.php?mod=vie ...
- android设置时钟
<TextClock android:id="@+id/timeText" android:layout_width="match_pa ...
- Django基本文件配置
1.setting.py (1) ALLOWED_HOSTS = ['*'] (2) INSTALLED_APPS = ['app_name'] (3) TEMPLATES 中的 'DIRS': ...
- 1130-host ... is not allowed to connect to this MySql server
解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 ...
- HDFS 05 - HDFS 的元数据管理(FSImage、EditLog、Checkpoint)
目录 1 - NameNode 的启动流程 2 - NameNode 的元数据 2.1 EditLog 操作日志 2.2 查看 EditLog 文件 2.3 FSImage 元数据镜像 2.4 查看 ...
- TaskManager任务管理工具类
TaskManager任务管理工具类 public class TaskManager { public static AbstractTask newTask(TaskContext taskIns ...
- CUDA Pro:通过向量化内存访问提高性能
CUDA Pro:通过向量化内存访问提高性能 许多CUDA内核受带宽限制,而新硬件中触发器与带宽的比率不断提高,导致带宽受限制的内核更多.这使得采取措施减轻代码中的带宽瓶颈非常重要.本文将展示如何在C ...
- 三、使用sudo分配管理权限
使用sudo分配管理权限 su命令 su - [账户名称] :切换到用户,不加用户名默认切换到root su - [账户名称] -c '命令' :以xx用户身份执行命令,注意命令需 ...
- 实验4、Flask基于Blueprint & Bootstrap布局的应用服务
1. 实验内容 模块化工程内容能够更好的与项目组内成员合作,Flask Blueprint提供了重要的模块化功能,使得开发过程更加清晰便利.此外,Flask也支持Bootstrap的使用. 2. 实验 ...