Guest User

Untitled

a guest
Mar 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. http://127.0.0.1/nginx_status
  2.  
  3. server {
  4. listen 127.0.0.1;
  5. server_name localhost;
  6. location /nginx_status {
  7. stub_status on;
  8. access_log off;
  9. allow 127.0.0.1;
  10. deny all;
  11. }
  12. }
  13.  
  14. munindoc nginx_request
  15.  
  16. cd /etc/munin/plugins
  17. munin-run PLUGINNAME
  18.  
  19. grep '/' PLUGINNAME
  20.  
  21. [nginx*]
  22. env.url http://localhost/nginx_status
  23.  
  24. nginx_status
  25.  
  26. nginx-status
  27.  
  28. nginx -V 2>&1 | grep -o with-http_stub_status_module
  29.  
  30. with-http_stub_status_module
  31.  
  32. wget http://localhost/nginx_status
  33.  
  34. location /nginx_status {
  35. stub_status on;
  36. access_log off;
  37. error_log /var/log/nginx/status.error.log;
  38. allow 127.0.0.1;
  39. deny all;
  40. }
  41.  
  42. [error] 2203#0: *1442 access forbidden by rule, client: ::1, server: localhost, request: "GET /nginx_status HTTP/1.1", host: "localhost"
  43.  
  44. server {
  45. listen 80;
  46. listen [::]:80;
  47. server_name localhost;
  48.  
  49. location /nginx_status {
  50. stub_status on;
  51. access_log off;
  52. allow 127.0.0.1;
  53. allow ::1;
  54. deny all;
  55. }
  56. }
  57.  
  58. munin-run nginx_status
  59.  
  60. apt install libwww-perl
  61.  
  62. yum install perl-libwww-perl
  63.  
  64. total.value 1
  65. reading.value 0
  66. writing.value 1
  67. waiting.value 0
Add Comment
Please, Sign In to add comment