Extensibility Using Plug-Ins
Plug-ins provide a framework for adding user-defined metrics to Contrail Insights. Metrics provided by a plug-in are available for charting and alarming. Plug-ins can be configured using the Ansible playbooks, as described in Contrail Insights User-Defined Plug-Ins.
Plug-In Configuration Panel
After a plug-in is added to the Contrail Insights Platform, you can make modifications to the plug-in configuration from the settings panel on the dashboard. Figure 1 shows the plug-in configuration panel.
Plug-In Grammar
A plug-in of type command
is a Nagios-Style
plug-in that outputs metrics as a string. A command plug-in may be
any executable that outputs a string in the following format.
OK - <plugin_name_suffix>: <metric1.value><metric1.units> <metric1.name>, ... <metricN.value><metricN.units> <metricN.name>
Table 1 describes the fields.
Field |
Description |
---|---|
metric value |
Must contain only digits and optional decimal point: |
metric.units |
Must be a valid string that starts with a letter. |
metric.name |
Must be a valid string that starts with a letter. |
For example:
$ run_app1_performance.sh OK - app1.performance: 102586MB/s bandwidth, 102610reqs/s queries_per_sec, 10count active_connections, 5% capacity
Plug-In Metrics Charts
After a plug-in is installed, you can navigate to the host chart page and the metrics will be visible in the charting panel on the hosts where the plug-in is enabled. Figure 2 shows a plug-in metric chart displaying instances and NICs, color-coded and sorted by start and end date, as well a times.
Plug-In Metrics Alarms
An alarm can be configured for any plug-in metric from the panel for the alarm configuration. If the plug-in is enabled the plug-in metrics are also available on the alarm panel. Figure 3 shows a list of these metric alarms.