Tengine 配置

  1. 在http 段下新增以下配置

     req_status_zone server_stat "$host" 3M;
     server {
         listen 9008;
         location /6bb3f4c96b88d2daeeac8a8f6780b108 {
             return 200 "tengine_req_status_identity";
         }
         location /us {
             allow 127.0.0.1;
             deny all;
             req_status_show;
         }
         req_status server_stat;
     }
    
  2. 在每个 server 段下新增(通过include方式实现复用):

    req_status server_stat;

  3. 测试

    curl http://localhost:9008/us

zabbix 监控配置

  1. 在 /usr/local/zabbix327/bin 新增文件lld_tengine.py,并添加可执行权限

  2. 新增UserParameter

    UserParameter=tengine.server.discovery[],/usr/local/zabbix327/bin/lld_tengine.py -t $1 -k "$2"
    UserParameter=tengine.server.stat[
    ],/usr/local/zabbix327/bin/lld_tengine.py -t $1 -d $2 -p $3 -e $4

  3. 导入模板

相关文章:

  • 2021-09-26
  • 2021-05-07
猜你喜欢
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-09-14
相关资源
相似解决方案