-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

<config>
  <guard email="root@localhost" name="IWatch"/>
  <watchlist>
    <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>**
  </watchlist>
</config>

/etc/default/iwatch

## iwatch configuration file

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

# CONFIG_FILE:
#   configuration file for iwatch daemon
#
CONFIG_FILE=/etc/iwatch/iwatch.xml

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

link|improve this question

50% accept rate
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 backup.sh 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
1  
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
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.