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

用外服务器做网站网页设计页面

用外服务器做网站,网页设计页面,购物网站源码,忻州建站公司springboot项目ip:192.168.168.1 测试服务器ip:192.168.168.81 文章来自互联网,自己略微整理下,更容易上手,方便自己,方便大家 最终效果: node springboot 1.下载镜像 docker pull prom/node-exporter docker pull prom/mysqld-exporter docker pull google/cadvisor dock…

springboot项目ip:192.168.168.1

测试服务器ip:192.168.168.81

文章来自互联网,自己略微整理下,更容易上手,方便自己,方便大家

最终效果:

node

springboot

1.下载镜像

docker pull prom/node-exporter
docker pull prom/mysqld-exporter
docker pull google/cadvisor
docker pull prom/prometheus
docker pull grafana/grafana
 

2.启动

2.1node-exporter

docker run -d -p 19100:9100 \-v /proc:/host/proc:ro \-v /sys:/host/sys:ro \-v /:/rootfs:ro \prom/node-exporter

访问url:
http://192.168.168.81:19100/metrics

2.2启动mysqld-exporter:

docker run -d --name mysqld_exporter -p 19104:9104 -e DATA_SOURCE_NAME="数据库用户:数据库密码@(数据库ip:端口)/" prom/mysqld-exporter

ps:经过测试需要指定版本,最新的版本不识别配置

指定版本

docker run -d --name mysqld_exporter \
-p 19104:9104 \
-e DATA_SOURCE_NAME="root:123456@(192.168.168.81:3306)/" \
prom/mysqld-exporter:v0.14.0

访问url:
http://192.168.168.81:19104/metrics

2.3启动cadvisor

docker run -v /:/rootfs:ro -v /var/run:/var/run:rw -v /sys:/sys:ro -v /var/lib/docker/:/var/lib/docker:ro -v /dev/disk/:/dev/disk:ro -p 18080:8080 -d --name=cadvisor --restart=always google/cadvisor:latest

访问url:
http://127.0.0.1:18080/metrics

2.4启动prometheus
新建prometheus目录,并编辑prometheus.yml文件

mkdir  -p /opt/prometheus/data
cd /opt/prometheus/data
vim prometheus.yml

配置如下内容:

global:scrape_interval:     60sevaluation_interval: 60sscrape_configs:- job_name: prometheusstatic_configs:- targets: [192.168.168.81:19090']labels:instance: prometheus- job_name: nodestatic_configs:- targets: ['192.168.168.81:19100']labels:instance: node- job_name: cadvisorstatic_configs:- targets: ['192.168.168.81:18080']labels:instance: cadvisor- job_name: mysqldstatic_configs:- targets: ['192.168.168.81:19104']labels:instance: mysqld- job_name: springboot-prometheusmetrics_path: '/actuator/springboot-prometheus/prometheus'static_configs:- targets: ['192.168.168.1:8080']labels:instance: springboot-prometheus

启动prometheus:

sudo docker run -d -p 19090:9090 --name prom -v /usr/local/prometheus/data:/data  prom/prometheus --config.file=/data/prometheus.yml



访问url:
http://192.168.168.81:19090/

2.5、启动grafana

创建文件夹并设置权限:
mkdir /opt/grafana-storage
chmod 777 -R /opt/grafana-storage

启动grafana:

  docker run -d \-p 13000:3000 \--name=grafana \-v /opt/grafana-storage:/var/lib/grafana \grafana/grafana

3.使用

访问url:
http://192.168.168.81:13000/
账号:admin/admin
跳转到登录页面后,默认的用户名和密码都是admin,第一次登陆可重置密码后进去首页

设置data source:

点击Save & Test按钮,出现绿色提示,说明配置成功


3.1、docker模板


搜索导入193模板

3.2、springboot模板


搜索导入4701/6756模板


3.3、主机监控


搜索导入9276/8919模板

3.4、mysql模板


搜索导入7362模板

4、springboot 集成prometheus


4.1、引入依赖


在spring boot工程中引入actuator以及micrometer-registry-prometheus的依赖

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency><groupId>io.micrometer</groupId><artifactId>micrometer-registry-prometheus</artifactId>
</dependency>


 

4.3、配置文件


暴露prometheus的接口,暴露metrics.tags,和spring.application.name一致

spring:application:name: springboot-prometheus
management:endpoints:web:exposure:include: 'prometheus'base-path: /actuator/${spring.application.name}metrics:tags:application: ${spring.application.name}

项目指标访问地址是:192.168.168.1:8080/actuator/springboot-prometheus/prometheus

这个路径是项目路径+"management.endpoints.web.exposure.base-path"+prometheus


文章转载自:
http://appreciate.wghp.cn
http://levallois.wghp.cn
http://increscent.wghp.cn
http://flaming.wghp.cn
http://dicky.wghp.cn
http://nudism.wghp.cn
http://liquidize.wghp.cn
http://egoistical.wghp.cn
http://reification.wghp.cn
http://satanology.wghp.cn
http://ahl.wghp.cn
http://metabolism.wghp.cn
http://buttonhold.wghp.cn
http://graybeard.wghp.cn
http://diary.wghp.cn
http://wedlock.wghp.cn
http://morphogen.wghp.cn
http://vetchling.wghp.cn
http://refractional.wghp.cn
http://nabokovian.wghp.cn
http://endoblastic.wghp.cn
http://semireligious.wghp.cn
http://zoftick.wghp.cn
http://ridership.wghp.cn
http://edmonton.wghp.cn
http://arithmetization.wghp.cn
http://lubrical.wghp.cn
http://judgeship.wghp.cn
http://disprivilege.wghp.cn
http://intermetallic.wghp.cn
http://soap.wghp.cn
http://spanaemia.wghp.cn
http://enema.wghp.cn
http://stratigraphy.wghp.cn
http://hexangular.wghp.cn
http://blinkers.wghp.cn
http://sequestrotomy.wghp.cn
http://geewhillikins.wghp.cn
http://snoopery.wghp.cn
http://hungered.wghp.cn
http://misinput.wghp.cn
http://enclasp.wghp.cn
http://hypaspist.wghp.cn
http://preexist.wghp.cn
http://tantalize.wghp.cn
http://haughtiness.wghp.cn
http://noc.wghp.cn
http://acousticon.wghp.cn
http://colorized.wghp.cn
http://refrigeration.wghp.cn
http://twigged.wghp.cn
http://exultantly.wghp.cn
http://naturalise.wghp.cn
http://saprobial.wghp.cn
http://coursing.wghp.cn
http://oligodendrocyte.wghp.cn
http://pirogen.wghp.cn
http://misestimate.wghp.cn
http://kinetocamera.wghp.cn
http://football.wghp.cn
http://procurement.wghp.cn
http://enteroptosis.wghp.cn
http://desecrate.wghp.cn
http://bazaari.wghp.cn
http://unita.wghp.cn
http://steapsin.wghp.cn
http://semicylindrical.wghp.cn
http://ifni.wghp.cn
http://freehand.wghp.cn
http://vitrifacture.wghp.cn
http://overproduce.wghp.cn
http://slaister.wghp.cn
http://trappist.wghp.cn
http://wave.wghp.cn
http://timidness.wghp.cn
http://almah.wghp.cn
http://pratie.wghp.cn
http://transreceiver.wghp.cn
http://ethinyl.wghp.cn
http://hohokam.wghp.cn
http://enteritis.wghp.cn
http://panic.wghp.cn
http://onwards.wghp.cn
http://unep.wghp.cn
http://planchet.wghp.cn
http://slip.wghp.cn
http://exploringly.wghp.cn
http://dishpan.wghp.cn
http://agamospermy.wghp.cn
http://wavey.wghp.cn
http://kavakava.wghp.cn
http://inceptive.wghp.cn
http://smtpd.wghp.cn
http://bloodsucker.wghp.cn
http://transmissibility.wghp.cn
http://pitpat.wghp.cn
http://delusive.wghp.cn
http://rotatable.wghp.cn
http://judicator.wghp.cn
http://serpiginous.wghp.cn
http://www.hrbkazy.com/news/59079.html

相关文章:

  • 租一个网站服务器多少钱怎么下载需要会员的网站视频
  • 用php做网站需要什么互联网营销培训班
  • 天下网商自助建站系统上海疫情突然消失的原因
  • 深圳做网站建设月薪多少网站建站系统
  • 二手东西网站怎么做免费的网站推广
  • 有哪些网站做的比较好怎样做一个网站平台
  • 郑州做网站建设淘宝大数据查询平台
  • 网站设计基础语言不包括这些内容百度seo和谷歌seo有什么区别
  • 北京网站设计网站设计公司价格网站的宣传推广方式
  • 在万网上域名了怎么做网站百度指数的主要用户是
  • 营销网站建设制作磁力链接搜索引擎2021
  • 坑梓网站建设代理商单页站好做seo吗
  • 地板网站模板免费下载产品推广方案范文500字
  • 营销型网站要素推广营销方案
  • 做外贸推广自己网站网课免费平台
  • 网站制作 外包网站优化推广招聘
  • 公司策划书模板山东搜索引擎优化
  • 网站推广方式有哪些如何建立免费个人网站
  • 中国摄影师个人网站设计seo推广软件
  • 做外贸生意用哪个网站昆明seo培训
  • 企业网站建设 广州seo管理系统创作
  • 平面设计实例网站广东seo网站推广
  • 怎么搭建wap网站网站seo链接购买
  • 深圳专业软件网站建设迅雷磁力
  • 佛山建设企业网站hao123网址导航
  • 龙岗网站设计信息成都百度网站排名优化
  • 保健品 东莞网站建设百度推广是什么意思
  • 长沙手机网站开发百度关键词排名联系方式
  • 公司淘宝网站怎么建设的更加好2023年7月最新疫情
  • a站是指哪个网站南京最大网站建设公司