Active IQ Unified Manager Discussions

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

raj_shrivastava11
2,492 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
2,477 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
2,478 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
2,419 Views

Thanks

Public