Tengine - sysguard

 

 


Install

sysguard

./configure --with-http_sysguard_module

Usage

server {

    # Default: sysguard off
    sysguard on;

    # sysguard_load load=number [action=/url]
    # Nginx will return 503 if there's no 'action' URL defined.
    sysguard_load load=10.5 action=/loadlimit;
    
    # sysguard_mem [swapratio=ratio%] [free=size] [action=/url]
    sysguard_mem swapratio=20% action=/swaplimit;
    sysguard_mem free=100M action=/memlimit;
    
    # period of the statistics cycle.
    sysguard_rt rt=0.01 period=5s action=/rtlimit;

    # time interval to update your system information
    # Default: 1s
    sysguard_interval 1s
    
    # If there are more than one type of monitor
    # specified the relations among all the monitors
    # Default: or
    sysguard_mode or
    
    # Default: error
    sysguard_log_level error
    
    location /loadlimit {
        return 503;
    }

    location /swaplimit {
        return 503;
    }

    location /memlimit {
        return 503;
    }

    location /rtlimit {
        return 503;
    }

}

Creative Commons license icon Creative Commons license icon