The purpose of this lab is to add monitoring to an existing blueprint.
Ensure that the LAB_ROOT
environment variable points to the exercise's root directory by executing:
export LAB_ROOT=~/cloudify-training-labs/monitoring/exercise
cfy plugins upload -y http://www.getcloudify.org/spec/diamond-plugin/1.3.8/plugin.yaml http://repository.cloudifysource.org/cloudify/wagons/cloudify-diamond-plugin/1.3.8/cloudify_diamond_plugin-1.3.8-py27-none-linux_x86_64-centos-Core.wgn
You need to replace all the occurrences of the placeholders (REPLACE_WITH
) in inputs.yaml
and in blueprint/blueprint.yaml
to add monitoring to the blueprint.
You can use the Diamond collectors' reference for information how to configure collectors: https://github.com/python-diamond/Diamond/wiki/Collectors
NOTE: Replace <app-vm-ip-address>
with the private IP address of your application VM.
cfy blueprints upload $LAB_ROOT/blueprint/blueprint.yaml -b monitoring
cfy deployments create mon -b monitoring -i vm_ip_address=<app-vm-ip-address>
cfy executions start -d mon install
- Log in to the UI.
- Go to the Deployments screen.
- Click your deployment.
- Click your username at the top right, and select "Edit Mode".
- Click the "Add Widget" button.
- Select the "Deployment metric graph" widget. Click "Add".
- Click the cogwheel icon at the top right corner of the new widget.
- Under "Node Filter": a. Select "Deployment" and then click your deployment's name. b. Select "Node Instance" and select your VM's instance ID.
- In the "Charts" table, focus on the first row and click the "Metric" dropdown list. Then select
cpu_total_user
. - In the "Label" field, type "CPU (Total)".
- Click "Save".
- Click your username at the top right, and select "Exit Edit Mode".
The metrics widget will now appear on the screen.
cfy executions start uninstall -d mon
cfy deployments delete mon
cfy blueprints delete monitoring