Nginx Plus 输入插件
此插件通过 状态模块从商业 Nginx Plus Web 服务器收集指标。
使用此插件需要许可证。
有关 Nginx (F/OSS) 和 Nginx Plus 之间差异的更多信息,请参阅 Nginx 文档。
引入于: Telegraf v1.5.0 标签: server, web 操作系统支持: all
全局配置选项
插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md。
配置
# Read Nginx Plus' advanced status information
[[inputs.nginx_plus]]
## An array of Nginx status URIs to gather stats.
urls = ["https:///status", "http+unix:///var/run/nginx.sock:/status"]
# HTTP response timeout (default: 5s)
response_timeout = "5s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = falseMetrics
- nginx_plus_processes
- respawned
- nginx_plus_connections
- accepted
- dropped
- active
- idle
- nginx_plus_ssl
- handshakes
- handshakes_failed
- session_reuses
- nginx_plus_requests
- total
- current
- nginx_plus_upstream, nginx_plus_stream_upstream
- keepalive
- zombies
- nginx_plus_upstream_peer, nginx_plus_stream_upstream_peer
- requests
- unavail
- healthchecks_checks
- header_time
- response_time
- state
- active
- downstart
- healthchecks_last_passed
- weight
- responses_1xx
- responses_2xx
- responses_3xx
- responses_4xx
- responses_5xx
- received
- selected
- healthchecks_fails
- healthchecks_unhealthy
- backup
- responses_total
- sent
- fails
- downtime
标签
nginx_plus_processes, nginx_plus_connections, nginx_plus_ssl, nginx_plus_requests
- 服务器
- port
nginx_plus_upstream, nginx_plus_stream_upstream
- upstream
- 服务器
- port
nginx_plus_upstream_peer, nginx_plus_stream_upstream_peer
- id
- upstream
- 服务器
- port
- upstream_address
示例输出
使用此配置
[[inputs.nginx_plus]]
## An array of Nginx Plus status URIs to gather stats.
urls = ["https:///status"]运行时
./telegraf -config telegraf.conf -input-filter nginx_plus -test它会生成
* Plugin: inputs.nginx_plus, Collection 1
> nginx_plus_processes,server=localhost,port=12021,host=word.local respawned=0i 1505782513000000000
> nginx_plus_connections,server=localhost,port=12021,host=word.local accepted=5535735212i,dropped=10140186i,active=9541i,idle=67540i 1505782513000000000
> nginx_plus_ssl,server=localhost,port=12021,host=word.local handshakes=0i,handshakes_failed=0i,session_reuses=0i 1505782513000000000
> nginx_plus_requests,server=localhost,port=12021,host=word.local total=186780541173i,current=9037i 1505782513000000000
> nginx_plus_upstream,port=12021,host=word.local,upstream=dataserver80,server=localhost keepalive=0i,zombies=0i 1505782513000000000
> nginx_plus_upstream_peer,upstream=dataserver80,upstream_address=10.10.102.181:80,id=0,server=localhost,port=12021,host=word.local sent=53806910399i,received=7516943964i,fails=207i,downtime=2325979i,selected=1505782512000i,backup=false,active=6i,responses_4xx=6935i,header_time=80i,response_time=80i,healthchecks_last_passed=true,responses_1xx=0i,responses_2xx=36299890i,responses_5xx=360450i,responses_total=36667275i,unavail=154i,downstart=0i,state="up",requests=36673741i,responses_3xx=0i,healthchecks_unhealthy=5i,weight=1i,healthchecks_checks=177209i,healthchecks_fails=29i 1505782513000000000
> nginx_plus_stream_upstream,server=localhost,port=12021,host=word.local,upstream=dataserver443 zombies=0i 1505782513000000000
> nginx_plus_stream_upstream_peer,server=localhost,upstream_address=10.10.102.181:443,id=0,port=12021,host=word.local,upstream=dataserver443 active=1i,healthchecks_unhealthy=1i,weight=1i,unavail=0i,connect_time=24i,first_byte_time=78i,healthchecks_last_passed=true,state="up",sent=4457713140i,received=698065272i,fails=0i,healthchecks_checks=178421i,downstart=0i,selected=1505782512000i,response_time=5156i,backup=false,connections=56251i,healthchecks_fails=20i,downtime=391017i 1505782513000000000参考资料
后续版本的状态响应结构可在以下链接找到
此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 Telegraf 和本文档提出反馈和 bug 报告。要获取支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。