Use ambari-metrics to visualize metrics exposed via AMS in Grafana.
ToC
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
On your Grafana Server
cp -R ambari/ambari-metrics/ambari-metrics-grafana/ambari-metrics /usr/share/grafana/public/app/plugins/datasource
sudo service grafana-server start
http://GRAFANA_HOST:3000
Add a Datasource
- Click on “Datasources”
- Click on “Add New” at the top
Add a Datasource (continued)
- Name of your Datasource
- Type = AmbariMetrics
- Host+Port of your AMS installation. (usually host:6188)
- No trailing slashes
- Nothing else needs to be changed
- Click on Save.
To make sure it's all working, click on Test Connection and you should see a message that says “Data source is working”.
To create a dashboard
- Click on Dashboards on the left
- Click on “Home”
- Click on New at the bottom of the 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