WSO2 provides a comprehensive monitoring tool (Carbon Monitoring Tool) for monitoring the deployment of WSO2 products. You can run this tool as a web application and execute various monitoring tasks on your product servers. The diagram given below illustrates how deployment monitoring works.The concepts and elements of deployment monitoring are also described.
- To get started with deployment monitoring, see Monitoring Product Deployment.
- To use the tool from the command line instead of using the web application, see Using the Command Line.
- Configuring the Carbon Monitoring Tool is as simple as updating the deployment-monitor
.yamlfile in the tool's distribution. See Configuring the Carbon Monitoring Tool for information on how to configure the tool according to your deployment scenario.
See the following topics for more information:
The configurations in the monitoring tool should be updated with the details of the server groups that it is required to monitor. Server groups contain all the WSO2 product instances in your deployment. One server group may denote one individual server (as in the case of the WSO2 Identity Server group shown above), or it may be a cluster of multiple product servers (as in the case of the WSO2 ESB and WSO2 AS server groups shown above). See Deployment and Clustering for more information on how to define product clusters.
To add new server groups or configure server information, see Updating Server Groups.
The tool works by running tasks that are configured to monitor a specific aspect of deployment. The monitoring tool is shipped with default tasks that are configured to monitor specific areas such as patch verification and deployment synchronization.
|Server Info||Server information from all the connected servers will be checked.|
|Patch Verification||This task checks the details of patches that are installed in the servers that a being monitored. In a typical deployment, all the server instances of the same product should have the same patches installed.|
|Deployment Synchronizer Test||This task verifies whether or not the deployment synchronizer is working.|
|WUM Updates||This task verifies the updates that have been applied to the servers using WUM (WSO2 update manager).|
|Tenant Login||When this task is executed, the tool will log in to the super tenant of the servers to verify the tenant details.|
|Ping||When this task is executed, the tool connects to the servers to verify the connection.|
|AnalyticsDB Query||This task can be used to connect to WSO2 DAS instances in your product deployment in order to verify if the latest details from products are published to DAS.|
Additionally, you have the option of defining custom tasks, which is as simple as implementing a Java interface, dropping the JAR into the tool's distribution directory and applying a minor update to one configuration file as explained below. Any of the monitoring tasks can also be scheduled so that they are executed periodically. By default, the tool is configured to run the default tasks every 60 seconds when scheduled mode is enabled.
For information on adding custom tasks or configuring an existing task, see Updating Tasks.
You can also set up notifications so that the operations team can be informed of task results through various channels (email, SMS etc.). By default, the deployment tool can be configured to send notifications through email and SMS (Clickatell and bulkSMS SMS providers are supported by default) channels. Additionally, you can write your custom tasks with the ability to send notifications through other channels. If a monitoring task results in an error, the tool can be configured to send notifications across multiple channels.
For information on configuring notifications, see Updating notifications.
The Carbon Monitoring Tool accesses the server groups through a monitoring agent. This agent, which is shipped with the WSO2 Carbon Monitoring Tool (
wso2-monitor-agent-x.x.x.jar file), needs to be installed in each server that is being monitored. See the example in Monitoring Product Deployment for instructions.
The monitoring tool connects to a product server using a username and password that is set up for the super tenant of the product server. This user should be granted certain user permissions in the WSO2 server, in order to access the monitoring agent. Since this monitoring agent divulges information such as patch details, the required permission should be at the super-admin level. For example, if the Carbon Monitoring Tool accesses the server with a user called 'MonitoringUser', this user should be granted deployment monitoring permissions. The following diagram illustrates the DeploymentMonitor permission. See Managing Users, Roles and Permissions for instructions on editing permissions.
Note that by default, the Carbon Monitoring Tool connects to a WSO2 server from the default admin user, which will have the DeploymentMonitor permission granted by default (when the monitoring agent is installed in the server). To change the default settings for connecting from the Carbon Monitoring Tool to the WSO2 servers, see Updating the Global Configurations.