Learn about Centmin Mod LEMP Stack today
Become a Member

Master Branch add /etc/csf/load.sh script for additional server stats

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 19, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    58,892
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    8:23 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    add /etc/csf/load.sh script for additional server stats

    - When csf firewall's lfd daemon detects & triggers a high cpu load alert (over 15 min interval) defined in /etc/csf/csf.conf config file with related PT_LOAD variables, it usually sends an lfd email alert. CSF Firewall can also be configured via PT_LOAD_ACTION setting to run a custom script i.e. /etc/csf/load.sh when high cpu alert is triggered. This update configures a custom /etc/csf/load.sh script on Centmin Mod 123.09beta01 and newer versions which will call cminfo top and netstat commands outlined at https://community.centminmod.com/threads/update-cminfo-cmd-with-top-related-server-statistics.14597/ and https://community.centminmod.com/threads/update-cminfo-command-with-netstat-flag-option.14468/ and send a 2nd high cpu alert email to the email address defined in LF_ALERT_TO in /etc/csf/csf.conf if the email in LF_ALERT_TO is empty it sends email to root system user's inbox.
    - Also previously the PT_LOAD_LEVEL was hardcoded to value of 8 in /etc/csf/csf.conf, but on this update it will be changed to the value equal to number of cpu threads detected on the server which is a more accurate value to monitor and alert for.


    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.