项目作者: DaemonMonch

项目描述 :
prometheus tcp端口监控
高级语言: Kotlin
项目地址: git://github.com/DaemonMonch/port_exporter.git
创建时间: 2018-09-18T09:08:45Z
项目社区:https://github.com/DaemonMonch/port_exporter

开源协议:

下载


port exporter

  1. prometheus tcp 端口监控 exporter.用来检查目标端口是否正常打开及建立连接

required:

  • jdk 1.8+

build:

gradlew shadowJar

run :

java -jar {buildName}.jar -c [config_path]

exporter url: http://localhost:9333/metrics

配置文件格式(yml):

  1. checkInterval: 30000 #端口检查 间隔 单位 ms 默认10秒
  2. host: 0.0.0.0
  3. port: 9333
  4. targets: #检查端口列表
  5. -
  6. name: name1 名称
  7. addr: localhost:8080
  8. -
  9. name: name2 名称
  10. addr: localhost:8080

A configuration reload is triggered by sending a SIGHUP to the process

metrics

port_status
  • 值大于0 表示该端口 监听正常