<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10pt" ><div dir="ltr" >Hello Heiner,</div>
<div dir="ltr" > </div>
<div dir="ltr" >we had written an Icinga-integration for Spectrum Scale years ago, the Bash script is still available here:</div>
<div dir="ltr" ><a href="https://gitlab.com/itsmee/icinga/-/blob/master/check_spectrumscale.sh">https://gitlab.com/itsmee/icinga/-/blob/master/check_spectrumscale.sh</a></div>
<div dir="ltr" > </div>
<div dir="ltr" >Within this script we had defined two generic functions: <code>getColumnNoByHeader<span class="o" >()</span></code> and <code>getColumnValueByColHeader()</code>. These allow extraction of data from ':'-separated command output, and have served me well ever since... I'm not aware of any formal library for this purpose.</div>
<div dir="ltr" > </div>
<div dir="ltr" >-------------------------------------------------------------------------------<br>Mit freundlichen Grüßen / Kind regards - Achim Christ<br> </div>
<div class="mail-signature-container" dir="ltr" > </div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- Original message -----<br>From: "Billich Heinrich Rainer (ID SD)" <heinrich.billich@id.ethz.ch><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org><br>Cc:<br>Subject: [EXTERNAL] [gpfsug-discuss] Parse -Y command output<br>Date: Wed, May 27, 2020 10:56<br> 
<div><font size="2" face="Default Monospace,Courier New,Courier,monospace" >Hello,<br><br>I wonder if any python or bash functions exist to parse the output of mm-command's -Y format, i.e. colon-separated with HEADER rows. I would be nice to convert the output to a python list of named tuples or even better pandas dataframe.  I would like to access the  values by column name and row index. This would allow  to do quick scripts or  reports easily. Imagine using a jupyter notebook to dig into mmrepquota or mmlsdisk output, even doing charts, ..., easily.<br><br>I know the ReST interface does exisit, which I could call to get the data in Json format, but to parse the Y-format seems much less cumbersome and allows to collect the data at one time and process it later.<br><br>If you have other suggestions please let me know. What I would like to get:<br>A list of NSDs which shows the connection to vdisk-set. Vdisk, recovery group and ESS system for each NSD. To get this I need to merge at least two tables.<br>A list of user of fileset quota values highlighting those having non-default vaulues or close to the limit.<br>The ability to get the data quickly in an uniform way into some tool, preferably python, to do analysis or formatting.<br><br>Cheers,<br><br>Heiner<br><br>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a> </font><br> </div></blockquote>
<div dir="ltr" > </div></div><BR>