Hi Steve, is there a way to update the static threshold at the resource/instance level using one of the already available modules?
Cheers
I don’t believe there currently is any cmdlet for threshold modification outside of the datasource global definition. If that is something that would be helpful to have I can certainly look to add it in the next update. If you want to open it as an issue on github as an enhancement I can notify you when it gets put in the next release.
@StLaurie I had some time this evening and was able to add device group and device instance level alert threshold support in the latest release 4.6.2. See below for the full release notes and example command usage. Let me know if this is along the lines of what you were looking for, hopefully it helps your usecase!
Release 4.6.2
New Commands:
Get-LMDeviceGroupDatasourceAlertSetting: New cmdlet to retrieve alert settings for datasources associated with resources that are a member of a device group. Useful for looking up datasource ids and datapoint info so you can modify group level alert settings using Set-LMDeviceGroupDatasourceAlertSetting.
Set-LMDeviceGroupDatasourceAlertSetting: New cmdlet to set group level alert settings for datasources associated with resources that are a member of a device group.
Get-LMDeviceGroupDatasourceList: New cmdlet to list out datasource info for all datasources associated with a specified device group.
Get-LMDeviceDatasourceInstanceAlertSetting: New cmdlet to retrieve alert settings for datasources instances associated with a resource. Useful for looking up datasource ids and datapoint info so you can modify device/instance level alert settings using Set-LMDeviceDatasourceInstanceAlertSetting.
Set-LMDeviceDatasourceInstanceAlertSetting: New cmdlet to set device/instance level alert settings for datasources associated with a resource.
Example Usage:
Note: Below examples use name parameters to reference portal objects. You should use IDs where possible to avoid excessive look ups when changing configurations in bulk.
#Get list of datasources associated with devices that are a member of the Villa Villardi resource group
Get-LMDeviceGroupDatasourceList -Name "Villa Villardi"
#Get alert seetings for HTTPS datasource at the Villa Villardi resource group level
Get-LMDeviceGroupDatasourceAlertSetting -Name "Villa Villardi" -DatasourceName "HTTPS"
#Disable alerting at the resource group level for the HTTPS -> status datapoint for all resources in Villa Villardi resource group
Set-LMDeviceGroupDatasourceAlertSetting -Name "Villa Villardi" -DatasourceName "HTTPS" -DatapointName Status -DisableAlerting $true
#Get device instance alert settings info for datasource NoData_Tasks_By_Type_v2 where the instance name is ping
Get-LMDeviceDatasourceInstanceAlertSetting -DatasourceName NoData_Tasks_By_Type_v2 -Name 127.0.0.1 -InstanceName ping
#Set device instance alert setting to alert when instance ping has a datapoint named taskCount that has a value > 100 generate a warning
Set-LMDeviceDatasourceInstanceAlertSetting -DatasourceName NoData_Tasks_By_Type_v2 -Name 127.0.0.1 -InstanceName ping -DatapointName taskCount -AlertExpression "> 100"