Customer Experience and Support Tools
MapR now ships a CLI-based metering utility to better understand your cluster and resource usage to give the MapR support team insights that will help enhance your support experience.
Installing the Metering Application
The Metering application must be installed on your MapR cluster, preferably on a non-critical node (for example, an edge node or a non-CLDB node). In the case that your MapR cluster is offline, you may also install Metering on an internet-connected computer in order to upload the collected metrics.
- Create
mapr-metering.repo
file in/etc/yum.repos.d/
with the contents:[mapr-metering] name=mapr-metering baseurl=http://package.mapr.com/releases/metering/redhat/ gpgcheck=0
- Run the following command:
yum install mapr-metering
- The Metering application is installed in the
/opt/mapr/metering/
folder.
- Add the following entry to
/etc/apt/sources.list
:deb http://package.mapr.com/releases/metering/ubuntu/ binary trusty
- Run the following commands:
apt-get update apt-get install mapr-metering
- The Metering application is installed in the
/opt/mapr/metering/
folder.
- Run the following commands:
zypper ar -f http://package.mapr.com/releases/metering/suse mapr-metering zypper install mapr-metering
- The Metering application is installed in the
/opt/mapr/metering/
folder.
- Download package from
http://package.mapr.com/releases/metering/metering-latest.tar
. - Create a
metering
folder at the desired installation location. - Extract the package contents into the
metering
folder.
For example, to install the Metering application at the current working directory:
wget http://package.mapr.com/releases/metering
mkdir metering
tar -xvf metering-latest.tar -C metering
cd metering
- Download package from
http://package.mapr.com/releases/metering/metering-latest.tar
. - Create a
metering
folder at the desired installation location. - Extract the package contents into the
metering
folder.
Uninstalling the Metering Application
yum remove mapr-metering
apt-get remove mapr-metering
zypper rm mapr-metering
- If you are on a MapR cluster, run
bin/metering --unschedule
from the "Metering Installation Directory". - Delete the Metering Installation Directory.
Using the Metering CLI
The Metering CLI must be run on the MapR cluster from the "Metering Installation Directory". The metrics are outputted in JSON format. See Metering Data Descriptions for a list of collected metrics (all metrics are collected by default).
Syntax:
bin/metering <option>
See Metering CLI Options for a complete list of options.
Configuring the Metering Application
cron
installed.After installing the Metering application, it is recommended to run bin/metering
--configure
to set the output location of the metrics and schedule metric
collection and/or upload.
You can also schedule or unschedule the metric collection with the --cron
or --unschedule
options, respectively. See Metering CLI Options for more information.
The log level can be set from the resources/log4j.metering.properties
file. The log4j.rootLogger
property can be set with ERROR
,
INFO
, or DEBUG
(listed in increasing level of
specificity).
Uploading Metering Measurement Results to MapR
The process for uploading metrics (transmitting to MapR) depends on whether the cluster has internet connectivity:
Connected to Internet
- To manually capture metrics and immediately upload it (transmit to MapR), run:
bin/metering --captureAndUpload
. - If metrics were captured to be uploaded at a later time, run:
bin/metering --upload
.
Offline (air-gapped)
- On the MapR cluster, run
bin/metering --prepareForOfflineSend
. - Transfer the resulting zip to an internet-connected computer.
- Ensure that your internet-connected computer has the Metering application installed.
- On the internet-connected computer, run the
localUpload
command from the "Metering Installation Directory".- For Linux/OSX:
bin/localUpload <path to meteringMetrics.zip>
- For Windows:
bin\localUpload.bat <path to meteringMetrics.zip>
- For Linux/OSX:
Example Metrics JSON
{
"clusterId":"4590606688340423841",
"clusterName":"cluster_name",
"mapRCoreBuildVersion":"6.0.0.20171109191718.GA",
"numberOfFileServerNodes":1,
"diskSpaceUsedInGB":128,
"diskSpaceAvailableInGB":4463,
"collectionDate":1519775607,
"isSecure":false,
"disk":{
"usedCapacityUnderMultiMFSInGB":128,
"availableCapacityUnderMultiMFSInGB":4463,
"usedCapacityUnderOneMFSInGB":0,
"availableCapacityUnderOneMFSInGB":0
},
"dbAndStreams":{
"isUsingDBTables":true,
"isUsingStreams":false,
"numberOfNodesWithDBAndOrStreamsOperations":1
},
"yarn":{
"numberOfNodesWithResourceManagerInstalled":1,
"numberOfNodesWithActiveResourceManager":1,
"numberOfNodesWithYarnHistoryServerInstalled":1,
"numberOfNodesWithActiveYarnHistoryServer":1,
"numberOfNodesWithNodeManagerInstalled":1,
"numberOfNodesWithActiveNodeManager":1
},
"drill":{
"numberOfNodesWithDrillBitInstalled":0,
"numberOfNodesWithActiveDrillBit":0
},
"spark":{
"numberOfNodesWithSparkMasterInstalled":0,
"numberOfNodesWithActiveSparkMaster":0,
"numberOfNodesWithSparkHistoryServerInstalled":1,
"numberOfNodesWithActiveSparkHistoryServer":1,
"sparkStandAlone":{
"numberOfActiveSparkWorkers":0,
"numberOfNodesWithOneOrMoreActiveSparkWorkers":0
},
"sparkYarn":{
"numberOfNodeManagersRunningSpark":0
}
},
"hive":{
"numberOfNodesWithHiveServer2Installed":1,
"numberOfNodesWithActiveHiveServer2":0,
"numberOfNodesWithHiveMetastoreInstalled":0,
"numberOfNodesWithActiveHiveMetastore":0,
"numberOfNodesWithHiveWebhcatInstalled":0,
"numberOfNodesWithActiveHiveWebhcat":0
},
"signature":"",
"meteringVersion":"1.18.1",
"id":"metering-1519775607-38d258ecc7e848dda3b1a8bf0793025c",
"meteringConfiguration":{
...
}
}
For a complete description of each metric, see Metering Data Descriptions.