Could you help find a solution to get the alerts from vRealize Operations Manager and export as a excle file?
Have a look at Kim's post named Exporting vROps reports continuously using PowerShell
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!
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.
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
---- ---- ------- ------ ----------- --------
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.
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.
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!
How to create a report which contain the alerts that we need?
Thank you for your help in advance!
Dashboard > Views > Add
1. enter view name
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.
Dashboard > Reports > Add
1. enter report name
2. use data type views. select the view name you created.
3. Format, select CSV