pometheus调用nginxvts监控-创新互联

nginx-vts-exporter
前题是nginx安装了vts模块

创新互联主要从事成都网站建设、网站设计、网页设计、企业做网站、公司建网站等业务。立足成都服务南召,10年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220

1,nginx配置文件中添加如下配置
http {


vhost_traffic_status_zone;
vhost_traffic_status_filter_by_host on;

server {

location /status {
        vhost_traffic_status_display;
        vhost_traffic_status_display_format html;

}
}

}

验证:
curl http://127.0.0.1/status
curl http://127.0.0.1/status/format/prometheus

2,prometheus.yml中增加配置

  • job_name: ‘nginx’
    metrics_path: /status/format/prometheus
    static_configs:
    • targets: [‘10.180.136.27:80’]

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


文章名称:pometheus调用nginxvts监控-创新互联
文章分享:http://myzitong.com/article/coospg.html