This article provides information about ApexSQL Monitor installation terms and offers a visual overview of a topography of installed components.
ApexSQL Monitor is a web-based application that will install necessary components unattended during the installation process. This article will give information about components application will install, relationship between those and what are the basic requirements needed for their smooth operation.
ApexSQL Monitor components
ApexSQL Monitor will install three components:
The ApexSQL Monitor monitoring service – a Windows-based service that collects performance data from monitored SQL Servers
The ApexSQL Monitor web server – hosts the ApexSQL Monitor web interface
The repository database – a SQL Server database that stores performance data collected from monitored SQL Servers
ApexSQL Monitor monitoring service
The ApexSQL Monitor monitoring service is a Windows-based service that collects performance data about monitored SQL Servers, stores the collected data in the repository database, but it also acts as a communication node between ApexSQL Monitor components.
When installing the ApexSQL Monitor service, a user must grant windows administrator credentials. In addition, ApexSQL Monitor service hosts the web server component, which will be described in more details below.
The monitoring service is in charge of three tasks, and this is the only component allowed to communicate directly with the monitored instance and the repository database:
Collecting data and storing in the repository database
ApexSQL Monitor will query the monitored instance according to monitoring configuration (stored in the database), collect the performance data, process those data (i.e. checking whether the value meets the alert configuration and generate the alert data), and storing the performance data in the repository database.
Handling the monitoring configuration changes received from web server
Any change of a monitoring configuration done in the web client will be forwarded via the web server to the monitoring service, which will then process the received configuration and store it in the repository database. User does not have any direct communication with the monitoring service.
Providing the necessary performance data stored in the repository database via the web server to the web client
Any request for performance data from the web server, the monitoring instance will process, retrieve required data from the repository database and send back to the web server.
ApexSQL Monitor repository database
ApexSQL Monitor repository database stores performance data collected from all monitored machines, SQL Servers, and databases. The repository database stores all monitoring configurations as well.
Depending on the number of monitored instances and activities ion those instances, the repository database can become large, so it is not recommended to host it on SQL Server Express editions due to the database size limitations imposed in these editions.
Make sure that the repository database is not installed in a critical production SQL Server instance or on a SQL Server that will be monitored as that will affect the instance performance. The ApexSQL Monitor implementation allows only the application service to communicate with the repository database, and the most important configuration data such as passwords are stored encrypted.
ApexSQL Monitor web server
The ApexSQL Monitor web server is implemented as the self-hosted Open Web Interface for .NET (OWIN)-based ASP.NET Web API, which mean that it is not a standalone web server, but rather it is running as a task of the ApexSQL Monitor service. This implementation has some advantages as it deprecates the need for an additional communication layer between the web server and service, which reduces the potential communication issues and allows faster communication between those two. The communication between the ApexSQL Monitor service and web server is at the cache level, which mean that all data exchanges are directly from the memory cache.
The Web server is allowed to communicate directly only with the ApexSQL Monitor service component, and web server cannot access the repository database or monitored instances. On the other hand, a user can communicate only with the web server, via the web client, which mean that a web client does not have any direct access to any other part of the application besides the web server.
For those concerned about the security of web server implementation, the web server internals and the way it’s working in the background will be explained.
Web server internals
The self-hosted implementation of the web server consists of two components: Web API and file server.
All ApexSQL Monitor web pages are hosted on the file system and exclusively handled by the file server.
Here it is important to point out that any such request for data, sent to the web API, requires explicit authorization. Any unauthorized request will be immediately rejected. This is an extra level of security that should prevent any malicious access to data stored in the repository database via web server.