Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Zabbix monitors Nginx status     - Nginx logging client ip (Server)

- To compile install and test Swift under Linux (Linux)

- Nginx Beginner Guide (Server)

- Node.js v4.0.0 installation configuration on Ubuntu 14.04 / 15.04 (Linux)

- Use PXE with kickstart to install Linux automatically (Linux)

- Linux operating system log system (Linux)

- Linux rpm command Detailed (Linux)

- jQuery update the content and method of use 3.0 (Programming)

- Elaborate .NET Multithreading: Concepts (Programming)

- How to install Laravel PHP framework on CentOS 7 / Ubuntu 15.04 (Server)

- MySQL TIMESTAMP and DATETIME (Database)

- CentOS 7 Test Marathon start Docker container (Server)

- Varnish configuration language VCL and its built-in variables (Server)

- Python control multi-process and multi-threaded concurrency (Programming)

- Installation on the way to the root source Ubuntu Server 14.04 LTS version Odoo8.0 (Server)

- TypeScript basic grammar (Programming)

- Configuring Haproxy log support (syslog logging support) (Server)

- How to install new fonts on Ubuntu 14.04 and 14.10 (Linux)

- iOS GCD multithreading simple to use (Programming)

- VPS xen openvz kvm (Server)

 
         
  Zabbix monitors Nginx status
     
  Add Date : 2017-08-31      
         
         
         
  Today's Web site traffic suddenly increased, monitoring the alarm is my room bandwidth all ran full, and finally the hardware firewall policy changes before returning to normal. Then the person in charge to the site on the nginx, and the bandwidth of the state, so I thought to do this, mainly Zabbix monitoring some of the link state nginx:

1, first open the nginx_status module monitoring functions:
 Server {
        Listen 8067;
        Server_name localhost;
        Root html;
        Index index.html;
        Access_log off;
        Location / status {
          Stub_status on;
        }}
}}

2, the test:
[Root @ WEB_007 vhosts] # curl http://192.168.10.7:8067/status
Active connections: 3
Server accepts handled requests
 1305214152 1305214152 1305204005
Reading: 0 Writing: 3 Waiting: 0

3, the preparation of script filtering data: (zabbix main data will be able to figure):
[Root @ WEB_007 vhosts] # cat / usr / local / zabbix / scripts / nginx_status
#! / Bin / bash
# Script to fetch nginx statuses for tribily monitoring systems
# Author: xiaoluo
# License: GPLv2
  
Function active {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | grep 'Active' | awk '{print $ NF}'
}}
Function reading {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | grep 'Reading' | awk '{print $ 2}'
}}
Function writing {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | grep 'Writing' | awk '{print $ 4}'
}}
Function waiting {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | grep 'Waiting' | awk '{print $ 6}'
}}
Function accepts {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | awk NR == 3 | awk '{print $ 1}'
}}
Function handled {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | awk NR == 3 | awk '{print $ 2}'
}}
Function requests {
/ Usr / bin / curl "http://192.168.10.7:8067/status" 2> / dev / null | awk NR == 3 | awk '{print $ 3}'
}}
# Run the requested function
$ 1

4, open the zabbix scripting function, I am now accustomed to the implementation of the key, on another path, after the file a good distinction, we should also recommend doing so:
[Root @ WEB_007 zabbix_agentd.conf.d] # vi /usr/local/zabbix/etc/zabbix_agentd.conf
UnsafeUserParameters = 1
Include = / usr / local / zabbix / etc / zabbix_agentd.conf.d /
[Root @ WEB_007 zabbix_agentd.conf.d] #cd /usr/local/zabbix/etc/zabbix_agentd.conf.d/
[Root @ WEB_007 zabbix_agentd.conf.d] #vi nginx
#monitor nginx
UserParameter = nginx [*], / usr / local / zabbix / scripts / nginx_status $ 1

5, import templates: modules in my annex can be downloaded:
Here demo, at the time I made the first time, so forget to add graphics, and we can add their own graphics based on the template, there is no trigger I have not created, we need to create their own

Summary: zabbix can be very good application to monitor, is still very strong, and slowly study
     
         
         
         
  More:      
 
- A list of the basics of Python, Ganso, Dictionary (Programming)
- Ubuntu is expected to allow you to install the latest Nvidia Linux drivers easier (Linux)
- Linux operating system buffer overflow attacks Countermeasures (Linux)
- Boost notes --Thread - problems encountered in the initial use on Ubuntu (Programming)
- Hadoop new and old version of the difference in the size of the InputSplit (Server)
- Linux Network Programming - raw socket instance: MAC Address Scanner (Programming)
- Ubuntu security settings and tools (Linux)
- Linux settings Java_home (Linux)
- VMware clone Linux find eth0 (Linux)
- RedHat virtual machine to install VMware Tools (Linux)
- Compare several ways to transfer files between Linux hosts (Linux)
- Ubuntu 14.04 and derivative versions of the user install Pantheon Photos 0.1 (Linux)
- Math objects easily overlooked but very convenient method --JavaScript (Programming)
- Running the open-source Swift under Linux platform (Linux)
- CentOS 6.5 dual card configuration, one of the external network, a local area network connection (Linux)
- Oracle 10g after the failure to start the upgrade (Oracle instance terminated. Disconnection forced) (Database)
- To install Samba server on CentOS 6.6 (Server)
- Ubuntu How to mount iso file (Linux)
- Method under Linux GCC Compiler shared library function export control (Programming)
- Build your own Web server under Ubuntu Linux system (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.