VMware Cloud Community
minan2870
Contributor
Contributor

Regard to get the alerts from vRealize Operations Manager

Hello,

Could you help find a solution to get the alerts from vRealize Operations Manager and export as a excle file?

vRealize Operations Manager.png

Reply
0 Kudos
9 Replies
LucD
Leadership
Leadership

Have a look at Kim's post named Exporting vROps reports continuously using PowerShell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
minan2870
Contributor
Contributor

Hello LucD,

For this case, there are two problems I need to face.

First is I only got the cmdlet get-omalert for fetching all alerts from vRops server. I tried to search the relevant of details for instruction, but there is almost nothing. Could you give some documentations.

Second is I will try to export the result of excuting cmdlet as a excle file. So the documents from you is perfect for me.

Thank you for you help!

Kind Regards,

Reply
0 Kudos
LucD
Leadership
Leadership

Did you check the links that Kim added in his post?

The series by Ryan, starting with vROps Reports and PowerCLI Part 1: Generating Reports, goes into a more detailed explanation.

For exporting the data to a CSV file you can use the basic Export-Csv cmdlet.

For a full-fledged XLSX file, have a look at Doug's ImportExcel module.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
minan2870
Contributor
Contributor

Hello LucD,

For cmdlet of Get-OMAlert, are there columns of timestamp and ID  in result? As normal, there are only Name, Type, Subtype, Impact, Criticality, Resource columns in result. I want to get more columns ID and timestamp in result.

Thanks a lot!

Name                              Type                 Subtype              Impact  Criticality     Resource

----                              ----                 -------              ------  -----------     --------

Reply
0 Kudos
LucD
Leadership
Leadership

Sorry, I don't use vROps that much.
And no, I don't know if there is a way to get the ID and Timestamp.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
mghal40
Enthusiast
Enthusiast

Why not use a report? Create a View with the Subject as Alert, select the fields you need, and run it against All vROPS Objects?

Then you can create a report and have it scheduled. We're doing this for a weekly report on our Critical alerts.

Reply
0 Kudos
minan2870
Contributor
Contributor

Hello mghal40,

Thank you for your solution! In fact, I don't care which kind of solution can reach to the target. I only want to fetch the data which should correspond with my requirement.

=> For fetching the corresponding data, I have to filter the result. So the timestamping should be as the filter condition. But there is noting of columns timestamping in which I fetch the result by Get-OMAlert cmdlet.

=>For the result, I especially care of whether two columns of timestamping and ID can be added into.

Could you have an idea for this?

Thank you in advance!

Reply
0 Kudos
minan2870
Contributor
Contributor

Hello maghal40,

How to create a report which contain the alerts that we need?

Thank you for your help in advance!

BR

Reply
0 Kudos
mghal40
Enthusiast
Enthusiast

Try this.

Dashboard > Views > Add

    1. enter view name

    2. list

    3. Enter subject use alerts rollup for this example (virtual machine, alert, alerts rollup etc)

    4. Use Metrics then select which fields you want to collect.

        (using alert rollup metrics, grab Description, Criticality Level, Affected Resource Count

    5. Decide what you want the view visible to.

Next

Dashboard > Reports > Add

    1. enter report name

    2. use data type views. select the view name you created.

    3. Format, select CSV

    Save report

Reply
0 Kudos