<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to email filter details in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/how-to-email-filter-details/m-p/100196#M17680</link>
    <description>&lt;P&gt;Step1:&lt;/P&gt;&lt;P&gt;======&lt;/P&gt;&lt;P&gt;Dump the filtered data in an XCEL.&lt;/P&gt;&lt;P&gt;How you can do it?&lt;/P&gt;&lt;P&gt;Please see the sample code below.&lt;/P&gt;&lt;P&gt;This is the "Create CSV Report-FLI" available in &lt;A href="http://automationstore.netapp.com," target="_blank"&gt;http://automationstore.netapp.com,&lt;/A&gt; under the "OFFLine Foreign Lun Import pack".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use strict;&lt;BR /&gt;use Getopt::Long;&lt;BR /&gt;use WFAUtil;&lt;/P&gt;&lt;P&gt;my $FileName;&lt;BR /&gt;&lt;STRONG&gt;my $FileNamePrefix = 'lun_report';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();&lt;BR /&gt;$mon++;&lt;BR /&gt;$year += 1900;&lt;BR /&gt;my $CurrentTime = $mday . "_" . $mon . "_" . $year . "__" . $hour . "_" . $min . "_" . $sec;&lt;/P&gt;&lt;P&gt;#Creating CSV file name&lt;BR /&gt;&lt;STRONG&gt;$FileName = $FileNamePrefix . "_" . $CurrentTime . ".csv";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my $wfa_util = WFAUtil-&amp;gt;new();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$wfa_util-&amp;gt;sendLog('INFO', 'Creating CSV file: ' . $FileName);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my $query="SELECT * FROM lun_import"; &lt;EM&gt;--&amp;gt;Here you need to put your volume query.&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my $database="playground";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my @data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my $length;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;eval {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;@data = $wfa_util-&amp;gt;invokeMySqlQuery($query,$database);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$length = @data;&lt;/P&gt;&lt;P&gt;open(FILE, "&amp;gt;$FileName"); # Open for output&lt;BR /&gt;print FILE "id,vserver_name,foreign_disk,path,import_home_node,administrative_status,compared_blocks,estimated_remaining_duration,".&lt;BR /&gt;"import_current_node,imported_blocks,operation_in_progress,operational_status,percent_complete,total_blocks,failure_reason,cluster,is_deleted\n";&lt;/P&gt;&lt;P&gt;for (my $index =0; $index &amp;lt; $length; $index++)&lt;BR /&gt;{&lt;BR /&gt;if ($data[$index] ne "\n")&lt;BR /&gt;{&lt;BR /&gt;if ($data[$index] eq "")&lt;BR /&gt;{&lt;BR /&gt;print FILE "-,";&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;print FILE "$data[$index]" . ",";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;print FILE $data[$index];&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close(FILE); # Closing file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Step:&lt;/P&gt;&lt;P&gt;Send the File.&lt;/P&gt;&lt;P&gt;Please use the "Send Email" code, which is part of WFA release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to customize "Send Email" for attaching the CSV file created in the above segment.&lt;/P&gt;&lt;P&gt;Sample code here.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.techrepublic.com/blog/windows-and-office/send-an-email-with-an-attachment-using-powershell/" target="_blank"&gt;http://www.techrepublic.com/blog/windows-and-office/send-an-email-with-an-attachment-using-powershell/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===============&lt;/P&gt;&lt;P&gt;Put approval point after that.&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;Followed by the next command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Feb 2015 12:32:38 GMT</pubDate>
    <dc:creator>abhit</dc:creator>
    <dc:date>2015-02-05T12:32:38Z</dc:date>
    <item>
      <title>how to email filter details</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/how-to-email-filter-details/m-p/100186#M17676</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am bulding a workflow to monitor volumes and exapnd vol sizes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had written a filter that gets all volumes sizes above "threshold" and i want to mail all these details for approval.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here my questions are&lt;/P&gt;&lt;P&gt;1)how to get all details returned by filter&lt;/P&gt;&lt;P&gt;2)How to email these details&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:09:53 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/how-to-email-filter-details/m-p/100186#M17676</guid>
      <dc:creator>Aswani_Kumar</dc:creator>
      <dc:date>2025-06-05T05:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to email filter details</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/how-to-email-filter-details/m-p/100196#M17680</link>
      <description>&lt;P&gt;Step1:&lt;/P&gt;&lt;P&gt;======&lt;/P&gt;&lt;P&gt;Dump the filtered data in an XCEL.&lt;/P&gt;&lt;P&gt;How you can do it?&lt;/P&gt;&lt;P&gt;Please see the sample code below.&lt;/P&gt;&lt;P&gt;This is the "Create CSV Report-FLI" available in &lt;A href="http://automationstore.netapp.com," target="_blank"&gt;http://automationstore.netapp.com,&lt;/A&gt; under the "OFFLine Foreign Lun Import pack".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use strict;&lt;BR /&gt;use Getopt::Long;&lt;BR /&gt;use WFAUtil;&lt;/P&gt;&lt;P&gt;my $FileName;&lt;BR /&gt;&lt;STRONG&gt;my $FileNamePrefix = 'lun_report';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();&lt;BR /&gt;$mon++;&lt;BR /&gt;$year += 1900;&lt;BR /&gt;my $CurrentTime = $mday . "_" . $mon . "_" . $year . "__" . $hour . "_" . $min . "_" . $sec;&lt;/P&gt;&lt;P&gt;#Creating CSV file name&lt;BR /&gt;&lt;STRONG&gt;$FileName = $FileNamePrefix . "_" . $CurrentTime . ".csv";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my $wfa_util = WFAUtil-&amp;gt;new();&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;$wfa_util-&amp;gt;sendLog('INFO', 'Creating CSV file: ' . $FileName);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;my $query="SELECT * FROM lun_import"; &lt;EM&gt;--&amp;gt;Here you need to put your volume query.&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my $database="playground";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my @data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;my $length;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;eval {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;@data = $wfa_util-&amp;gt;invokeMySqlQuery($query,$database);&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$length = @data;&lt;/P&gt;&lt;P&gt;open(FILE, "&amp;gt;$FileName"); # Open for output&lt;BR /&gt;print FILE "id,vserver_name,foreign_disk,path,import_home_node,administrative_status,compared_blocks,estimated_remaining_duration,".&lt;BR /&gt;"import_current_node,imported_blocks,operation_in_progress,operational_status,percent_complete,total_blocks,failure_reason,cluster,is_deleted\n";&lt;/P&gt;&lt;P&gt;for (my $index =0; $index &amp;lt; $length; $index++)&lt;BR /&gt;{&lt;BR /&gt;if ($data[$index] ne "\n")&lt;BR /&gt;{&lt;BR /&gt;if ($data[$index] eq "")&lt;BR /&gt;{&lt;BR /&gt;print FILE "-,";&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;print FILE "$data[$index]" . ",";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;print FILE $data[$index];&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close(FILE); # Closing file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second Step:&lt;/P&gt;&lt;P&gt;Send the File.&lt;/P&gt;&lt;P&gt;Please use the "Send Email" code, which is part of WFA release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to customize "Send Email" for attaching the CSV file created in the above segment.&lt;/P&gt;&lt;P&gt;Sample code here.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.techrepublic.com/blog/windows-and-office/send-an-email-with-an-attachment-using-powershell/" target="_blank"&gt;http://www.techrepublic.com/blog/windows-and-office/send-an-email-with-an-attachment-using-powershell/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===============&lt;/P&gt;&lt;P&gt;Put approval point after that.&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;Followed by the next command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 12:32:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/how-to-email-filter-details/m-p/100196#M17680</guid>
      <dc:creator>abhit</dc:creator>
      <dc:date>2015-02-05T12:32:38Z</dc:date>
    </item>
  </channel>
</rss>

