Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to get a notification when my server's free disk space drops below 10GB. How do I configure cfengine3 to tell me when / has less than 10GB of free space?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This question looks a lot like that question

To receive an email with cfengine 3, you need to use the cf-execd rather than the cf-agent, and define somewhere where to send the email :

body executor control
{
    mailfrom => "from@adress.org";
    mailto => "to@adress.org";
    smtpserver => "smtp.example.org";
    exec_command => "$(sys.workdir)/bin/cf-agent -f failsafe.cf && $(sys.workdir)/bin/cf-agent";
    schedule   => { "Min00_05", "Min30_35" }
}

Reference : cfengine documentation

So the daemon will send any new output from the agent to the email adress you specified.

Hope this will help

share|improve this answer
    
It is a lot like that other question. I got it to work, but it's a little confusing figuring out when it decides /not/ to send me an e-mail since it has a lock that prevents it from complaining too often about the same thing (seemingly even if I try to pass -K in cf-runagent). –  joeforker Mar 19 '10 at 20:25
1  
If you have the same output than at the previous run, then you'll receive no mail, to prevent being spammed by the daemon –  Nicolas Charles Mar 19 '10 at 20:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.