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

steamcn网站是谁做的上海外贸seo

steamcn网站是谁做的,上海外贸seo,黑龙江省建设安全协会网站,企业网站建设方案范本PrometheusGrafana多方位监控 契机 ⚙ 最近发现火山引擎有托管的Prometheus,可是当前是邀测阶段。并且发现火山云的ECS是自带开机自启的exporter的。刚好需要搭建一套服务器监控,所以研究了一套Prometheus监控,包含linux主机监控nginx监控es监控rabbitM…

Prometheus+Grafana多方位监控

契机

基础

docker安装

#grafana安装+挂载data
mkdir /x/grafana-storage
chmod 777  /x/grafana-storage
docker run -d \
-p 3000:3000 \
--name=grafana \
-v /x/grafana-storage:/var/lib/grafana \
grafana/grafana#promethes安装+挂载yml
mkdir /x/prometheus
#配置文件在下面
vim /x/prometheus/prometheus.yml
docker run  -d \
-p 9090:9090 \
--privileged=true \
--restart always \
--name=prometheus \
-v /x/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml  \
prom/prometheus#进入grafana
http://localhost:3000
默认密码:admin admin
#修改ui和语言
#导入数据源prometheus

prometheus.yml最终配置

#全局配置
global:scrape_interval: 15sevaluation_interval: 15s#抓取配置
scrape_configs:#nginx监控- job_name: 'nginx'metrics_path: '/metrics' static_configs:- targets: ['localhost:9113']#es监控- job_name: "es"metrics_path: "/metrics"static_configs:- targets: [ "localhost:9111" ]#rabbitmq监控- job_name: "rabbitmq"metrics_path: "/metrics"static_configs:- targets: [ "localhost:15692" ]#ECS监控- job_name: nodestatic_configs:- targets: [ 'localhost:9091','localhost1:9091','localhost2:9091']#Java程序监控- job_name: servicemetrics_path: "/actuator/prometheus"static_configs:- targets: ["localhost:8090"]labels:application: applciation1- targets: ["localhost:9999"]labels:application: applciation2

ECS监控

安装

如果选用的火山云的服务器直接参考,如果不是火山云需要参考文档安装

https://www.volcengine.com/docs/6731/1195154
https://www.volcengine.com/docs/6408/69457

#查看监控状态
systemctl status cloud-monitor-agent
#查看9091端口监听
ss -naltp | grep 9091
#返回如下信息时,表示监控组件工作正常,9091 端口已开启。
LISTEN     0      128       [::]:9091                  [::]:*                   users:(("cloud-monitor-a",pid=1661,fd=3))
#老火山服务器升级组件
sed -i 's/Prometheus: false/Prometheus: true/' /usr/local/cloud-monitor-agent/config.yaml && systemctl restart cloud-monitor-agent
#查看端口是否正常访问
curl 127.0.0.1:9091/metrics

监控配置

#抓取配置
scrape_configs:#ECS监控- job_name: nodestatic_configs:- targets: [ 'localhost:9091','localhost1:9091','localhost2:9091']

监控大盘

https://www.volcengine.com/docs/6731/1195154
拉到最下面就有一个监控大盘

效果演示

请添加图片描述

Nginx监控

安装


#查看nginx是否安装stub模块
nginx -V 2>&1 | grep -o with-http_stub_status_module#没安装的话需要参考其他教程安装#修改nginx.conf
server {listen 9088; listen [::]:9088; server_name localhost; location = /stub_status { stub_status;}
}#nginx配置刷新
nginx -t
nginx -s reload#校验
curl http://localhost:9088/stub_status#安装exporter
mkdir -p /home/prometheus_exporter/{nginx,es}
cd /home/prometheus_exporter/nginx
#这里要根据系统版本选择
wget https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v1.1.0/nginx-prometheus-exporter_1.1.0_linux_amd64.tar.gz
tar -xvf nginx-prometheus-exporter_1.1.0_linux_amd64.tar.gz
nohup /home/prometheus_exporter/nginx/nginx-prometheus-exporter -nginx.scrape-uri=http://localhost:9088/stub_status >> /dev/null 2>&1 &

监控配置

#抓取配置
scrape_configs:#nginx监控- job_name: 'nginx'metrics_path: '/metrics' static_configs:- targets: ['localhost:9113']

监控大盘

登陆grafana新建看板导入

https://grafana.com/grafana/dashboards/11199-nginx/

效果演示

请添加图片描述

ElasticSearch监控

安装

#安装exporter
cd /home/prometheus_exporter/es
#这里要根据系统来选择
wget https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v1.7.0/elasticsearch_exporter-1.7.0.linux-amd64.tar.gz
tar -xvf elasticsearch_exporter-1.7.0.linux-amd64.tar.gz
nohup /home/prometheus_exporter/es/elasticsearch_exporter-1.7.0.linux-amd64/elasticsearch_exporter  --web.listen-address :9111 --es.uri http://user:psw@localhost:9200 >> /dev/null 2>&1 &

监控配置

#抓取配置
scrape_configs:#es监控- job_name: "es"metrics_path: "/metrics"static_configs:- targets: [ "localhost:9111" ]

监控大盘

登陆grafana新建看板导入

https://grafana.com/grafana/dashboards/14191-elasticsearch-overview/

效果演示

请添加图片描述

RabbitMQ监控

安装

#主要就会是暴露15692
docker run -d \
--privileged \
-p 5672:5672 -p 15672:15672 -p 15692:15692 \
--name rabbitmq \
--restart=always \
-v /home/docker/rabbitmq/data:/var/lib/rabbitmq \
rabbitmq:3.9.0-management#进入容器,启用插件
rabbitmq-plugins enable rabbitmq_prometheus

监控配置

#抓取配置
scrape_configs:#mq监控- job_name: "rabbitmq"metrics_path: "/metrics"static_configs:- targets: [ "localhost:15692" ]

监控大盘

登陆grafana新建看板导入

https://grafana.com/grafana/dashboards/10991-rabbitmq-overview/

效果演示

请添加图片描述

Redis监控

安装

#在grafana管理页面
#连接#数据源
#添加redis数据源即可
#无需监控配置

监控大盘

登陆grafana新建看板导入

https://grafana.com/grafana/dashboards/11835-redis-dashboard-for-prometheus-redis-exporter-helm-stable-redis-ha/

效果演示

请添加图片描述

Java应用监控

安装

#pom导入
<dependency><groupId>io.micrometer</groupId><artifactId>micrometer-registry-prometheus</artifactId>
</dependency>#yml配置
management:endpoints:web:exposure:include: "*"endpoint:health:show-details: ALWAYS

监控配置

#抓取配置
scrape_configs:#Java程序监控- job_name: servicemetrics_path: "/actuator/prometheus"static_configs:- targets: ["localhost:8090"]labels:application: applciation1- targets: ["localhost:9999"]labels:application: applciation2

监控大盘

登陆grafana新建看板导入

https://grafana.com/grafana/dashboards/4701-jvm-micrometer/

https://grafana.com/grafana/dashboards/12900-springboot-apm-dashboard/

效果演示

请添加图片描述

请添加图片描述

写到最后

欢迎访问:https://bothsavage.github.io
请添加图片描述

http://www.yayakq.cn/news/13150/

相关文章:

  • 网站开发公司如何做直播建设小型网站系统开题报告
  • 中铁建设集团华北分公司网站赣州信息港
  • 正规代做毕业设计的网站wordpress 高亮
  • 公司网站后如何更新东道设计公司logo含义
  • 昆山网站建设及推广做内容网站好累
  • 公司做网站的价格几千元做移动端网站
  • 免费代刷网站推广快速php网站建设的毕设报告
  • 广州专业做网站公司最新军事新闻12小时
  • 如何建单位内部购物网站专门做游戏交易的网站有哪些
  • 建设银行信用卡积分兑换网站商城网站的建设
  • 网站空间租用和自己搭建服务器郑州商城网站开发
  • 无锡新吴区住房和建设交通局网站wordpress 暂停访问
  • 门户网站时代上海 宝安网站建设 网络服务
  • 重庆建筑网站设计型网站自带优化
  • 惠州企业网站seohtml代码中标签的书写不区分大小写
  • 创意网站建设欣赏西安网站制作公司官网
  • 网站开发工程师绩效考核高端网站特色
  • 怎么做一个企业的网站湖南长沙有什么好玩的地方
  • dede模板 展柜网站源码普通网站跟营销型网站的对比
  • 有什么免费建网站网站开发设计教程
  • 网站做编辑福州销售网站设计企业
  • 建设俄语网站宽屏网站和普通网站
  • 网站建设教学改进如何加强网站建设和信息宣传
  • 响应式网站代码做搜狗手机网站优化点
  • 可以做动漫的网站有哪些建设网站的技术性背景
  • ui做套网站多少钱深圳网络推广深圳网
  • 深圳企业网站建设企业化妆品备案查询入口
  • 新安县住房和城乡建设局网站用easyui做的网站
  • 免费创建网站的软件广告推广代运营公司
  • 东莞快速建站平台搭建一个网站需要什么