Learn about Centmin Mod LEMP Stack today
Become a Member

CMM Disk Alert Feature

Discussion in 'Other Centmin Mod Installed software' started by rdan, Jan 27, 2022.

  1. rdan

    rdan Well-Known Member

    5,371
    1,353
    113
    May 25, 2014
    Ratings:
    +2,112
    Local Time:
    9:05 PM
    Mainline
    10.2
    I use SNAP for some extra services I run on CentOS.
    Now Disk Alert flagged down Snap folders/partition.

    How can I exclude this locations?
    Thanks.

     
  2. eva2000

    eva2000 Administrator Staff Member

    49,588
    11,382
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,686
    Local Time:
    11:05 PM
    Nginx 1.21.x
    MariaDB 10.x
    what's output for
    Code (Text):
    df -hT
     
  3. rdan

    rdan Well-Known Member

    5,371
    1,353
    113
    May 25, 2014
    Ratings:
    +2,112
    Local Time:
    9:05 PM
    Mainline
    10.2
    Code:
    Filesystem     Type      Size  Used Avail Use% Mounted on
    devtmpfs       devtmpfs   32G     0   32G   0% /dev
    tmpfs          tmpfs      32G     0   32G   0% /dev/shm
    tmpfs          tmpfs      32G  1.1M   32G   1% /run
    tmpfs          tmpfs      32G     0   32G   0% /sys/fs/cgroup
    /dev/md2       xfs       920G  200G  720G  22% /
    tmpfs          tmpfs      32G   44K   32G   1% /tmp
    /dev/loop0     squashfs  111M  111M     0 100% /var/lib/snapd/snap/core/12603
    /dev/loop1     squashfs   44M   44M     0 100% /var/lib/snapd/snap/certbot/1670
    /dev/loop2     squashfs   62M   62M     0 100% /var/lib/snapd/snap/core20/1270
    /dev/md1       ext3      989M  223M  716M  24% /boot
    tmpfs          tmpfs     6.3G     0  6.3G   0% /run/user/0
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,588
    11,382
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,686
    Local Time:
    11:05 PM
    Nginx 1.21.x
    MariaDB 10.x
    In persistent config file at /etc/centminmod/custom_config.inc add snapd to an exclusion variable that diskalert cronjob will pickup
    Code (Text):
    DISKALERTEXCLUDE_LIST='snapd'
    

    If you need to exclude other df -hT listed keyword matches add to the exclusion variable with a | separator i.e.
    Code (Text):
    DISKALERTEXCLUDE_LIST='snapd|keyword1|keyword2'
    


    from diskalert cronjob at /etc/cron.daily/diskalert mentions the use of DISKALERTEXCLUDE_LIST
    Code (Text):
    ############################################################################################
    # Set admin email so that you can get email.
    EMAIL=''
    # set alert level 90% is default
    DISKSPACE_ALERTPERCENTAGE='80'
    # Exclude list of unwanted monitoring, if several partions then use "|" to separate the partitions.
    # An example: DISKALERTEXCLUDE_LIST="/dev/hdd1|/dev/hdc5"
    DISKALERTEXCLUDE_LIST="/auto/ripper"
    ############################################################################################
    
     
  5. rdan

    rdan Well-Known Member

    5,371
    1,353
    113
    May 25, 2014
    Ratings:
    +2,112
    Local Time:
    9:05 PM
    Mainline
    10.2
    Thanks a lot Eva.
    So this is the only edit I need to apply.
     
  6. eva2000

    eva2000 Administrator Staff Member

    49,588
    11,382
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,686
    Local Time:
    11:05 PM
    Nginx 1.21.x
    MariaDB 10.x
    Should be, you can manually run the diskalert script to trigger it at /etc/cron.daily/diskalert to see if it ignores the keyword snapd