Skip to content

Commit

Permalink
6.0 pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
stevevillardi committed Apr 18, 2024
1 parent e347dee commit 4334595
Show file tree
Hide file tree
Showing 9 changed files with 796 additions and 226 deletions.
1 change: 1 addition & 0 deletions Documentation/Connect-LMAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,5 +259,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You must run this command before you will be able to execute other commands included with the Logic.Monitor module.
## RELATED LINKS
[PSGallery: https://www.powershellgallery.com/packages/Logic.Monitor]()
154 changes: 154 additions & 0 deletions Documentation/Get-LMAccessGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
external help file: Logic.Monitor-help.xml
Module Name: Logic.Monitor
online version:
schema: 2.0.0
---

# Get-LMAccessGroup

## SYNOPSIS
Retrieves LogicMonitor access groups based on specified parameters.

## SYNTAX

### All (Default)
```
Get-LMAccessGroup [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Id
```
Get-LMAccessGroup [-Id <Int32>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

### Name
```
Get-LMAccessGroup [-Name <String>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

### Filter
```
Get-LMAccessGroup [-Filter <Object>] [-BatchSize <Int32>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
The Get-LMAccessGroup function retrieves LogicMonitor access groups based on the specified parameters.
It supports retrieving access groups by ID, name, or using a filter.
The function uses the LogicMonitor REST API to make the requests.

## EXAMPLES

### EXAMPLE 1
```
Get-LMAccessGroup -Id 123
Retrieves the access group with the specified ID.
```

### EXAMPLE 2
```
Get-LMAccessGroup -Name "MyAccessGroup"
Retrieves the access group with the specified name.
```

### EXAMPLE 3
```
Get-LMAccessGroup -Filter @{ Property = "Value" }
Retrieves access groups based on the specified filter criteria.
```

## PARAMETERS

### -Id
Specifies the ID of the access group to retrieve.
This parameter is mutually exclusive with the Name and Filter parameters.

```yaml
Type: Int32
Parameter Sets: Id
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -Name
Specifies the name of the access group to retrieve.
This parameter is mutually exclusive with the Id and Filter parameters.
```yaml
Type: String
Parameter Sets: Name
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Filter
Specifies a filter object to retrieve access groups based on custom filter criteria.
This parameter is mutually exclusive with the Id and Name parameters.
```yaml
Type: Object
Parameter Sets: Filter
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -BatchSize
Specifies the number of access groups to retrieve per request.
The default value is 1000.
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 1000
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
This function requires a valid LogicMonitor API authentication.
Use Connect-LMAccount to authenticate before running this function.
## RELATED LINKS
140 changes: 140 additions & 0 deletions Documentation/Get-LMDeviceInstanceData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
external help file: Logic.Monitor-help.xml
Module Name: Logic.Monitor
online version:
schema: 2.0.0
---

# Get-LMDeviceInstanceData

## SYNOPSIS
Retrieves data for LogicMonitor device instances.

## SYNTAX

```
Get-LMDeviceInstanceData [[-StartDate] <DateTime>] [[-EndDate] <DateTime>] [-Ids] <String[]>
[[-AggregationType] <String>] [[-Period] <Double>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
The Get-LMDeviceInstanceData function retrieves data for LogicMonitor device instances based on the specified parameters.

## EXAMPLES

### EXAMPLE 1
```
Get-LMDeviceInstanceData -StartDate (Get-Date).AddHours(-7) -EndDate (Get-Date) -Ids "12345", "67890" -AggregationType "average" -Period 1
Retrieves data for the device instances with IDs "12345" and "67890" for the past 7 hours, using an average aggregation and a period of 1 day.
```

## PARAMETERS

### -StartDate
The start date for the data retrieval.
If not specified, the function uses the default value of 24 hours ago which is the max timeframe for this endpoint.

```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -EndDate
The end date for the data retrieval.
If not specified, the function uses the current date and time.
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Ids
The array of device instance IDs for which to retrieve data.
This parameter is mandatory.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases: Id

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AggregationType
The type of aggregation to apply to the retrieved data.
Valid values are "first", "last", "min", "max", "sum", "average", and "none".
The default value is "none".
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Period
The period for the data retrieval.
The default value is 1.
```yaml
Type: Double
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
This function requires a valid LogicMonitor API authentication.
Make sure to log in using Connect-LMAccount before running this command.
## RELATED LINKS
72 changes: 72 additions & 0 deletions Documentation/New-LMAlertEscalation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
external help file: Logic.Monitor-help.xml
Module Name: Logic.Monitor
online version:
schema: 2.0.0
---

# New-LMAlertEscalation

## SYNOPSIS
Creates a new escalation for a LogicMonitor alert.

## SYNTAX

```
New-LMAlertEscalation [-Id] <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
The New-LMAlertEscalation function creates a new escalation for a LogicMonitor alert.
It checks if the user is logged in and has valid API credentials before making the API request to create the escalation.

## EXAMPLES

### EXAMPLE 1
```
New-LMAlertEscalation -Id "DS12345"
Creates a new escalation for the alert with ID "12345".
```

## PARAMETERS

### -Id
The ID of the alert for which the escalation needs to be created.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -ProgressAction
{{ Fill ProgressAction Description }}
```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
Loading

0 comments on commit 4334595

Please sign in to comment.