This section covers how The Status Dashboard of WSO2 SP allows you to monitor the metrics of a stand-alone WSO2 SP instance or a WSO2 SP cluster. This involves monitoring whether all processes of the WSO2 SP setup are working in a healthy manner,monitoring the current status of a SP node, and viewing metrics relating to the history of a node or the cluster. Both JVM level metrics or Siddhi application level metrics can be viewed from the monitoring dashboard.
Table of Contents |
---|
maxLevel | 2 |
---|
minLevel | 2The following sections cover how to configure the Status Dashboard and analyze statistics relating to your WSO2 SP deployment in it. Child pages (Children Display) |
---|
Excerpt |
---|
|
PrerequisitesIn order to configure the Status Dashboard all worker node should have unique carbon ID. Other than that the following prerequisites must be completed. Setting up the databaseTo work monitoring dashboard you need to have shared metrics |
...
database for all your nodes for store metrics of the nodes and carbon metrics use carbon ID as source ID for all yor worker need to have unique carbon ID under the <SP_HOME>/conf/worker/deployment.yml wso2.carbon:
# value to uniquely identify a server
id: wso2-sp # server name
name: WSO2 Stream Processor # ports used by this server
Monitoring |
...
dashboard is supported only H2, MySQL, MSSQL and Oracle databases |
...
. If you wish to continue H2 database you can ignore this step. |
...
Set up a database by following the |
...
...
...
- database driver.
- Unzip the downloaded driver zipped archive, and copy the database driver JAR (
xxx.jar ) into the <SP_HOME>/lib directory of all the nodes in the cluster. - Create 2
|
...
- databases for storing metrics details (Ex. wso2_metrics) and dashboard details(Ex. monitoring).
- Populate the metrics tables using the corresponding script which
|
...
- matches to your database type which is in the <SP_HOME>/wso2/dashboard/dbscripts.
Edit carbon datasorce configuration in both <SP_HOME>/conf/worker/deployment.yml and <SP_HOME>/conf/dashboard/deployment.yml based on your database types.
|
...
Datasource | Dashboard Datasource |
---|
MySQL | - name: WSO2_METRICS_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/WSO2MetricsDB |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
'jdbc:mysql://localhost/wso2_metrics?useSSL=false'
username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false | - name: WSO2_STATUS_DASHBOARD_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/wso2_status_dashboard useJndiReference: true definition:
type: RDBMS configuration:
jdbcUrl:
'jdbc:mysql://localhost/monitorng?useSSL=false'
username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false | MSSQL | - name: WSO2_METRICS_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/WSO2MetricsDB definition:
type: RDBMS configuration:
jdbcUrl:
'jdbc:sqlserver://localhost;databaseName=wso2_metrics'
username: root password: root driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false | - name: WSO2_STATUS_DASHBOARD_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/wso2_status_dashboard useJndiReference: true definition:
type: RDBMS configuration:
jdbcUrl:
'jdbc: |
|
...
...
;databaseName=monitoring'
username: root password: root driverClassName: com.microsoft. |
|
...
...
SQLServerDriver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false |
|
...
Oracle | - name: WSO2_METRICS_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/WSO2MetricsDB definition:
type: RDBMS configuration |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
'jdbc:oracle:thin:@localhost:1521/xe'
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
username: root password: root driverClassName: |
|
...
...
...
...
OracleDriver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false |
|
...
...
DASHBOARD_DB description: The datasource used for dashboard feature jndiConfig:
name: jdbc/ |
|
...
wso2_status_dashboard useJndiReference: true definition:
type: RDBMS configuration: |
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
'jdbc:oracle:thin:@localhost:1521/xe'
|
|
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
username: root password: root driverClassName: oracle.jdbc.driver.OracleDriver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false |
Please refere for more details https://github.com/wso2/carbon-datasources/ If you are changing name of datasorces which is default names WSO2_STATUS_DASHBOARD_DB and WSO2_METRICS_DB then you have to map them in the deployment.yml under wso2.status.dashboard namespace which is in the <SP_HOME>/conf/dashboard/deployment.
|
...
yml wso2.status.dashboard:
metricsDatasourceName:
'WSO2_METRICS_DB'
dashboardDatasourceName:
'WSO2_STATUS_DASHBOARD_DB'
Configuring metricsConfiguring worker metricsTo enable metrics and to configure metric-related properties, do the following configurations in the <SP_HOME>/conf/worker/deployment.yaml |
...
file for the required nodes. - To enable Carbon metrics, set the
enabled
|
...
...
- under
wso2.metrics . Under wso2.metrics.jdbc , configure the following properties to operate the JDBC reporters. Parameter | Default Value | Description |
---|
dataSource | &JDBC01 |
| dataSource > dataSourceName | java:comp/env/jdbc/WSO2MetricsDB | The name of the datasource used to store metric data. | dataSource > scheduledCleanup > enabled | false | If this is set to true , metrics data stored in the database is cleared at a specific time interval as scheduled. | dataSource > scheduledCleanup > daysToKeep | 7 | If scheduled clean-up |
|
...
of metric data is enabled, all metric data in the database that |
|
...
are older than the number of days specified in this parameter are deleted. | dataSource > scheduledCleanup > scheduledCleanupPeriod | 86400 | This parameter specifies the time interval in seconds at which all metric data stored in the database must be cleared. |
- Some JVM metrics are not enable by default. They have to enable by putting levels configuration under wso2.metrics namespace as below.
wso2.metrics: # Enable Metrics enabled: true jmx:
|
...
# Register MBean when initializing Metrics
|
...
...
...
name: org.wso2.carbon:type=Metrics
|
...
# Metrics Levels are organized from most specific to least:
|
...
# OFF (most specific, no metrics)
|
...
...
...
# TRACE (least specific, a lot of data)
|
...
# ALL (least specific, all data) levels:
|
...
# The root level configured for Metrics
|
...
...
...
levels: jvm.buffers: 'OFF' jvm.class-loading: INFO jvm.gc: DEBUG jvm.memory: INFO Following are the default merics levels.
|
...
...
the following annotation to each siddhi app under appName.
@App:name('TestMetrics') @app:statistics(reporter = 'jdbc')
define stream TestStream (message string);
|
...
measured and all the metrics levels are INFO. Property | Default Level after enabling metrics | Components | Latency | INFO | Windows(per window.find and window.add),Mapper((per sink mapper, source mapper),Query(per query),Table(per table insert, find, update, updateOrInsert, delete, contains ) | Throughput | Triggers(per stream, trigger),Windows(per window.find and window.add),Source(per source),Sink(per source),Streams(per stream),Table(per table insert, find, update, updateOrInsert, delete, contains ), | Memory | Query(per query) | Buffered Events Count |
| No. of events at disruptor | Streams(per stream) | No. of events produced/Received after restart | ource(per source),Sink(per source) |
Configuring Cluster Credentials.For accessing each node in the cluster you need to maintain share username and passwaord among cluster and shold include this username and password under <SP_HOME>/conf/dashboard/deployment.yml. For secure purpose you can use wso2 securevault for encrypt passwords. Please no that this is currently support single tenent. wso2.status.dashboard:
workerAccessCredentials:
username:
'admin'
password:
'admin'
How to use wso2 securevault:
Configuring Roles.There are three permission levels in the Stream Processor monitoring application as follows, - SysAdmin : Grants system administration permission including enabling/disabling metrics in workers and view/add/delete workers
- Developers: Grants permission to view/add/delete workers in the dashboard
- Viewers: Grant permission to view works in the dashboard
By default adminrole in the userstore is assigned with SysAdmin permissions.
The following configurations must be added in the <SP_HOME>/conf/dashboard/deployment.yaml file, if different roles need be assigned the above permissions, Code Block |
---|
| wso2.status.dashboard:
sysAdminRoles:
- role_1
developerRoles:
- role_2
viewerRoles:
- role_3 |
Info |
---|
The display name of the roles given in the configuration must be present in the user store. To configure user store check, User Management |
Viewing the Status DashboardTo view the status dashboard, follow the procedure below: - Start the dashboard for your worker node by issuing one of the following commands:
For Windows: dashboard.bat For Linux : ./dashboard.sh - Access the Status Dashboard via the following URL format.
https://localhost:<SP_DASHBOARD_PORT>/sp-status-dashboard e.g., https://0.0.0.0:9643/sp-status-dashboard
After login this opens the Status Dashboard with the nodes that you have already added as shown in the example below. Image Modified If no nodes are displayed, add the nodes for which you wnt to view statistics by following the steps
|
...
- in Worker Overview - Adding a worker to the dashboard.
For a detailed descripion of each page in this dashboard, see the following topics: Child pages (Children Display) |
---|
|