ContributionsMost RecentMost LikesSolutionsRe: Logic.Monitor (PowerShell) module Thanks for creating this. We’ve been using it for a while and ran into a strange issue with authentication on Linux. It works perfectly when we run from a Windows machine, but if we run from a Linux machine (pwsh), we get authentication errors even though the credentials aren’t changed. I’m not sure if this is generally an issue with Linux PowerShell or specific to the module, but thought I’d mention in case it was perhaps a known issue. Here is the type of error we see (the error shows on the LM logs too…but again, the auth credentials are unchanged from what works when the same script is run from a Windows box): Out-PsLogging: [ERROR] 2024-03-02T17:47:29: Unexpected error getting device groups. To prevent errors, Get-LogicMonitorDeviceGroup will exit. If present, the following details were returned: Error message: Authentication failed Error code: 1401 Invoke-Request: Response status code does not indicate success: 401 (). Headers: Name Value ---- ----- X-Version 3 Content-Type application/json Authorization LMv1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx… Body: @S P are you sure you’re talking about the Logic.Monitor ps module? The cmdlet name is not one that I recognize and the error output is different. The Logic.Monitor module is tested on 5.1 and core 7+ for both linux/win OSes so there should not be an issue specific to linux that does not effect windows users as well. Re: Logic.Monitor (PowerShell) module @Steve Villardi I was looking at the get-lmalert one and trying to use the customColumns part to get the ##externalticketid## field back. I tried a few different ways to encode it in PowerShell but it did not seem to work properly or I am just doing it wrong. Have you done it before to get the ticket id back since that is the field where things like a ServiceNow incident # would appear? @Jeff Batchelor Should just able able to specify it in double quotes: “##externalticketid##”. How are you building your command. Below is an example for reference: Get-LMAlert -Id DS15713155 -CustomColumns "##EXTERNALTICKETID##" | select -ExpandProperty customColumns Response: Re: Logic.Monitor (PowerShell) module Hi, I am stringing together a few of your commands to setup Collectors, Resources, Dashboards etc so things are setupconsistently. Do you have any plans for: “Creating ReportGroup”? (Would be pretty similar to: New-LMDashboardGroup) I seeGet-LMReportGroup.ps1 but not a new-LMReportGroup yet. @ryang I can certainly add it into the next update.If there are other commands that would be of use please feel free to open an enhancement issue on the github repo. @ryang I have add support for New/Set/Remove cmdlets for report groups in the latest pull request on github. If you want to grab the updates from there feel free to do so, if your not in a hurry you can also just wait for the 5.0.1 release sometime next week which will have these changed included. Re: Logic.Monitor (PowerShell) module Hi, I am stringing together a few of your commands to setup Collectors, Resources, Dashboards etc so things are setupconsistently. Do you have any plans for: “Creating ReportGroup”? (Would be pretty similar to: New-LMDashboardGroup) I seeGet-LMReportGroup.ps1 but not a new-LMReportGroup yet. @ryang I can certainly add it into the next update.If there are other commands that would be of use please feel free to open an enhancement issue on the github repo. Re: UCS C -Rack server I will Check this @Steve Villardi , thanks for your swift suggestion. No problem, if its your first time using the UCS modules, I will link the support article in case you have any questions:https://www.logicmonitor.com/support/monitoring/networking-firewalls/cisco-ucs-monitoring Re: UCS C -Rack server I would think that the DatasourceCisco_UCS_RackServerComponentswould monitor DIMM status but I do not have a rack server to validate. You can find it in the LMX via locator id:NDLANZ. Let me know if that helps! Re: Logic.Monitor (PowerShell) module 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 therecurrently 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 parametersto 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" Re: Logic.Monitor (PowerShell) module 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 therecurrently 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. Re: Logic.Monitor (PowerShell) module @Steve Villardi Awesome - thanks so much for the super quick turn around. Really appreciate it. My only other gentle suggestion is to use Write-Output instead of Write-Host for Write-LMHost as commands can then have their output sent to $null resulting in no output to the host/console. Happy to create a pul request on the repo. Thanks again! _Loz @StLaurie Feel free to open a pull request. Most of the write-lmhost should really be moved to debug/verbose output for the most part but I need to go through and add in cmdletbinding functionality. It’s been on my list to clean up just have yet to get to it. But always appreciate the feedback! Re: Logic.Monitor (PowerShell) module Fantastic Module, but adding#Requires -Version 7to 4.5.6 inBuild-LMDataModel.ps1 &Submit-LMDataModel.ps1has effectively killed the module for me in a corporate setting. Some backwards compatibility or reduction in function while still allowing other modules to work would be excellent. Apologies for the recent update, did not realize that the requires on those two cmdlets would break the module elsewhere. I have pushed a 4.5.7 out which rolls back that change until I can find a better method to control version requirements. @StLaurie So Ihave pushed out a version 4.6 that removes the “utility” cmdlets that I originally had included in the Logic.Monitor module awhile back. These are no longer part of the module suite and were mainly used by me so it did not make sense to keep them in the module any longer. Going forward only API cmdlets will be published in this module as to keep things clean and organized better than it was before. This should help with the frequent updates that have nothing to do with the API wrapper functionality and avoid introducing breaking changes unintentionally. I am also working on introducing version 5.1 of pwsh in my pester testing to ensure backwards compatibility with older versions of PowerShell are not effected. Appreciate you bringing this to my attention so I could address it swiftly.
Top ContributionsLogic.Monitor (PowerShell) module If you're a LogicMonitor user looking to streamline your workflows and automate repetitive tasks, you'll be pleased to know that there's is a PowerShell module available to help you do just that. As ...Re: Logic.Monitor (PowerShell) module This is amazingly helpful, and trashes about 2 months of my own scripting! 😂 Thanks for posting this, Steve! Glad it can be of help! Feel free to provide feedback on the github repo or ope...Re: UCS C -Rack server I will Check this @Steve Villardi , thanks for your swift suggestion. No problem, if its your first time using the UCS modules, I will link the support article in case you have any questions...Re: UCS C -Rack server I would think that the DatasourceCisco_UCS_RackServerComponentswould monitor DIMM status but I do not have a rack server to validate. You can find it in the LMX via locator id:NDLANZ. Let me know ...Re: Logic.Monitor (PowerShell) module @Magna_FL Just wanted to let you know version 4.5 was just released that includes full support for managing SDT. Below is a full list of changes along with usage examples. Let me know if you have a...Re: Logic.Monitor (PowerShell) module Hello @Steve Villardi - great work! Just a short question regarding this. We have several Windows System which we schedule from Task to reboot frequently. We thought to put some lines to the scr...Re: Logic.Monitor (PowerShell) module Fantastic Module, but adding#Requires -Version 7to 4.5.6 inBuild-LMDataModel.ps1 &Submit-LMDataModel.ps1has effectively killed the module for me in a corporate setting. Some backwards compat...Re: Logic.Monitor (PowerShell) module @ryang glad you find the module useful. I believe the update device endpoint only allows add/update operations. In order to remove a property you would need to use theRemove-LMDeviceProperty comma...Re: Logic.Monitor (PowerShell) module @Steve Villardi check this out if you want to get kick started @Stuart Weenig Thanks, taking a look now! Re: Employee Only - Community Contest: Content Creation Challenge!https://community.logicmonitor.com/lm-tech-talk-33/logic-monitor-powershell-module-3562