Tengine Module Documentation: Sysguard module features

Source: Internet
Author: User
Keywords Sysguard module features module documentation
Tags .url based configure default error http server set

Ngx_http_sysguard_module

When the remaining percentage of swap, the load value to the set value, jumps to the URL specified by the action.

server {Sysguard on; sysguard_load load=1.1 action=/loadlimit sysguard_mem swapratio=90% action=/swaplimit/ Loadlimit {return 500} Location/swaplimit}

Note that this module supports the protection based on load and memory information only when the SysInfo function is supported by the system, and when the system supports LOADAVG functions based on load.

Instructions

Syntax:sysguard [on | off]
Default:sysguard off
Context:http, Server

Turn this module on or off

Syntax:sysguard_load Load=number [Action=/url]
Default:none
Context:http, Server

This directive is used to configure a user's request to be protected according to the system's load to protect the system. When the system reaches number in a minute, the incoming request is forwarded to the URL specified by the action. If the action is not configured, it returns a 503 error directly.

Syntax:sysguard_mem swapratio=ratio% [Action=/url]
Default:-
Context:http, Server

This designation is used to configure the system to be protected by restricting user requests based on the memory usage state of the system. Swapratio is used to configure the incoming request to jump to the specified URL when the ratio% of the current swap space is used. If the action is not configured, it returns a 503 error directly. In addition, configuring this designation does not work if the user has disabled the swap interval themselves.

Syntax:sysguard_interval time
Default:sysguard_interval 1s
Context:http, Server

This specifies the cache time used to configure access to system information. The default is 1s, which means that within this 1s, only one system function is invoked to get the current state of the system.

Syntax:sysguard_log_level [INFO | notice | warn | error]
Default:sysguard_log_level Error
Context:http, Server

This directive is used to configure the log level when the log is logged when the operation of the protection system is performed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.