prometheus监控端口

DevOps Prometheus评论1,868字数 104阅读0分20秒阅读模式

修改prometheus配置

[root@devops-prometheus ~]# vim /usr/local/prometheus/prometheus.yml 
  - job_name: 'alarm-http-port_status'
    metrics_path: /probe
    params:
      module: [tcp_connect]
    static_configs:
      - targets: ['172.24.10.195:28851', '172.24.10.196:28851']
        labels:
          instance: 'port_status'
          group: 'port'
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - target_label: __address__
        replacement: 10.1.0.157:9115

检查配置文件

[root@devops-prometheus ~]# cd /usr/local/prometheus/
[root@devops-prometheus prometheus]#  ./promtool check config prometheus.yml
Checking prometheus.yml
  SUCCESS: 1 rule files found
 SUCCESS: prometheus.yml is valid prometheus config file syntax

Checking first_rules.yml
  SUCCESS: 1 rules found

[root@devops-prometheus prometheus]# systemctl restart prometheus

 

 
DevOps
  • 本文由 DevOps 发表于 2022年11月30日 14:44:27
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Prometheus监控mysql Prometheus

Prometheus监控mysql

简述 mysql_exporter是用来收集MysQL或者Mariadb数据库相关指标的,mysql_exporter需要连接到数据库并有相关权限。 创建用户并授权 root@bjzhanjiserv...
Prometheus监控redis Prometheus

Prometheus监控redis

简述 redis_exporter prometheus官方开源的专门监控Redis的插件工具,我们直接使用就可以。 更多资料介绍点我 安装配置redis_exporter [root@devops ...
Prometheus监控kafka Prometheus

Prometheus监控kafka

前言 Kafka现有开源的集群监控方案:kafka-manager、kafka-monitor、kafka-eagle、KafkaOffsetMonitor,但有所限制监控指标被固化,不易扩展、预警功...
Prometheus Prometheus

Prometheus

版本 CentOS Linux release 7.9 Prometheus:prometheus-2.52.0.linux-amd64 Alertmanager:alertmanager-0.27....

发表评论