Developer Network Articles and Resources

Query Graphite DB using Powershell


Recently I came across querying the graphite db of a customer to get raw performance data. Formerly the customer regularly gathered the data for its 7mode systems about the cifs and nfs iops in a particular time frame from Performance Advisor. The data is used to check the amount of IOPS for each controller. For cDOT there is currently no report and the raw data from OPM is not detailed enough. So the aim was to extract the raw data from its graphite / grafana source where all cDOT Systems are monitored with a minute interval.


So I wrote two functions to get the data from the graphite db and convert it into a custom powershell object. The resulting object can then easily be converted to a csv file by piping the output to the export-csv cmdlet for example. However, the custom object can be used for any other further development in powershell.


Thought I'd share these functions as someone else might have the need to query the graphite db from powershell. The first function invokes a web request to get the raw data from the database in json format. The second function converts the json output into a custom powershell object.


There are parameters for the graphite db query function to specify the target and from and until dates. For further details please see the comment-based help in the powershell code.


For the complete documentation of the graphite api please see


If you save the attached text file as .psm1 file you can easily use the functions by importing the module with the import-module cmdlet.


Happy powershell scripting! 

Please Note:

All content posted on the NetApp Community is publicly searchable and viewable. Participation in the NetApp Community is voluntary.

In accordance with our Code of Conduct and Community Terms of Use, DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information (PII)
  • Copyrighted materials without the permission of the copyright owner

Continued non-compliance may result in NetApp Community account restrictions or termination.

All Community Forums