Join the community today
Register Now

CMM Disk Alert Feature

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

  1. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:23 AM
    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

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what's output for
    Code (Text):
    df -hT
     
  3. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:23 AM
    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

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    10:23 AM
    Mainline
    10.2
    Thanks a lot Eva.
    So this is the only edit I need to apply.
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:23 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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