How To Send a Report to Slack

  • 8 September 2023
  • 1 reply
  • 117 views

Userlevel 1
Badge +1

The Reporting feature of Nutanix Cloud Manager Intelligent Operations enables you to create reports and schedule them to be e-mailed on a regular basis. But did you know you can also send these reports to Slack? 

While the reporting framework currently only allows you to specify e-mail, you can set up a time-based playbook using Nutanix’s low-code/no-code automation tool (also known as X-Play), along with the Generate Report and Slack actions.

Note: Be sure to set up your Slack app as per the documentation. You’ll also need to ensure that the file:write permission scope is granted to the app.

Once you have a report configured, set up your playbook. 

From the main Prism Central 2023.3 dashboard, select Intelligent Operations from the drop down menu, then navigate to the hamburger menu > Playbooks. Alternatively, just search for Playbooks in the search bar.

 

2QHFAL6v3t7Sqe93aw5C2BNiyd5TbE71cpF0kwxMc0WDYKVjnQGY9hBksowgh4VzaI9KU_p3NuBuq0SlLMhqjC9Iox5x9AcVaI8XgK6rLYZAoRBpn5ld34tkhlW9anbywSFv7M40JVCIANe2cBXmFMU

IPQBQaWz-X4Sml2T9S0_46A6cWfoT_aWX1dR85pPuuDhd_yOK-e0eyZECUVpvrP4YFSkrv5JBXydtjN5MXeNTdgJfkkNd9Ov11XTJaPFRoVBWebALHxjmhKiolGbfepbqSBlPwBN6n3ffGAtcPERM4E

 

Click on Create Playbook, then select the Time trigger.

eN4sty8s-pN0wLSk7QAA4uKQ79iqUKSaPs7miN10DVFXcsLz6u2M_CTLq6dIXrIJk2Q86gw2cHKyo8_alyKo3W6V6MT7XNd-DvpVkSwxILMp3gjFqVQv7LIYTGbGEg3m-W5hozkNc_ixQND293DFFbo

Specify the schedule you want the playbook to run on (i.e. how often you want the report generated and sent).

 

goawqHDVRdaUJhHOuDccqnbURfPwRFeV51VQliAp8fD6vXo3gQQ60ak34P6XAnpQ8u3KAPWTskcntEbjjkRjI5P7evJEWwPUMxhZU7ySaUDelGmMxhWbIMK--_ofzzXujfp14auepf1uvZKWJJjWo78

 

Then, click Add Action, search for Generate Report, and fill out the following:

edMEeYJXoLlMeqtu3nx6i6QXTkAz7DKAHu5XSR58z4e_K-VEijTDoVs3o-Uwm-eH00vajEGRVOvrTPQtm6x1LY-a2zPpYljLnfrFcG_L2D-goYu7G5gACwNSeRYm4RuXAcz9LE3ZkF8bN0sSdtp4Vmo

  • Report Type - The report configuration you want to run
  • Report Instance Name - what to call this instance of the report, e.g. xplay
  • Optional description
  • Time Period for Report 
  • Report Format - PDF or CSV

 

E5uM-mYwrxMTzCDeIe9yev_3fanDEgiImgGpGSgAw78KyVDLdDYcXhfAYBkV9jtHH0A7lt5n9g11hZIJxF_pia8sjl70hyBSzLAKLhPnJoxPSIH6HbQX_h3Yoz3fm-8z11i4FVsGqZtvVNdoD_xRe40

 

Click Add Action again, search for Slack, and fill out the following:

  • Slack Token - OAuth access token for your Slack instance
  • Channel Name - The channel name of the instance you want to send the report to
  • Message - Content of the slack message
  • Attachment - click Parameters, and select the Report from the previous action.

Autr7BPAW04RP1Uf-eWmRyJmG1CW0KzSU4bo35ciy8148ZquRCpSX8SWiO_kIXvBSj9btGxAXXl9ffVtkJ55kg7dm-Z_IVFJ2Z-671-Wfdi8du8ujPsI-JKLndZ8Rn3J4ykx8khApJg09C8LiulP-aQ

Save and enable the playbook by clicking Save and Close, giving the playbook name, toggling “Enable” on, and clicking Save.

itrEYPdoZ1N4EBKygq9IqqRcSuw5R6kHt9PNyVq5jCMPnNoK8AqBVD3seYt5DQmi2Xpf0072riSnSiVoKdM1vRRJnt7qLTSWCx1rIrJRdPE58m6VSWrtodgLGjIPU4IYPvnPXW5amMZaukeXeLOFlHk

That’s it! Now your report is scheduled to be sent to Slack on an ongoing basis.

-X0InbZZr1qpKZ3GGW5vJSk3XrPktqi-Vl2mGlGa3uSME9CL-tQXL7mMSLKX4MBRlq2khdA7xjIcvzEr3fhnt0fgyNo0TEUP3Hz8sASWBRfOP_eyb78Zcw-8g_HkHd2bE5v4zPC8GDLtINfE99Xg3tY

To troubleshoot any issues, click on the playbook name in the main playbook list. Then click Plays to view  a list of the playbook executions. You can get more details by clicking on the playbook name and expanding the actions.

SOH7Nc4_eHZEoo3WeNuvCj-jlcxfE9wkkw9ruMJ94QsCAs1bE8tFtUXoyanYaabYrNdqOkoPxHb_VnLdAJg5Aa9FhkhI1QeLk1SsV0bqyx2EU-tZQr5LSCkOpCnQYdFOKK4dJjGO4ZtZHTzX0db9j04

 


This topic has been closed for comments

1 reply

Userlevel 5
Badge +6

That’s amazing, thank you @laura_jordana for your effort!