Skip to content

mp-init


Purpose

The mp-init tool generates project templates that contain all the requirements to develop a Management Pack with a containerized adapter for VMware Aria Operations. To build a Management Pack, use the build tool. When calling mp-init, the user will be prompted with a series of questions. The script will use these questions to generate an initial project structure and create classifiers that other tools and VMware Aria Operations will use.

Prerequisites

  • The VMware Aria Operations Integration SDK is installed.
Warning

Running mp-init as root is not recommended, as this requires some directories to have escalated permissions.

Input

Command-line Arguments

mp-init does not have any command-line arguments

Interactive Prompts

When using the mp-init script, it is helpful to know what technology the Management pack will monitor.

Project Directory

The project directory where the mp-init tool can generate a project. The project contains a sample adapter, content directories, and metadata. If the project directory does not exist, it will be created.

user@host:~mp-init
Enter a directory to create the project in. This is the directory where adapter code, metadata, and
content will reside. If the directory doesn't already exist, it will be created.
Path: my-adapter

Display Name

VMware Aria Operations Manager uses the display name as the name of the Management Pack generated by this project. The name should include the name of the technology the Management Pack monitors.

Management pack display name: My Adapter

Adapter Key

The adapter key is used internally to identify the Management Pack and Adapter. It should be unique and cannot contain spaces or other special characters. It also cannot start with a number. By default, it is set to the Display Name with special characters removed (if the Display Name begins with a number, 'Adapter' is prepended).

Management pack adapter key: MyAdapter

Description

A brief description of the Management Pack and the technology it monitors. The description should include relevant versions of the monitored technology.

Management pack description: This management pack is an example for the VMware Aria Operations Integration SDK project.

Vendor

The name of the vendor/developer of the Management Pack. VMware Aria Operations Manager will display this information during the installation of the Management Pack generated by this project.

Management pack vendor: My Company 

EULA

The End-User License Agreement (EULA) is a text file that provides guidelines for distributing and using the Management Pack generated by this project. It is generally only necessary for Management Packs that will be distributed. The content of this file appears in VMware Aria Operations Manager during the installation of this management pack.

Enter a path to a EULA text file, or leave blank for no EULA:
A EULA can be added later by editing the default 'eula.txt' file.

Icon

The icon for the Management Pack generated by this project. The icon will be displayed in VMware Aria Operations Manager. The icon image must be 256x256 pixels in PNG format.

Enter a path to the management pack icon file, or leave blank for no icon:
An icon can be added later by setting the 'pak_icon' key in 'manifest.txt' to the icon file name and adding the icon file to the root project directory.

Language

Adapters can be written in the following languages:

  • Java
  • Python

Base Project Structure

The init script creates a project in the given path with the following structure:

.
├── Dockerfile
├── eula.txt
├── manifest.txt
├── requirements.txt
├── venv-ADAPTER NAME
├── conf
│   ├── describeSchema.xsd
│   └──  images
│       ├── AdapterKind
│       ├── ResourceKind
│       └── TraversalSpec
├── content
│   ├── alertdefs
│   │   └── alertDefinitionSchema.xsd
│   ├── customgroups
│   ├── dashboards
│   ├── files
│   │   ├── reskndmetric
│   │   ├── solutionconfig
│   │   ├── topowidget
│   │   └── txtwidget
│   ├── policies
│   ├── recommendations
│   ├── reports
│   ├── resources
│   ├── supermetrics
│   ├── symptomdefs
│   └── traversalspecs
│       └── traversalSpecsSchema.xsd
└── resources
    └── resources.properties

Dockerfile (file)

Contains all necessary instructions to build a container with an HTTP server, the user's executable adapter code, and any additional dependencies specified by the user.

requirements.txt (file)

This file defines all the dependencies needed for development of the adapter. This file does not get copied into the container image.

eula.txt (file)

This file defines the End User License Agreement (EULA); If no EULA was provided then mp-init generates a template EULA.

manifest.txt (file)

The manifest file contains top-level information that needed to install a management pack. The content is in JSON format.

Note: The file must be encoded in UTF-8 format without a byte-order mark. If your editor automatically includes the byte-order mark when saving to UTF-8, you must remove it.

Manifest Property Value
display_name A display name for this management pack, which appears in the list of installed management packs in the VMware Aria Operations Manager user interface. If not included or blank, the value of the name entry appears. Set to "DISPLAY_NAME" for localization2.
name1 Management pack name. Uniquely identifies the management pack but only appears in the VMware Aria Operations Manager user interface if display_name is blank. Valid values are ASCII alphanumeric characters [a-z], [A-Z], [0-9], and hyphen and underscore characters.
description Brief description of the management pack and what it does. Set to "DESCRIPTION" for localization2.
version A numeric string in the form "major.minor.build". For example: "1.0.1234".
vcops_minimum_version Minimum version number of VMware Aria Operations Manager in which the management pack can be installed. For example, if the value is " 7.0.0", you cannot install the management pack version 6.7.0.
disk_space1 Size in megabytes that specifies the minimum disk space that must be available to install this management pack.
run_scripts_on_all_nodes When true, validation and initialization scripts are run in all nodes in the cluster where the Management Pack is installed. The default is false, meaning that the scripts are only run in the specific node where the Management Pack is installed.
eula_file1 Name of the End User License Agreement (EULA) file. If not localized, the value must be "eula.txt:" The filename must be all lowercase for operating-system compatibility. The content of this file cannot be blank, and appears in VMware Aria Operations Manager during installation of this management pack.
platform1 An array of supported platforms. Set to ["Linux-Non_VA", "Linux VA"].
vendor1 The vendor who provides this management pack. Set to "VENDOR" for localization2.
pak_icon The file name for an icon image that appears in the VMware Aria Operations Manager user interface to visually identify this management pack. The icon image must be 256x256 pixels in PNG format.
pak_validation_script A command that runs necessary validation code that must be performed before the management pack installation operation starts. For example: "python validate.py".
adapter_pre_script A command that runs initialization actions to be performed at the beginning of the management pack installation operation. For example: "python preAdapters.py".
adapter_post_script A command that runs initialization actions to be performed at the end of the management pack installation operation. For example: "python postAdapters.py"
adapters1 List of zipped adapter bundles. The VMware Aria Operations Integration SDK does not currently support multiple adapters in a single management pack.
adapter_kinds1 A comma-separated array of adapter kind keys for all adapters included in this management pack. For example, ["myAdapter"]. This value must match the AdapterKind key attribute in the describe.xml file. The VMware Aria Operations Integration SDK does not currently support multiple adapters in a single management pack.
license_type Management Packs made using the VMware Aria Operations Integration SDK do not support licensing.

1 This property is required.

2 Localized fields are specified in the property files located in the resources/ directory. See Adding Localization.

venv-ADAPTER NAME (directory)

A Python virtual environment for the project. The directory name is prefixed with venv followed by the display name of the management pack. This virtual environment is created to allow users to use different versions of the SDK for every project.

NOTE: This directory is excluded from version control. Users cloning the project will have to create their own venv directory( venv documentaion).

conf (directory)

The conf directory contains configuration files used by VMware Aria Operations to create a management pack instance.

  • describe.xml: An XML configuration file that defines the object model for an adapter, along with semantic definitions for use in data analysis and management.
  • describeSchema.xsd: A file that defines what elements and attributes may appear in the describe.xml document. This file does not need to be included in a Management Pack but is useful for validating that the describe.xml file is error-free.

content (directory)

Contains all the content included in a management pack such as: alerts, dashboards, reports, recommendations, symptoms, and traversal specs. To learn more about adding content, consult the Adding Content guide.

resources (directory)

The resources directory contains localization file(s), by default resources.properties. This file specifies the mapping of nameKey attribute of elements inside the manifest.txt. For more information see Adding Localization.