2017-04-11 06:02 AM
On the 3rd of April I wrote an article about a powershell module to query the graphite db and requested to publish it. Right now I can't find it anymore even in my drafts. Could you please check. Following a copy I made.
Query Graphite DB using Powershell
by skellner 2 hours ago - last edited 14 seconds ago
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!
Solved! SEE THE SOLUTION
2017-04-11 10:00 AM
I just checked and fortunately found the article you had saved as a draft - now it's published and available here: https://community.netapp.com/t5/Developer-Network-Articles-and-Resources/Query-Graphite-DB-using-Powershell/ta-p/129728
Please let me know if you need any further assistance!
AndrisG (NetApp community administrator & moderator)