差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
| tech:librenms:nginx_agent [2020/07/05 17:35] – jonathan_tsai | tech:librenms:nginx_agent [2021/01/16 14:41] (目前版本) – 更換 plugin jonathan | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== 安裝 Nginx Agent 的方式 ====== | ||
| + | * 返回 [[tech: | ||
| + | * 這是 SNMP Extend | ||
| + | |||
| + | * 設定啟動 Nginx 的狀態頁面< | ||
| + | vi / | ||
| + | </ | ||
| + | : | ||
| + | location / | ||
| + | stub_status on; | ||
| + | access_log | ||
| + | allow 127.0.0.1; | ||
| + | allow ::1; | ||
| + | deny all; | ||
| + | } | ||
| + | : | ||
| + | </ | ||
| + | systemctl restart nginx | ||
| + | </ | ||
| + | * 檢查讀取 nginx 狀態頁面< | ||
| + | curl http:// | ||
| + | Active connections: | ||
| + | server accepts handled requests | ||
| + | 10 10 10 | ||
| + | Reading: 0 Writing: 1 Waiting: 7 | ||
| + | </ | ||
| + | * 至 Nginx 主機內安裝 <code sh> | ||
| + | wget https:// | ||
| + | chmod +x / | ||
| + | </ | ||
| + | * 確認 nginx可以正確執行< | ||
| + | / | ||
| + | 10 | ||
| + | 0 | ||
| + | 1 | ||
| + | 9 | ||
| + | 38 | ||
| + | </ | ||
| + | * 修改 snmpd 設定< | ||
| + | vi / | ||
| + | : | ||
| + | extend nginx / | ||
| + | </ | ||
| + | systemctl restart snmpd | ||
| + | </ | ||
| + | |||
| + | ===== 參考網址 ===== | ||
| + | * https:// | ||
| + | |||
| + | {{tag> | ||