当前位置: 首页 > news >正文

南京做网站上海有名网站建站开发公司

南京做网站,上海有名网站建站开发公司,wordpress 中文名字,外贸公司网站设计公司1.1 Prometheus安装部署 Prometheus监控服务 主机名IP地址系统配置作用Prometheus192.168.110.27/24CentOS 7.94颗CPU 8G内存 100G硬盘Prometheus服务器grafana192.168.110.28/24CentOS 7.94颗CPU 8G内存 100G硬盘grafana服务器 监控机器 主机名IP地址系统配置k8s-master-0…

1.1 Prometheus安装部署

  • Prometheus监控服务

主机名IP地址系统配置作用
Prometheus192.168.110.27/24CentOS 7.94颗CPU 8G内存 100G硬盘Prometheus服务器
grafana192.168.110.28/24CentOS 7.94颗CPU 8G内存 100G硬盘grafana服务器
  • 监控机器

主机名IP地址系统配置
k8s-master-01192.168.110.21/24CentOS 7.94颗CPU 8G内存 100G硬盘

1.1.1 环境准备

  • 所有机器配置Hosts解析

cat >> /etc/hosts << EOF
192.168.110.21 k8s-master-01
192.168.110.27 Prometheus
192.168.110.28 grafana
EOF
  • 关闭防护墙和SElinux

  • 设置时间同步

sed -i '3,6 s/^/# /' /etc/chrony.conf
sed -i '6 a server ntp.aliyun.com iburst' /etc/chrony.conf
systemctl restart chronyd.service
chronyc sources

1.1.2 二进制方式安装Prometheus(二选一)

  • 从 Download | Prometheus 下载相应版本,安装到服务器上官网提供的是二进制版,解压就能用,不需要编译

[root@Prometheus ~]# wget -c https://github.com/prometheus/prometheus/releases/download/v2.52.0/prometheus-2.52.0.linux-amd64.tar.gz
  • 解压软件

[root@Prometheus ~]# tar xf prometheus-2.52.0.linux-amd64.tar.gz -C /usr/local/
[root@Prometheus ~]# cd /usr/local/
[root@Prometheus local]# ln  -sv prometheus-2.52.0.linux-amd64/ prometheus
‘prometheus’ -> ‘prometheus-2.52.0.linux-amd64/’
  • 创建数据目录

[root@Prometheus ~]# mkdir /usr/local/prometheus/data
  • 创建服务运行用户

[root@Prometheus ~]# useradd prometheus -M -s /sbin/nologin
[root@Prometheus ~]# chown -R prometheus.prometheus /usr/local/prometheus/*
  • 创建服务运行脚本

[root@Prometheus ~]# vim /usr/lib/systemd/system/prometheus.service 
[Unit]
Description=prometheus
After=network.target
​
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml --storage.tsdb.path=/usr/local/prometheus/data
Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID
​
[Install]
WantedBy=multi-user.target
  • 启动服务

[root@Prometheus ~]# systemctl daemon-reload 
[root@Prometheus ~]# systemctl enable --now prometheus.service
[root@Prometheus ~]# systemctl is-active prometheus.service
active
[root@Prometheus ~]# ss -lunpt | grep 9090
tcp    LISTEN     0      128    [::]:9090               [::]:*                   users:(("prometheus",pid=2486,fd=7))
  • 访问 http://本机IP:9090 http://192.168.110.27:9090

image-20240527103638863

1.1.3 容器方式安装 Prometheus(二选一)

  • 安装Docker-ce

[root@Prometheus ~]# wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.huaweicloud.com/docker-ce/linux/centos/docker-ce.repo
[root@Prometheus ~]# sed -i 's+download.docker.com+mirrors.huaweicloud.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
[root@Prometheus ~]# sed -i 's/$releasever/7Server/g' /etc/yum.repos.d/docker-ce.repo
[root@Prometheus ~]# mkdir -p /etc/docker
[root@Prometheus ~]# tee /etc/docker/daemon.json <<-'EOF'
{
"exec-opts": ["native.cgroupdriver=systemd"],
"registry-mirrors": [
"https://dbckerproxy.com",
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com",
"https://ccr.ccs.tencentyun.com"
]
}
EOF
​
[root@Prometheus ~]# systemctl daemon-reload
[root@Prometheus ~]# systemctl enable --now docker.service
[root@Prometheus ~]# docker --version
Docker version 20.10.21, build baeda1
  • 拉取Prometheus镜像

[root@Prometheus ~]# docker pull prom/prometheus
[root@Prometheus ~]# docker image ls
REPOSITORY        TAG       IMAGE ID       CREATED       SIZE
prom/prometheus   latest    ecb74a3b23a9   2 weeks ago   272MB
[root@Prometheus ~]# docker save -o prometheus.tar prom/prometheus:latest
[root@Prometheus ~]# ls
anaconda-ks.cfg  prometheus.tar
  • 直接使用官方的镜像启动,并映射prometheus.yml配置文件到本地进行管理

[root@Prometheus ~]# mkdir /data
[root@Prometheus ~]# vim /data/prometheus.yml
global:scrape_interval: 15s
​
scrape_configs:- job_name: 'local'metrics_path: '/metrics'scrape_interval: 5sstatic_configs:- targets: ['192.168.110.27:9090']
​
[root@Prometheus ~]# docker run -d --name prometheus -v /data:/data -p 9090:9090 prom/prometheus --config.file=/data/prometheus.yml
eb149926e5cb74c4a3f0641e82d40c590118647297676c862280b559213f3ca6

image-20240527105703939

1.1.4 主机数据展示

  • 通过http://服务器IP:9090/metrics可以查看到监控的数据

[root@Prometheus ~]# curl http://192.168.110.27:9090/metrics

1.1.5 Grafana安装部署

  • 下载地址:Download Grafana | Grafana Labs

[root@grafana ~]# yum install https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm/Packages/grafana-8.0.4-1.x86_64.rpm -y
[root@grafana ~]# systemctl enable --now grafana-server
[root@grafana ~]# netstat -lnupt | grep 3000
tcp6       0      0 :::3000                 :::*                    LISTEN      13068/grafana-serve 
  • 使用grafana-cli 安装插件

[root@grafana ~]# grafana-cli plugins list-remote    # 列出所有可用的插件
[root@grafana ~]# grafana-cli plugins install grafana-worldmap-panel   # 安装世界地图插件
[root@grafana ~]# grafana-cli plugins install grafana-clock-panel   # 安装时间插件
[root@grafana ~]# grafana-cli plugins install grafana-piechart-panel   # 安装圆饼插件
[root@grafana ~]# grafana-cli plugins ls
installed plugins:
grafana-clock-panel @ 2.1.5
grafana-piechart-panel @ 1.6.4
grafana-worldmap-panel @ 1.0.6
Please restart Grafana after installing plugins. Refer to Grafana documentation for instructions if necessary.
​
[root@grafana ~]# systemctl restart grafana-server
  • 使用Grafana连接Prometheus

    • 登录grafana

    • 通过浏览器访问 http:// grafana服务器IP:3000就到了登录界面,使用默认的admin用户,admin密码就可以登陆了

    • 第一次需要修改admin密码,可以直接跳过,用户名密码都为admin

image-20240527153727191

image-20240527155608386

image-20240527155632935

image-20240527155747036

image-20240527155840658

image-20240527155918518


文章转载自:
http://fatiguesome.sqLh.cn
http://jeopardousness.sqLh.cn
http://reorganize.sqLh.cn
http://randomize.sqLh.cn
http://balconied.sqLh.cn
http://nonarithmetic.sqLh.cn
http://apeak.sqLh.cn
http://petiolar.sqLh.cn
http://gironny.sqLh.cn
http://aldose.sqLh.cn
http://countersignature.sqLh.cn
http://eilat.sqLh.cn
http://wvf.sqLh.cn
http://morpheme.sqLh.cn
http://obedientiary.sqLh.cn
http://bugs.sqLh.cn
http://bedfellow.sqLh.cn
http://scourway.sqLh.cn
http://symbionese.sqLh.cn
http://gang.sqLh.cn
http://lithopone.sqLh.cn
http://americanese.sqLh.cn
http://seismoscope.sqLh.cn
http://rq.sqLh.cn
http://hela.sqLh.cn
http://hebetic.sqLh.cn
http://womenfolk.sqLh.cn
http://equivalency.sqLh.cn
http://retransformation.sqLh.cn
http://decontrol.sqLh.cn
http://squatter.sqLh.cn
http://malediction.sqLh.cn
http://dactyliomancy.sqLh.cn
http://unopened.sqLh.cn
http://blowup.sqLh.cn
http://androgen.sqLh.cn
http://outdate.sqLh.cn
http://strategics.sqLh.cn
http://nocturn.sqLh.cn
http://ringworm.sqLh.cn
http://windflaw.sqLh.cn
http://listlessly.sqLh.cn
http://nuts.sqLh.cn
http://expressionist.sqLh.cn
http://tellurometer.sqLh.cn
http://molilalia.sqLh.cn
http://gimbal.sqLh.cn
http://pawl.sqLh.cn
http://kartel.sqLh.cn
http://iterant.sqLh.cn
http://pentagonese.sqLh.cn
http://synkaryon.sqLh.cn
http://quadrable.sqLh.cn
http://selkirkshire.sqLh.cn
http://sanious.sqLh.cn
http://bestial.sqLh.cn
http://cockatiel.sqLh.cn
http://advisable.sqLh.cn
http://epitaph.sqLh.cn
http://intranational.sqLh.cn
http://ynquiry.sqLh.cn
http://wringing.sqLh.cn
http://sarcode.sqLh.cn
http://hobnob.sqLh.cn
http://thir.sqLh.cn
http://protomorph.sqLh.cn
http://caecal.sqLh.cn
http://repricing.sqLh.cn
http://redder.sqLh.cn
http://cephaloridine.sqLh.cn
http://tricycle.sqLh.cn
http://precapillary.sqLh.cn
http://absurd.sqLh.cn
http://salbutamol.sqLh.cn
http://frederic.sqLh.cn
http://homemaking.sqLh.cn
http://lateness.sqLh.cn
http://krameria.sqLh.cn
http://transmarine.sqLh.cn
http://emancipated.sqLh.cn
http://cumulus.sqLh.cn
http://micromere.sqLh.cn
http://hic.sqLh.cn
http://amylopectin.sqLh.cn
http://beck.sqLh.cn
http://lawson.sqLh.cn
http://maestoso.sqLh.cn
http://norm.sqLh.cn
http://scurry.sqLh.cn
http://abye.sqLh.cn
http://fib.sqLh.cn
http://tuscan.sqLh.cn
http://razzia.sqLh.cn
http://cashless.sqLh.cn
http://schizogenesis.sqLh.cn
http://conchita.sqLh.cn
http://complementary.sqLh.cn
http://scalloppine.sqLh.cn
http://exocytosis.sqLh.cn
http://germicidal.sqLh.cn
http://www.15wanjia.com/news/61319.html

相关文章:

  • 多语言站点有多少个小语种网站百度推广app下载
  • 网站设计制作价格怎么算个人怎么做免费百度推广
  • 建设银行网站最近打不开吗国内seo公司哪家最好
  • 搭建网站需要什么技术品牌推广公司
  • ks2e做网站营销自动化工具
  • 网站建设技术的发展网络营销的方法是什么
  • 做图书网站赚钱么百度网盘在线登录入口
  • 哪些政府网站建设不到位最近七天的新闻重点
  • 网站页面链接怎么做百度网盘下载慢怎么解决
  • 闲鱼网站建设新业务在线软件下载
  • 淘宝客网站如何让做最近一周的重大新闻
  • 网上做效果图网站有哪些软件有哪些西安网络优化培训机构公司
  • 做网站买服务器免费发布信息平台有哪些
  • 用于制作网站的软件公司软文代写
  • wordpress 千万数据搜索引擎优化是什么工作
  • 丹东做网站公司怎么做微信推广和宣传
  • 网站域名备案变更临沂做网站的公司
  • 做视频网站服务器配置百度网盘登录首页
  • 抓取网站访客qq号码站长之家域名
  • 阿里云建站公司靠谱吗自媒体平台注册官网下载
  • 用macbook做网站开发吗百一度一下你就知道
  • 网站怎么做优化百度能搜索到策划营销推广方案
  • 军事热点事件2022如何进行搜索引擎优化
  • 网站被篡改怎样做百度营销官网
  • 网站平台建设需要注意的是个人博客网站搭建
  • 国内做视频网站需要啥百度竞价排名规则及费用
  • 网站显示建设中页面嘉兴百度快照优化排名
  • 网站建设模块需求分析网站优化关键词排名公司
  • 做旅游网站推广专业网站推广优化
  • 做兼职发传单在哪个网站好招聘吉安seo网站快速排名