tree: d4cb3e687741bd7fdffbb2ff00c9e3e6e16979d1 [path history] [tgz]
  1. ambari-metrics/
  2. conf/
  3. screenshots/
  4. src/
  5. pom.xml
  6. README.md
ambari-metrics-grafana/README.md

AMS (Ambari Metrics Service) Datasource Plugin for Grafana

Use ambari-metrics to visualize metrics exposed via AMS in Grafana.

If you already have Ambari Metrics UI as a part of your AMS Install, go here to get started

ToC


Full Dashboard


Install Grafana

You can install Grafana on any host. It does not need to be co-located with Ambari Metrics Collector. The only requirement is that it has network access to Ambari Metrics Collector.

Install on CentOS/Red Hat:

sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm

Install on Ubuntu/Debian:

wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_2.6.0_amd64.deb

Install on SUSE/SLES:

sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm

Deploy ambari-metrics

On your Grafana Server

cp -R ambari/ambari-metrics/ambari-metrics-grafana/ambari-metrics /usr/share/grafana/public/app/plugins/datasource

Start Grafana

sudo service grafana-server start

Access Grafana

http://GRAFANA_HOST:3000 

Add Ambari Metrics Datasource in Grafana UI

Add a Datasource

  • Click on “Datasources”
  • Click on “Add New” at the top

add-datasource

Add a Datasource (continued)

  1. Name of your Datasource
  2. Type = AmbariMetrics
  3. Host+Port of your AMS installation. (usually host:6188)
    • No trailing slashes
    • Nothing else needs to be changed
    • Click on Save.

datasource-details

Test your Datasource

To make sure it's all working, click on Test Connection and you should see a message that says “Data source is working”.

test-datasource


Creating a Dashboard

To create a dashboard

  • Click on Dashboards on the left
  • Click on “Home”
  • Click on New at the bottom of the dropdown

Dashboard Dropdown

To add a panel to your newly created dashboard

  • Click on the green button on the left(see image below)
  • This will expand a flyout menu that will allow you to add a panel
  • Choose Graph / Table / Single Stat

Add Panel

Types of Panels


To add a Graph

  • Choose the Datasource you created earlier
  • Once you've chosen the datasource, you should see the query editor show you some options

Add a Graph

  • Choose the component you wish to see metrics for

Add a Graph

  • Based on the component chosen, you should now see a list of metrics for it

Add a Graph

  • Choose hostname from the list of hosts if you wish to see metrics for a specific host.
    • if hostname isn't chosen, metrics will be shown on a service component level.

Add a Graph

  • By default the aggregator is avg. You can change it via the dropdown
  • You can choose to enable Rate by selecting the checkbox.
  • You can specify precision by checking the box and then selecting “days, hours, minutes or seconds”

Select Options

To change the title of the Panel

  • Click on the “General” tab
  • Enter the name to change the title of the panel

Change Panel Title

To change the Units for your metric

  • You can edit the units of your graph by clicking on Axes & Grid tab and clicking on “unit” as shown.

Change Units

To customise your graphs

  • You can customise your graph by clicking on the Display Styles tab.
  • For ex: you can change the color of a specific metric by choosing a series specific override at the bottom.

series specific override

To Save the Dashboard

  • Click on the save icon next to the dashboard list dropdown on the top to save your dashboard.

Save Dashboard

To Edit a Graph

  • Click on the title of your graph/panel and click on edit.

Edit Graph


Time Ranges

To change the Time Range

  • To change the timerange click on the top right of your UI.
    • This setting affects all your graphs inside the dashboard. If you wish to customise time for a specific graph look here
  • You can use the quick ranges provided or choose a time range of your choice. You can also choose a refresh duration for your dashboard or leave it at “off” to manually refresh.

Timerange

To change the time range of one graph only

  • Use this in case you wish to change the time range for a specific graph without affecting the other graphs in your dashboard
    • Click on the Time Range tab of your Graph
    • You can then enter a value in the “Override Relative time” input box
    • You will be able to confirm that this change has occured by looking at the top right of your graph which will show the override message.
    • You can choose to hide this message if you wish to do so (by checking the “hide time override info”)