Step 8: Install Metrics Monitoring

To enable metering and the display of certain metrics by the MapR Control System (MCS), you must install collectd and OpenTSDB components. Metrics monitoring is part of MapR monitoring, which also includes log monitoring. MapR Monitoring components are available as part of the MapR Ecosystem Pack (MEP) that you selected for the cluster.

Complete these steps to install metrics monitoring as the root user or using sudo. Installing metrics monitoring components on a client node or edge node is not supported.

  1. For metrics monitoring, install the following packages:
    Component Requirements
    collectd Install the mapr-collectd package on each node in the MapR cluster.
    OpenTSDB and AsyncHBase Install the mapr-opentsdb on one or more nodes. To allow failover of metrics storage when one OpenTSDB node is unavailable, install OpenTSDB on at least three nodes in the cluster.
    Note: mapr-opentsdb depends on mapr-asynchbase, and mapr-asynchbase is automatically installed on the node where you install mapr-opentsdb.
    Grafana Optional: Install the mapr-grafana package on at least one node in the MapR cluster. Grafana does not need to be installed for metering and is optional for metrics monitoring in general.
    On a three-node cluster, you could run the following commands to install metrics packages:
    • For CentOS/RedHat:
      • Node A: yum install mapr-collectd mapr-grafana
      • Node B: yum install mapr-collectd mapr-opentsdb
      • Node C: yum install mapr-collectd
    • For Ubuntu:
      • Node A: apt-get install mapr-collectd mapr-grafana
      • Node B: apt-get install mapr-collectd mapr-opentsdb
      • Node C: apt-get install mapr-collectd
    • For SUSE:
      • Node A: zypper install mapr-collectd mapr-grafana
      • Node B: zypper install mapr-collectd mapr-opentsdb
      • Node C: zypper install mapr-collectd
  2. MapR 6.0.1 and later: Configure a password for Grafana:
    • For a secured cluster, ensure that the /opt/mapr/conf/ssl_truststore.pem file is present in /opt/mapr/conf on the Grafana nodes. If the /opt/mapr/conf/ssl_truststore.pem file is not present, you must copy it from the CLDB master node to /opt/mapr/conf on the Grafana nodes.
      Note: In a secure cluster, Grafana uses PAM to authenticate using the cluster administrator login ID (typically the mapr user ID) and password, so no additional information is needed.
    • For a nonsecured cluster, you must configure a password for the Grafana admin user ID at the time of running If no password is provided, the password reverts to admin, which is the default pre-MEP 5.0.0 password. Use one of the following methods to pass the password to Grafana:
      • On the nodes where Grafana is installed, export the password as an environment variable before calling
        export GRAFANA_ADMIN_PASSWORD="<newGrafanaPassword>"

        Then run as you normally would run it (go to step 3).

      • Add the following options to the command in step 3. This method explicitly passes the password on the command line:
        -EPgrafana '-password <newGrafanaPassword>'
      • Add the following options to the command in step 3. This method explicitly passes the password on the command line by specifying a file:
        -EPgrafana '-password <name of local file containing new password>'
  3. On every cluster node, run with the -R and -OT parameters, and other parameters, as needed, for the Grafana password. A Warden service must be running when you use -R -OT.
    /opt/mapr/server/ -R -OT <comma-separate list of OpenTSDB nodes>
    Parameter Description
    -R After initial node configuration, specifies that should use the previously configured ZooKeeper and CLDB nodes.
    -OT Specifies a comma-separated list of host names or IP addresses that identify the OpenTSDB nodes. The OpenTSDB nodes can be part of the current MapR cluster or part of a different MapR cluster. The list is in the following format:
    • hostname/IP address[:port_no] [,hostname/IP address[:port_no]...]
    Note: The default OpenTSDB port is 4242. If you want to use a different port, specify the port number when you list the OpenTSDB nodes.
    For example, to configure monitoring components you can run one of the following commands:
    • In this example, default ports are used for the OpenTSDB nodes.
      /opt/mapr/server/ -R -OT NodeB
    • In this example, non-default ports are specified for the OpenTSDB nodes:
      /opt/mapr/server/ -R -OT NodeB:4040
    • If you are installing metrics monitoring only for use with the Metering utility, you can use the ‑EPcollectd option to collect only metering metrics and omit database metrics. See Installing Metering Using Manual Steps.
    After you run -R, if errors are displayed see Troubleshoot MapR Monitoring Installation Errors.
  4. To start collecting metrics for the NodeManager and ResourceManager services, restart these services on each node where they are installed.
    maprcli node services -name nodemanager -nodes <space separated list of hostname/IPaddresses> -action restart
    maprcli node services -name resourcemanager -nodes <space separated list of hostname/IPaddresses> -action restart