Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Service Monitoring Ansible Variables

To monitor services, you must configure where a service is running and credentials (if any) to connect to the service. You can provide the configuration in the Dashboard settings but you can also provide the configuration by defining Ansible variables. The Ansible playbook will configure Contrail Insights Platform with the information to monitor a service.

Configure Cassandra Monitoring

Cassandra monitoring is configured by the Ansible role appformix_cassandra_config. This Ansible role is applied to the appformix_controller group of hosts. Ansible will perform the configuration if the following variables are set as extra vars, group vars, and so on.

  • cassandra_username: Cassandra username to access API.

  • cassandra_password: Cassandra password to access API.

  • cassandra_host: Hostname or IP address of Cassandra API server.

There are two optional variables that can be specified as well:

  • cassandra_cluster_name: A name by which the Cassandra instance is displayed in the Dashboard. If not specified, this variable has a default value of default_cassandra_cluster.

  • cassandra_cluster_port: Port used by the Cassandra service. The default value is 9042.

Note:

The variable cassandra_cluster_port is available starting in release 3.1.0.

Configure Ceph Monitoring

Enable Ceph service monitoring by specifying hosts in the Ansible groups ceph_monitor and ceph_osd. As of Contrail Insights v2.12, the Ansible playbooks install Contrail Insights Agent on hosts in those groups to monitor both the host and the Ceph service running on that host.

To access the Ceph service, Contrail Insights Agent uses information from the Ceph configuration files located in standard directories on the Ceph monitor host: /etc/ceph/ceph.conf,/etc/ceph/ceph.client.admin.keyring. If the files are located in a non-default location, the location of these files can be specified by setting the CEPH_CONF and CEPH_KEY environment variables for the agent. Refer to the Contrail Insights Agent startup scripts.

An example portion of the hosts file to specify Ceph nodes in Ansible inventory:

Ceph Configuration Prior to Contrail Insights v2.12

For Contrail Insights v2.11 and earlier, Ceph service monitoring is performed by remotely accessing Ceph service from the Contrail Insights Platform host. Ansible configures Contrail Insights Platform to monitor Ceph if the following variables are set as extra vars, group vars, and so on.

Configure Contrail Monitoring

Contrail service monitoring is configured by the Ansible role appformix_contrail_config. This Ansible role is applied to the appformix_controller group of hosts. Ansible performs the configuration if the following variables are set as extra vars, group vars, and so on.

Configuration of Contrail uses the same OpenStack credentials as provided for Contrail Insights to access OpenStack services. The Ansible role reads the credentials from environment variables (for example, OS_USERNAME, OS_PASSWORD). Administrator credentials to the OpenStack cluster are a requirement. Contrail Insights connects to the analytics and configuration nodes of Contrail.

Since Contrail Insights v2.15, connections to Contrail are configured by providing complete URLs by which to access the analytics and configuration API services.

  • contrail_analytics_url: URL for the Contrail analytics API. The URL should only specify the protocol, address, and optionally port.

    For example:

  • contrail_config_url: URL for the Contrail configuration API. The URL should only specify the protocol, address, and optionally port.

    For example:

The following optional variable can be specified:

  • contrail_cluster_name: A name by which the Contrail instance will be displayed in the Dashboard. If not specified, this variable has a default value of default_contrail_cluster.

Contrail Configuration Prior to Contrail Insights v2.15

In versions prior to Contrail Insights v2.15, configuration is specified as a single hostname on which both the analytics and configuration APIs can be accessed. Contrail Insights connects to port 8081 for the analytics API and port 8082 for the configuration API.

  • contrail_host: Hostname or IP address of Contrail API server.

Configure MySQL Monitoring

As of Contrail Insights v2.12, MySQL service monitoring is performed by Contrail Insights Agent, preferably running on the MySQL host itself. Agent can monitor the MySQL database service running on a host, and the host's compute, network, storage, and operating system metrics. Contrail Insights Ansible playbooks install Contrail Insights Agent on hosts in host groups such as appformix_controller, openstack_controller, and bare_host. If MySQL is running on a host in one such group, then AgentUrl (see below) can be left blank, and the agent on the host will be used to monitor the MySQL database running locally on the same host. If MySQL is running on a host that is not already in the Ansible inventory, then add the host to the bare_host group.

Alternately, you can configure the MySQL cluster to be monitored by an Contrail Insights Agent running on a different host than the host that is running MySQL. Agent will collect metrics from MySQL remotely. For this option, configure the AgentUrl (see below) to a host in the bare_host host group in the Ansible inventory.

MySQL monitoring is configured by the Ansible role appformix_mysql_config. Contrail Insights Ansible playbooks configure Contrail Insights to monitor a MySQL cluster only if the following variables are defined:

  • appformix_mysql_username: MySQL username to access database metrics.

  • appformix_mysql_password: MySQL password to access database metrics.

  • appformix_mysql_hosts: A list of MySQL host configuration dictionaries. Each entry in the list specifies to monitor MySQL running on a host in a MySQL cluster. Each dictionary must contain the following fields:

    • MySQLHost: Hostname or IP address of MySQL host.

    • AgentUrl: URL to Agent that monitors MySQL on this host. Contrail Insights Agent can monitor more than one MySQL instance. If an empty string is specified, then Contrail Insights will use an agent running locally on the MySQL host. Agent listens on port 42595. An example URL is http://hostname:42595/.

There are two optional variables that can be specified as well:

  • appformix_mysql_cluster_name: A name by which the MySQL cluster is displayed in the Dashboard. If not specified, this variable has a default value of default_mysql_cluster.

  • appformix_mysql_port: MySQL port. If not specified, this variable has a default value of 3306.

Example configuration for MySQL in group_vars/all:

MySQL Configuration Prior to Contrail Insights v2.12

For v2.11 and earlier, MySQL service monitoring is performed by remotely accessing MySQL service from the Contrail Insights Platform host. Ansible configures Contrail Insights Platform to monitor MySQL if the following variables are set as extra vars, group vars, and so on.

  • mysql_username: MySQL username to access database metrics.

  • mysql_password: MySQL password to access database metrics.

  • mysql_hosts: A list of hosts separated by commas. For example, 1.1.1.1,2.2.2.2. If MySQL is running in clustered mode, then Contrail Insights monitors each host in the cluster.

There are two optional variables that can be specified as well:

  • mysql_cluster_name: A name by which the MySQL cluster is displayed in the Dashboard. If not specified, this variable has a default value of default_mysql_cluster.

  • mysql_port: MySQL port. If not specified, this variable has a default value of 3306.

Configure RabbitMQ Monitoring

As of Contrail Insights v2.12, RabbitMQ service monitoring is performed by Contrail Insights Agent, preferably running on the RabbitMQ host itself. Agent can monitor the RabbitMQ service running on a host, and the host's compute, network, storage, and operating system metrics. Contrail Insights Ansible playbooks install Contrail Insights Agent on hosts in host groups such as appformix_controller, openstack_controller, and bare_host. If RabbitMQ is running on a host in one such group, then AgentUrl (see below) can be left blank, and the agent on the host will be used to monitor the RabbitMQ service running locally on the same host. If RabbitMQ is running on a host that is not already in the Ansible inventory, then add the host to the bare_host group.

Alternately, you can configure the RabbitMQ service to be monitored by an Contrail Insights Agent running on a different host than the host that is running RabbitMQ. Agent will collect metrics from RabbitMQ remotely. For this option, configure the AgentUrl (see below) to a host in the bare_host host group in the Ansible inventory.

RabbitMQ monitoring is configured by the Ansible role appformix_rabbit_config.

Contrail Insights Ansible playbooks configure Contrail Insights to monitor RabbitMQ only if the following variables are defined:

  • appformix_rabbitmq_username: RabbitMQ username to access monitoring API.

  • appformix_rabbitmq_password: RabbitMQ password to access monitoring API.

  • appformix_rabbitmq_nodes: A list of RabbitMQ node configuration dictionaries. Each dictionary must contain the following fields:

    • RabbitNode: RabbitMQ node name. Node name must match the configuration in the RabbitMQ cluster, as seen in the output of rabbitmqctl status.

    • RabbitUrl: URL to RabbitMQ monitoring API. For example, http://rabbit_node1:15672.

    • AgentUrl: URL to Contrail Insights Agent that monitors this RabbitMQ node. Contrail Insights Agent can monitor more than one RabbitMQ node. If an empty string is specified, then Contrail Insights uses an Agent running locally on the RabbitMQ node. Agent listens on port 42595. An example URL is http://hostname:42595/.

There is one optional variable that can be specified as well:

  • appformix_rabbitmq_cluster_name: A name by which the RabbitMQ cluster is displayed in the Dashboard. If not specified, this variable has a default value of default_rabbit_cluster.

Example configuration for RabbitMQ in group_vars/all:

RabbitMQ Configuration Prior to Contrail Insights v2.12

For Contrail Insights v2.11 and earlier, RabbitMQ service monitoring is performed by remotely accessing RabbitMQ service from the Contrail Insights Platform host. Ansible configures Contrail Insights Platform to monitor RabbitMQ if the following variables are set as extra vars, group vars, and so on.

  • rabbit_username: RabbitMQ username to access monitoring API.

  • rabbit_password: RabbitMQ password to access monitoring API.

Configure ScaleIO Monitoring

ScaleIO monitor is configured by the Ansible role appformix_scaleio when the variable scaleio_cluster is defined. This Ansible role is applied to the appformix_controller group of hosts. Ansible will perform the configuration if the scaleio_cluster variable is set as extra vars, group vars, and so on. The scaleio_cluster variable is a dictionary with the following required keys:

  • host: ScaleIO API gateway hostname or IP address.

  • username: ScaleIO username to access API.

  • password: ScaleIO password to access API.

Optionally, the following keys can also be defined in the scaleio_cluster dictionary.

  • name: Name of this ScaleIO cluster. If not specified, this variable has a default value of default_scaleio_cluster.

  • port: ScaleIO API gateway port number. If not specified, this variable has a default value of 80.

For example, in group_vars/all, the scaleio_cluster dictionary can be minimally defined as follows: