2.2.1 Configure System Insight Services
System insight services (SI services) are run on one or more SCs. Take the following steps to configure an SC and to add the akka and system insight services to that SC.
Use the
mzsh topo
command to add the akka service to thecustom.conf
for services. You must specify a name for the akka service, e gsi
. Thestartup-natures
must besi
.$ mzsh topo set topo://services:custom/obj:akka '{ <akka service name> { template: "1/standard/basic" config { startup-natures: [si] } } }'
See the example below, where the akka service is named
si
.Example - Adding the akka service
$ mzsh topo set topo://services:custom/obj:akka '{ si { template: "1/standard/basic" config { startup-natures: [si] } } }'
Use the
mzsh topo
command to create an SC/SCs on which to run System Insight.$ mzsh topo set topo://container:<container name> pico:<sc> '{ template:mz.standard-sc config { properties { mz.servicehost.natures : si mz.servicehost.port.range : <port range> } } }'
See the example below, where 3 SCs are created with a respective port range:Example - Adding 3 SCs to run System Insight
$ mzsh topo set topo://container:main1/pico:sc4 '{ template:mz.standard-sc config { properties { mz.servicehost.natures : si mz.servicehost.port.range : 6001-6050 } } }' $ mzsh topo set topo://container:main1/pico:sc5 '{ template:mz.standard-sc config { properties { mz.servicehost.natures : si mz.servicehost.port.range : 6051-6100 } } }' $ mzsh topo set topo://container:main1/pico:sc6 '{ template:mz.standard-sc config { properties { mz.servicehost.natures : si mz.servicehost.port.range : 6101-6150 } } }'
Note!
If you require high volumes of System Insight metrics (> 10'), add the following parameters to the relevant SC configuration(s) to ensure that there is enough memory to handle the inflow of metrics. For further information on how to these jdkarg values to the relevant SC conf file, refer to 2.4 Managing Pico Configurations.
xmx:["-Xmx2G"] xms:["-Xms2G"] maxMetaspace:["-XX:MaxMetaspaceSize=196M"] NewSize:["-XX:NewSize=1G"]
Use the
mzsh topo
command to add the system insight service to thecustom.conf
for services as shown below. You must use the same akka service name that you enter for the akka configuration in step 1, which you must also enter as the value for theakka-cluster
, shown below as<akka service name>
.
InfluxDB
If you are using InfluxDB as storage, ensure that you complete the relevant username, password and http url for the InfluxDB instance that you are using. See the CloudWatch section below if you are using CloudWatch as storage.$ mzsh topo set topo://services:custom/obj:system-insight '{ si-instance { template: "1/standard/basic" start-after=["akka/si"] config { storage-backend=influxdb akka-cluster: "<akka service name>" influxdb { url="<http url>" user="<influxdb username>" password="<influxdb password>" database="<database name>" } } } }'
Example - Adding the System Insight service to the custom.conf when using influxDB
$ mzsh topo set topo://services:custom/obj:system-insight '{ si-instance { template: "1/standard/basic" start-after=["akka/si"] config { storage-backend=influxdb akka-cluster: "si" influxdb { url="http://influx:8086" user="mzadmin" password="dr" database="mz" } } } }'
If you want to be able to access Grafana via Desktop from Tools or via the Web UI (
http://<platform host>:<web interface port>/mz/
), you can use themzsh topo
command as shown below:$ mzsh topo set services:custom/val:system-insight.si-instance.config.grafana-url http://<host name>:3000
For further information on this method of accessing Grafana from , see the section below, Access Grafana via Desktop or Web UI.
CloudWatch
To use CloudWatch with System Insight, you must create an IAM policy and create a user for that policy. For further information, see https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html. The AWS IAM user must have at least the following IAM Policy attached:{ "Version": "2012-10-17", "Statement": [ { "Sid": "CloudWatchPutMetricData", "Effect": "Allow", "Action": "cloudwatch:PutMetricData", "Resource": "*" } ] }
If you are using CloudWatch as storage, ensure that you complete the relevant AWS user access key, AWS user access secret, AWS region and a namespace prefix. See the table below for information on how to configure the System Insight service when using CloudWatch.
Property Description aws-access-key
andaws-access-secret
AWS credentials. You must encrypt the relevant key and secret using the command mzsh encryptpassword
. If you do not provide AWS credentials, the IAM policy is used for authentication. For further information on the commandmzsh encryptpassword
, see 2.1.4 encryptpassword in Command Line Tool User's Guide.region
The AWS region. If you do not enter a region, the default region is used. namespace-prefix
The root namespace to add metrics to. You can use forward slashes ("/") to add multiple levels. batch
Add this block to tune batch settings by entering values for size
andinterval
. See below.size
The number of measurements per batch. The default is 10000. Use the default setting unless advised otherwise.interval
The time in milliseconds between batches. The default is 1000. Use the default setting unless advised otherwise.$ mzsh topo set topo://services:custom/obj:system-insight '{ si-instance { template: "1/standard/basic" start-after=["akka/si"] config { akka-cluster: "<akka service name>" storage-backend=cloudwatch cloudwatch { aws-access-key = "<IAM user access key>" aws-access-secret = "<IAM user access secret>" region = "<AWS region>" namespace-prefix = "<prefix>" batch { interval = 1000 } } } } }'
Example - Adding the System Insight service to the custom.conf when using Cloudwatch
$ mzsh topo set topo://services:custom/obj:system-insight '{ si-instance { template: "1/standard/basic" start-after=["akka/si"] config { akka-cluster: "si" storage-backend=cloudwatch cloudwatch { aws-access-key = "DR_DEFAULT_KEY-A093A586B07F76B80ADC1344F9A37878" aws-access-secret = "DR_DEFAULT_KEY-373D9EA882C035182B05C7CFC6614C14" region = "eu-west-1" namespace-prefix = "myprefix" batch { interval = 1000 } } } } }'
Use the mzsh topo command to enable System Insight at cell level:
$ mzsh topo set val:common.mz.system.insight true
Restart the Platform and then start or restart the ECs and SCs:
$ mzsh restart platform $ mzsh system start or $ mzsh system restart
Start the service using the mzsh
service
command:$ mzsh service start
Access Grafana via Desktop or Web UI
To be able to access Grafana via Desktop from Tools or via the Web UI (http://<platform host>:<web interface port>/mz/
) as mentioned in step 3 above, you can use the following mzsh topo
command at any time after installing System Insight:
$ mzsh topo set services:custom/val:system-insight.si-instance.config.grafana-url http://<host name>:3000
Grafana via Desktop
The first time you access Grafana via Desktop, the System Insight service must be running and the property grafana_url
mentioned above must be set.
In Desktop, go to Tools, and select System Insight. You are directed to the Grafana login page.
Grafana via Web UI
For System Insight to be visible from the Web UI, the property grafana_url
mentioned above must be set.
Go to the Web UI, located at http://<platform host>:<web interface port>/mz/
, and select System Insight from the Dashboard.
System Insight in the Web UI