WatchDog is simple windows service application to monitor file changes and send email alerts in local server. Main purpose of the application is to alert Consultants & IT administrators about accidental changes in configuration files.
Installation
Pre-reqs:
- .NET Framework 4.5.2
- User with Administrator priviliges
Installation Procedure
- Create folder “Watchdog” in your local drive ex: C:\WatchDog
- Download and copy the following files under “Watchdog”
- WatchDog.exe
- WatchDog.exe.config
- FilesToWatch.cfg
- readme.txt
- Open command prompt with Administrator priviliges and navigate to “WatchDog” folder
- Type and run command WatchDog.exe install
- On successful execution, windows service “WatchDog” installed in your computer
Download Link : https://www.dropbox.com/sh/kzbg2tbpe4oe2gh/AAAjJxwwsadxpGCe2PMpYPZaa?dl=0
To uninstall
- Open command prompt with Administrator priviliges and navigate to “WatchDog” folder
- Type and run command WatchDog.exe uninstall
- On successful execution, windows service “WatchDog” is uninstalled in your computer
- Delete “WatchDog” folder from your computer
Configuration details
File : WatchDog.exe.config
- Service -> FlexiContact.serviceName : Windows service name. This should be unique value in the local server. Default value: FxWatchDog
- Service -> FlexiContact.serviceDisplayName: Windows service display name. Default value: WatchDog
- Service -> FlexiContact.serviceDescription: Windows service description. Default value: Windows Service to monitor file changes
- WatchDog.Properties.Settings -> smtp_host: SMTP Server IP address or host name
- WatchDog.Properties.Settings -> smtp_port: SMTP Server port number
- WatchDog.Properties.Settings -> smtp_userName: user name for SMTP authentication. Must be configured if “smtp_useSMTPAuthentication” set to ‘True’
- WatchDog.Properties.Settings -> smtp_userPassword: user password for SMTP authentication. Must be configured if “smtp_useSMTPAuthentication” set to ‘True’
- WatchDog.Properties.Settings -> smtp_fromAddress: From Address
- WatchDog.Properties.Settings -> smtp_toAddress: To Address. Use pipe delimiter to send email to multiple address. Ex: john@doe.com|findme@johndoe.com
- WatchDog.Properties.Settings -> smtp_enableSSL: Set to ‘True’ if SMTP Server requires SSL. Valid values: TRUE, FALSE
- WatchDog.Properties.Settings -> smtp_useSMTPAuthentication: Set to ‘True’ if SMTP Server requires authentication. Valid values: TRUE, FALSE
For changes to take effect, you need to restart application/service
File : FilesToWatch.cfg
Configure the folder and files to monitor for configuration changes. You need to configure each file in seperate row.
For example,
"C:\Temp\","*.log"
- “C:\Temp” => Folder
- “*.log” => File Pattern.
In this case, email alerts will be generated for any file with *.log extension in ‘C:\Temp’ folder.
log4net.config
WatchDog application Apache log4net library for logging. Please refer to https://logging.apache.org/log4net/release/manual/configuration.html