Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

-edit- I had no luck installing opsview and i tried nagios. I'm using nagios instead and it appears to be good.

I installed iwatch and have sendmail working (cron jobs are emailed to me). I enabled deamon mode for iwatch and restarted iwatch. I see the deamon running with ps aux.

When I change one of the files in /var/www/mysite I get no email and I dont see anything happening. I checked using the mail cmd in case it went there. I did add the directory (its recursive but the file i modified wasn't in a subdir) and restarted the daemon after modification.

How do I get iwatch to watch and email me?

iwatch.xml. ** around the line I added

  <guard email="root@localhost" name="IWatch"/>
    <title>Operating System</title>
    <contactpoint email="root@localhost" name="Administrator"/>
    <path type="single" syslog="on">/bin</path>
    <path type="single" syslog="on">/sbin</path>
    <path type="single">/etc</path>
    <path type="recursive">/lib</path>
    <path type="exception">/lib/modules</path>

    **<path type="recursive">/var/www/fmyapp</path>**


## iwatch configuration file

#   should iwatch start the iwatch daemon during boot?
START_DAEMON=**true** (from false)

#   configuration file for iwatch daemon

I havent changed anything from the default or add a cronjob or anything

share|improve this question
You probably need to show some details regarding your crontab entry and your iwatch entry. – Dennis Williamson Sep 29 '10 at 0:32
@Dennis Williamson: Supposedly iwatch does it automatically (via sendmail) and cron i left everything to the default and added ONE line to execute my script. I didnt realize it would send me mail after i configured ssmtp. – acidzombie24 Sep 29 '10 at 3:19
But you have to configure iwatch to tell it what to watch. You say you added the directory. I'm saying it might be helpful to show your config file, cron entry and possibly the contents of your script. Otherwise, it's only guesswork. – Dennis Williamson Sep 29 '10 at 4:20
@Dennis Williamson: Oh! now i understand what your saying. I havent added a cron job for iwatch. I see the deamon running and iwatch site says it watches the directory for changes (through inotify i believe) and automatically informs you the moment it changes. Outside of adding a line for the backup script months ago i havent done anything with cron. Really i am just working with default configs. – acidzombie24 Sep 29 '10 at 5:34
Once -- but only once -- I've seen a situation where a previously working incron suddenly stopped working after a longish uptime. In that case only a reboot solved the problem. You might first try to add 'syslog="on"' to your path declaration to see if it's a problem with sendmail or iwatch. If no log entries happen and this is a server you can freely reboot, try rebooting. Sorry if this sounds a bit like Windows administration. :-) – Janne Pikkarainen Sep 29 '10 at 7:06

In Ubuntu 12.04 there is an error in /etc/default/iwatch, the variable iwatch is actually looking for is CONFIGFILE and not CONFIG_FILE so point it to your custome config with

share|improve this answer

Firstly if you don't want it to email your local system then change:

<contactpoint email="root@localhost" name="Administrator"/>


<contactpoint email="" name="Administrator"/>

If you are ok with that then the next step is check to see if it is running

ps aux | grep iwatch

Then start it with the service command, ie

service iwatch start

Check if it is running again

ps aux | grep iwatch

Now test it out by running

touch /etc/test

And you should get an email, good luck!

Here is a good example of a configuration file

share|improve this answer

Your Answer


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.