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

如何识别网页用什么网站做的关于网站建设的合同协议书

如何识别网页用什么网站做的,关于网站建设的合同协议书,网店设计模板免费,正规的app网站开发目录 一、Pushgateway概述 1.1 Pushgateway简介 1.2 Pushgateway优点 1.3 pushgateway缺点 二、测试环境 三、安装测试 3.1 pushgateway安装 3.2 prometheus添加pushgateway 3.3 推送指定的数据格式到pushgateway 1.添加单条数据 2.添加复杂数据 3.SDk-prometheus-… 目录 一、Pushgateway概述 1.1 Pushgateway简介 1.2 Pushgateway优点 1.3 pushgateway缺点 二、测试环境 三、安装测试 3.1 pushgateway安装 3.2 prometheus添加pushgateway 3.3 推送指定的数据格式到pushgateway 1.添加单条数据 2.添加复杂数据 3.SDk-prometheus-client使用 【Prometheus】概念和工作原理介绍_prometheus工作原理-CSDN博客 【Prometheus】k8s集群部署node-exporter_kubectl 安装 promethues node-exporter-CSDN博客 【prometheus】k8s集群部署prometheus server-CSDN博客 【prometheus】k8s集群部署Grafana安装和配置|Prometheus监控K8S 【prometheus】k8s集群部署AlertManager实现邮件和钉钉告警-CSDN博客 【prometheus】监控MySQL并实现可视化-CSDN博客 【prometheus】监控nginx-CSDN博客 一、Pushgateway概述 1.1 Pushgateway简介 Pushgateway是prometheus的一个组件prometheus server默认是通过exporter主动获取数据默认采取pull拉取数据pushgateway则是通过被动方式推送数据到prometheus server用户可以写一些自定义的监控脚本把需要监控的数据发送给pushgateway 然后pushgateway再把数据发送给Prometheus server。 1.2 Pushgateway优点 Prometheus 默认采用定时pull 模式拉取targets数据但是如果不在一个子网或者防火墙prometheus就拉取不到targets数据所以可以采用各个target往pushgateway上push数据然后prometheus去pushgateway上定时pull数据在监控业务数据的时候需要将不同数据汇总, 汇总之后的数据可以由pushgateway统一收集然后由 Prometheus 统一拉取。 1.3 pushgateway缺点 Prometheus拉取状态只针对 pushgateway, 不能对每个节点都有效Pushgateway出现问题整个采集到的数据都会出现问题监控下线prometheus还会拉取到旧的监控数据需要手动清理 pushgateway不要的数据。 二、测试环境 IP 主机名 192.168.2.139 master1 192.168.40.140 node1 三、安装测试 3.1 pushgateway安装 在node1节点操作 docker pull prom/pushgateway docker run -d --name pushgateway -p 9091:9091 prom/pushgateway 在浏览器访问192.168.2.140:9091出现如下ui界面 3.2 prometheus添加pushgateway 修改prometheus-cfg.yaml文件 - job_name: pushgatewayscrape_interval: 5sstatic_configs:- targets: [192.168.2.140:9091]honor_labels: true 更新 kubectl apply -f prometheus-alertmanager-cfg.yaml kubectl delete -f prometheus-alertmanager-deploy.yaml kubectl apply -f prometheus-alertmanager-deploy.yaml 登录prometheus http://192.168.2.139:30242/targets 3.3 推送指定的数据格式到pushgateway 1.添加单条数据 # 向 {jobtest_job} 添加单条数据 echo metric 3.6 | curl --data-binary - http://192.168.2.140:9091/metrics/job/test_job这里需要注意的是将key value推送给pushgatewaycurl --data-binary是将HTTP POST请求中的数据发送给HTTP服务器pushgateway和用户提交THML表单时浏览器的行为是一样的HTTP POST请求中的数据为纯二进制数据。 prometheus web中查询 2.添加复杂数据 # 添加复杂数据 cat EOF | curl --data-binary - http://192.168.2.140:9091/metrics/job/test_job/instance/test_instance # TYPE node_memory_usage gauge node_memory_usage 26 # TYPE memory_total gauge node_memory_total 26000 EOF 这条连接主要分为三个部分 http://192.168.2.143:9091/metrics/job/test_job这是URL的主location发送到哪个URLjob/test_job表示是推送到哪个prometheus定义的job里面上面我们定义的job_name为pushgatewayinstance/test_instance表示推送后显示的主机名称是什么从上面pushgateway图也可以看出 如下是删除某个实例 # 删除某个组下某个实例的所有数据 curl -X DELETE http://192.168.2.140:9091/metrics/job/test_job/instance/test_instance# 删除某个组下的所有数据 curl -X DELETE http://192.168.2.140:9091/metrics/job/test_job 3.SDk-prometheus-client使用 python安装 prometheus_client 使用 pip 工具可以非常方便地安装 prometheus_client 测试脚本 # -*- coding: utf-8 -*-# 导入所需的库 from prometheus_client import CollectorRegistry, Gauge, push_to_gatewayif __name__ __main__:# 定义和注册指标registry CollectorRegistry()labels [req_status, req_method, req_url]g_one Gauge(requests_total, url请求次数, labels, registryregistry)g_two Gauge(avg_response_time_seconds, 1分钟内的URL平均响应时间, labels, registryregistry)# 收集和记录指标数据g_one.labels(200,GET, /test/url).set(1) #set设定值g_two.labels(200,GET, /test/api/url/).set(10) #set设定值# 推送指标数据到Pushgatewaypush_to_gateway(http://192.168.2.140:9091, jobSampleURLMetrics, registryregistry)在这个示例中我们定义了一个名为requests_total的指标记录了一个值为1和10的示例数据并将指标数据推送到了名为example_job的job中。
http://www.hkea.cn/news/14324411/

相关文章:

  • 取消网站备案流程简单又快的科学小制作
  • 免费网站制作 最好网络教学平台北师珠
  • 广州微网站建设价位网站 友情链接怎么做
  • 公司网站建设东莞有哪些做的比较精美的网站
  • 北京专业快速建站制作产品管理系统软件
  • 政务网站建设工作计划昆明app外包
  • 摄影行业网站wordpress关闭评论
  • 宠物医疗设计素材网站企业网站设计制作收费
  • 网站建设费用皆选网络网站维护提示怎么做
  • 15年做啥网站致富做科学实验的网站
  • 做视频哪个网站收入高沈阳网站建设方案模板
  • 网站建设成本核算大连做网站公司
  • 怎么让自己做的网站别人可以访问山东省青州市建设局网站
  • 用几个域名做网站好东莞横沥网站制作
  • 桂林北站附近住宿黄骅港股票代码
  • 模板创作师北京百度网站排名优化
  • 坪山网站建设基本流程怎样免费做游戏代理
  • 微建站官网制作网站费怎么做会计科目
  • 做哪个软件网站app沧州微酷网络科技有限公司
  • 外卖网站建设价钱永久一级传奇网站
  • 铁总建设函网站百度ip地址
  • 超全的开源建站系统大全php 公司网站源码
  • 巢湖网站建设电话如何做推广和引流
  • wap网站模板优化推广网站
  • 网站建网站建设设网站主机哪买
  • 免费软件制作网站模板下载软件有什么网站学做标书的
  • 惠州网站制作网站南阳手机网站建设
  • 网站地图制作软件手机网站大全123456
  • 商城网站模板图公司网站开发招标书
  • 推广网站有哪些wordpress 顶部图像