Forum: Cfengine Help
Subject: disk space monitoring
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,18152,18152#msg-18152


$ cat diskspace.cf
######################
body common control {
    bundlesequence => { "test" };
    inputs => { "cfengine_stdlib.cf" };
}

bundle common agent {
    classes:
        "all" expression => "any";
}


bundle agent test {

    storage:

        "/"     volume => min_free_space("50M");
        "/usr"  volume => min_free_space("50M");
        "/var"  volume => min_free_space("50M");
        "/home" volume => min_free_space("50M");
        "/opt"  volume => min_free_space("50M");
        "/boot" volume => min_free_space("50M");

}

$ df -m
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/mapper/vg01-lv01
                           992       409       533  44% /
/dev/mapper/vg01-lv02
                          9920      3023      6385  33% /home
/dev/mapper/vg01-lv04
                          2976      1727      1096  62% /usr
/dev/mapper/vg01-lv03
                          1984       320      1563  17% /tmp
/dev/mapper/vg01-lv06
                          4960      1091      3614  24% /opt
/dev/mapper/vg01-lv05
                          2976       805      2018  29% /var
/dev/sda1                   99        20        75  21% /boot
tmpfs                     4027         0      4027   0% /dev/shm
$ cf-agent -KIf ./diskspace.cf
 -> Filesystem /'s content seems to be sensible as promised
 -> Filesystem /usr's content seems to be sensible as promised
Filesystem /usr is mounted from a foreign system, so skipping it
 -> Filesystem /var's content seems to be sensible as promised
Filesystem /var is mounted from a foreign system, so skipping it
 -> Filesystem /home's content seems to be sensible as promised
Filesystem /home is mounted from a foreign system, so skipping it
 -> Filesystem /opt's content seems to be sensible as promised
Filesystem /opt is mounted from a foreign system, so skipping it
 -> Filesystem /boot's content seems to be sensible as promised
Filesystem /boot is mounted from a foreign system, so skipping it


These file systems are all local.  Why does CF (c3.0.5p1) report that they are 
foreign?

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to