

Search the script for "custom1" to see what I mean.įor example to add a log-event (WDE_JL_custom1) that searches the journal log for "error", just uncomment and update these lines. Below the "Event configuration" comment-line, you can add or update event parameters.įurthermore, if you add an event, you have to uncomment or add the corresponding line within the switch statement. To change or add an event, go to the init() function.

WDE_ALIVE: A helper event that invokes an URL (every 40 seconds).WDE_JL_EAREMOVED: Sends a mail when an EA script was removed or loaded.WDE_JL_FAILED: Searches the journal-log (every minute) for "failed" and mails any corresponding line. WDE_JL_REQUOTE: Searches the journal-log (every minute) for "requote" and mails any corresponding line.WDE_JL_DELETED: Searches the journal-log (every minute) for "order deleted" and mails any corresponding line.(Each event has its own event-id which is defined in the source.) Here comes a short description of all events. Log-events always expect a log file name and a search pattern. The different between events and log-events is just the parameter count. A log-event searches the given log file for a string. Basically there are two types of events, events and log-events. But it's also possible to add custom events. WatchDog comes with a lot of pre-defined events. The script is based on events each event defines a monitoring task. Only necessary if you want to use the server alive-event.

Optional: A Webspace with PHP support.Setup MetaTrader for Email notification.Set your MetaTrader installation path string BASEDIR = "C:\\Program Files\\MetaTrader4\\" In order to use this script, you have to: WatchDog sends an e-mail when things go wrong, an order has opened or closed, on requotes, on log errors, on server shut down. WatchDog is an "Expert Advisor" and "System" monitoring script.
