Here are a number of example Python3 scripts in action pack form to serve as reference to those designing their own user scripts.
Please note that scripts in the trunk branch may not be compatible with your installation of CloudVision. Please refer to the branch corresponding to your Cloudvision version for compatible scripts.
These action packs are also able to be uploaded to a CloudVision cluster, where they can be used as needed, or duplicated and customised.
Those action packs listed in bundled.yaml
are bundled by default to CloudVision.
Note: This is method of uploading scripts is not yet available for CVaaS customers.
tar
tar
up the action pack while you are in theactionpacks
directory (or equivalent directory). The name of the tar is not important, but it is good practice to use the same name as the as the directory you are tarring, and include the version string.- Use scp to copy the tar file over to any of the cvp nodes in the system.
- On the cvp node, upload the action pack via the the
actionpack_cli
tool
Note: This will upload the action pack as the aerisadmin
user, which means that only the aerisadmin
user will be able to modify or delete them (copies can still be made and modified/deleted by any user authorised to create actions).
To avoid making an aeris admin gated script, it is advised to create a new action, and to copy the script and arguments wanted from the example in question.
Note: This example is using the event-monitor
action pack, which is bundled by default
tar
up the action pack:
> tar cvf event-monitor-action-pack_1.0.0.tar event-monitor-action-pack
a event-monitor-action-pack
a event-monitor-action-pack/config.yaml
a event-monitor-action-pack/event-monitor
a event-monitor-action-pack/event-monitor/config.yaml
a event-monitor-action-pack/event-monitor/script.py
-
scp
action pack over to the cvp node -
ssh
onto the node and run/cvpi/tools/actionpack_cli event-monitor-action-pack_1.0.0.tar