Graphite (http://graphite.readthedocs.org/en/latest/) is a open source monitoring tool that is used for storing numeric time-series data and for rendering basic graphs from this data.
Grafana (http://grafana.org/) is a open source visualization dashboard software that can be used to render graphs from the data within graphite.
This document covers an example of using these tools to display status from Pure arrays.
The Pure REST API is available for automation and monitoring Pure Storage arrays. It provides a secure way of retrieving details about the array.
You will need to generate an API token for usage in the script described below. Generating a token is the only array-side configuration required.
The assumption below is you have functioning graphite server that is configured to received plaintext data via Carbon.
See the detail in: http://graphite.readthedocs.org/en/latest/feeding-carbon.html
Included in this github project is a perl script (graphite-purestats.pl) that can query one or more Pure arrays (via their API) and return the data in a format useful for graphite.
On lines 15 and 16, set the keys and values of the hash to be the hostnames and API tokens for those hostnames respectively. The script will query each of these arrays in turn.
This script outputs the formatted data via STDOUT. Using netcat you can then send that data to your graphite server. It is common to set this command to be a regular cron job:
*/5 * * * * ./purestats.pl | nc -w 2 graphiteserver.mycompany.com 2003
Hostname is "dogfood-snausage" Volume names are "build01", "workloads01", "workloads02", "workloads03", and "workloads04"
Example output:
purity.dogfood-snausage.used 44138771525632 1454016926
purity.dogfood-snausage.max 55987505333248 1454016926
purity.dogfood-snausage.vol.workloads01.used 2757878437888 1454016926
purity.dogfood-snausage.vol.workloads01.max 10995116277760 1454016926
purity.dogfood-snausage.vol.workloads02.used 1741355125760 1454016926
purity.dogfood-snausage.vol.workloads02.max 10995116277760 1454016926
purity.dogfood-snausage.vol.workloads03.used 1705753866240 1454016926
purity.dogfood-snausage.vol.workloads03.max 10995116277760 1454016926
purity.dogfood-snausage.vol.workloads04.used 1473153178624 1454016926
purity.dogfood-snausage.vol.workloads04.max 10995116277760 1454016926
purity.dogfood-snausage.vol.build01.used 1263123253248 1454016926
purity.dogfood-snausage.vol.build01.max 10995116277760 1454016926
Full instructions for the usage of Grafana is outside of the scope of this document. However, as illustrated above there are two basic groupings of data.
Overall array usage is reported as:
- purity.HOSTNAME.used
- purity.HOSTNAME.max
Per volume usage is reported as:
- purity.HOSTNAME.VOLNAME.used
- purity.HOSTNAME.VOLNAME.max
In this project is a screen capture of an example grafana dashboard: grafana-dashboard.jpg
Each of the individual graphs in this example represent a pure array. They are produced by graphing the array max versus the array used.
IE: purity.dogfood-snausage.max and purity.dogfood-snausage.used
The chart options was selected to be "Lines" with a line width of 1. A series specific override of "line fill: 5" was applied to the "used" dataset.
This can be done similarly for volumes.