NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

WFA : Getting an Output of a SQL Query in a Mail

raj_shrivastava11
3,709 Views

Hi Guys,

 

I am trying to write a Workflow to get a list of all "offline" volume in a filer.

 

I have written a below SQL Query which will give me a list of volumes which are "offline" or have an gaurantee as "volume"

 

Now i m trying to get this complete output in a mail but unable to get it done. I have created a filter also but unable to proceed further.

 

Kindly help

 

BR

Raj

 

SELECT
volume.name,
volume.state,
volume.volume_guarantee
FROM
storage.volume,
storage.array
WHERE
(
storage.array.name = '${array}'
OR storage.array.ip = '${array}'
)
AND volume.array_id = array.id
AND (
volume.state not like "online"
OR volume.volume_guarantee = 'volume'
)

1 ACCEPTED SOLUTION

coreywanless
3,694 Views

WFA isn't necessarily the platform for this type of work. I have actually built my own dashboard that performs the queries against the WFA database.  I have built it with apache and php.

 

Anyways, onto your question. You can do this from WFA.  You will just need to build a custom command to do that for you.  Instead of doing it within the User Inputs section, you can use a custom command to run the powershell command "invoke-mysqlquery".  Then you can format that however you want, and use the 'send-mailmessage' command to send an email with the data.

View solution in original post

2 REPLIES 2

coreywanless
3,695 Views

WFA isn't necessarily the platform for this type of work. I have actually built my own dashboard that performs the queries against the WFA database.  I have built it with apache and php.

 

Anyways, onto your question. You can do this from WFA.  You will just need to build a custom command to do that for you.  Instead of doing it within the User Inputs section, you can use a custom command to run the powershell command "invoke-mysqlquery".  Then you can format that however you want, and use the 'send-mailmessage' command to send an email with the data.

raj_shrivastava11
3,636 Views

Thanks

Public