IntraWeb 15.3.11 brings another new great feature to IntraWeb developers: The brand new IntraWeb Server Monitor (or, as I call it, IWServerMonitor).
IntraWeb server monitor is an independent module – that runs as a Windows Service – that is installed on the same server where you install your IntraWeb applications. The IWServerMonitor collects and dispatches real time information about all the IntraWeb applications that are installed and running on that same machine.
Here is how it works:
Each installed IntraWeb application sends live information to the IWServerMonitor that is collected and dispatched to one or more communication channels. Available channels at the moment are Discord, Telegram and Email. Also, IWServerMonitor collects all logs generated by each application, as they happen, and sends them through the same channels.
IWServerMonitor can be easily configured through a simple .INI file. Individual applications and channels can be switched on/off.
You also configure your IntraWeb application to send live data periodically to IWServerMonitor using a simple property ServerMonitorOptions, that you find in the ServerController:
You can enable/disable it setting the Enabled property and you can specify the interval in minutes when the application will notify the ServerMonitor and send specific information, such as: Session count, number of requests responded, total bytes transmitted, memory used by the application, and more. Sending of the notification to the server monitor occurs in a background thread using a very lightweight communication channel, and has virtually no impact on your application overall performance.
This is an exemple of the IWServerMonitor notification received by a registered Discord channel:
When ServerController.ServerMonitorOptions.Enabled is False, the IntraWeb application will not send live health data (as shown above) to the IWServerMonitor, however, the monitor can still be configured to collect and send the exception logs from that application.
IWServerMonitor must be installed as any other service created with Delphi, running the command line IWServerMonitor /install:
By default it is configured to start automatically when the machine starts.
In order to configure IWServerMonitor functionality, download it from here (zip file, no setup program): IWServerMonitor download
Unzip the file to any folder and install it as described above. Before starting it, you must configure its communication channels: Open the sample IWServerMonitor.ini file and see how it works. Comments in that file should be clear and simple enough.
Every time you change the configuration, the service should be restarted so the changes will take effect.
A final note: Due to security restrictions found in common email services (such as Google, Microsoft and others), sometimes it is not possible to directly send emails to these services using simple authentication based on user name/password. In some cases there is not much we can do. We recommend that you only configure email services that allow password authentication, or use the other channels instead.