Community Related Discussions

My article about query graphite db with powershell is unavailable

skellner

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

LABELS:

·         Software Development Kit (SDK) and API

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 

http://graphite.readthedocs.io/en/latest/render_api.html

 

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! 

1 ACCEPTED SOLUTION

AndrisG

Hi @skellner

 

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!

 

Best regards,

AndrisG (NetApp community administrator & moderator)

View solution in original post

2 REPLIES 2

AndrisG

Hi @skellner

 

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!

 

Best regards,

AndrisG (NetApp community administrator & moderator)

View solution in original post

skellner

Cool, thx

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public