Contrail Insights Plug-Ins
To install Contrail Insights certified plug-ins on the cluster,
include the following variables in the group_vars/all
file:
appformix_plugins: <list of certified plugins to be installed> appformix_openstack_log_plugins: <list of OpenStack log plugins to be installed>
For example:
appformix_plugins: - { plugin_info: 'certified_plugins/cassandra_node_usage.json' } - { plugin_info: 'certified_plugins/contrail_vrouter.json' } - { plugin_info: 'certified_plugins/zookeeper_usage.json' } - { plugin_info: 'certified_plugins/heavy_hitters.json' } appformix_openstack_log_plugins: - { plugin_info: 'certified_plugins/cinder_api_logparser.json', log_file_path: '/var/log/cinder/cinder-api.log' } - { plugin_info: 'certified_plugins/glance_logparser.json', log_file_path: '/var/log/glance/glance-api.log' } - { plugin_info: 'certified_plugins/keystone_logparser.json', log_file_path: '/var/log/apache2/keystone_access.log,/var/log/httpd/keystone_wsgi_admin_access.log,/var/log/keystone/keystone.log' }
For a list of all Contrail Insights certified plug-ins that
can be installed, look for the entries starting with plugin_info
in the file roles/appformix_defaults/defaults/main.yml
.
The OpenStack log parser plug-ins parse the API log files of
each OpenStack service to collect metrics about API calls and response
status codes. To install these plug-ins, add them to the variable appformix_openstack_log_plugins
in group_vars/all
, as shown above. Each plug-in entry in this list requires a parameter
called log_file_path
to be specified. This
parameter should be set to the complete path to the service's API
log file on the OpenStack Controller node(s). Multiple comma-separated
paths can be specified.
To identify the correct log file to be specified in log_file_path
, look for entries like the following,
containing a client IP address, REST call type, and response status
code:
2019-04-02 06:50:13.103 3465 INFO nova.osapi_compute.wsgi.server [req-d07e953a-6921-4224-a056-afb6ff69adde 953ea56a96b944b3b170a299af9e87bd 10c9e8809feb4bd1b55955d9c2ed5aba - - -] 172.18.0.6 "GET /v2/10c9e8809feb4bd1b55955d9c2ed5aba/os-hypervisors/detail HTTP/1.1" status: 200 len: 1427 time: 0.0208740 2019-04-02 06:50:13.183 3465 INFO nova.osapi_compute.wsgi.server [req-34b2f686-9eb5-4112-b3fc-e0b37798a302 953ea56a96b944b3b170a299af9e87bd 10c9e8809feb4bd1b55955d9c2ed5aba - - -] 172.18.0.6 "GET /v2/10c9e8809feb4bd1b55955d9c2ed5aba/servers/detail?all_tenants=1&status=SHELVED_OFFLOADED HTTP/1.1" status: 200 len: 211 time: 0.0754580
Default locations for these files are listed in the variable appformix_openstack_log_factory_plugins
in roles/appformix_defaults/defaults/main.yml
.
On containerized OpenStack environments, log files are generated
inside the containers running the OpenStack services. However, they
have to be available on the OpenStack controller host for the Contrail
Insights plug-ins to be able to read them. The path specified in log_file_path
should be the location of the file on
the OpenStack Controller host.
In AppFormix 3.0, all OpenStack log parser plug-ins have
to be specified in the variable appformix_openstack_log_plugins
. When upgrading from an earlier version to 3.0, make sure to move
all OpenStack log parser plug-ins defined in appformix_plugins
to appformix_openstack_log_plugins
. Also,
in AppFormix 3.0, all entries in this list have to be specified with
a log_file_path
value, as described in
example above.