Skip to content

Commit

Permalink
Added serviceevent param
Browse files Browse the repository at this point in the history
  • Loading branch information
rumart committed Aug 14, 2019
1 parent 01d149e commit bf2d454
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Binary file modified GlobalDashboardPS/GlobalDashboardPS.psd1
Binary file not shown.
14 changes: 12 additions & 2 deletions GlobalDashboardPS/Public/Get-OVGDResourceAlert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ function Get-OVGDResourceAlert {
Info
Author : Rudi Martinsen / Intility AS
Date : 24/04-2019
Version : 0.4.0
Revised : 25/04-2019
Version : 0.5.0
Revised : 14/08-2019
Changelog:
0.5.0 -- Added param for ServiceEvents
0.4.0 -- Reworked output
0.3.0 -- Added Id param, Fixed output when returning single result
0.2.0 -- Added support for querying and changed warning when result is bigger than count
Expand All @@ -33,6 +34,8 @@ function Get-OVGDResourceAlert {
Filter on the HealthCategory of the Alert Template to retrieve. Note that we search for an exact match
.PARAMETER Severity
Filter on the Severity of the Alert Template to retrieve. Note that we search for an exact match
.PARAMETER ServiceEvent
Filter on if the alert is a ServiceEvent or not.
.PARAMETER AssignedTo
Filter on the AssignedToUser of the Alert Template to retrieve. Note that we search for an exact match
.PARAMETER State
Expand Down Expand Up @@ -78,6 +81,9 @@ function Get-OVGDResourceAlert {
[Parameter(ParameterSetName="Query")]
$AssignedTo,
[Parameter(ParameterSetName="Query")]
[switch]
$ServiceEvent = $false,
[Parameter(ParameterSetName="Query")]
$UserQuery,
[Parameter(ParameterSetName="Default")]
[Parameter(ParameterSetName="Query")]
Expand Down Expand Up @@ -119,6 +125,10 @@ function Get-OVGDResourceAlert {
$searchFilters += 'assignedToUser EQ "' + $AssignedTo + '"'
}

if($ServiceEvent){
$searchFilters += 'serviceEventSource EQ "' + $ServiceEvent + '"'
}

if($UserQuery){
$txtSearchFilters += "$UserQuery"
}
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support paging (#8)
- Scriptanalyzer test

## [version 0.9.1] - 2019-08-14

### Changed

- Changed Get-OVGDResourceAlert so it supports queries for ServiceEvents

## [version 0.9.0] - 2019-04-25

### Added
Expand Down

0 comments on commit bf2d454

Please sign in to comment.