Adding additional text in mail from script
Hi, Small question, I have created a custom datasource that uses a embedded powershell script: # Variables $Folder = '##ps.filecount.folder##'; $Minutes = '##ps.filecount.minutes##'; $Recurse = '##ps.filecount.recursive##'; $Exclude = '##ps.filecount.exclude##'; $ComputerName = '##system.displayname##'; # Build parameters dynamically $GetChildItemParams = @{ Path = $Folder Attributes = '!Directory+!System' } if ($Recurse) { $GetChildItemParams['Recurse'] = $true } # Create session dynamically $Session = New-PSSession -ComputerName $ComputerName try { # Execute remotely $Result = Invoke-Command -Session $Session -ScriptBlock { param ( $Folder, $Minutes, $Recurse, $Exclude, $GetChildItemParams ) if (-not (Test-Path $Folder)) { # Exit with special error code if folder missing exit 3 } [array]$Files = Get-ChildItem @GetChildItemParams | Where-Object { $_.LastWriteTime -le (Get-Date).AddMinutes(-$Minutes) -and $_.FullName -notmatch "$Exclude" -and $_.FullName -notmatch "nagios-monitoring" -and $_.FullName -notmatch "netscaler-monitoring" } # Get the newest file among all (not just those older than $Minutes) $NewestFile = $Files | Sort-Object LastWriteTime -Descending | Select-Object -First 1 # Safely extract properties $NewestFilePath = if ($NewestFile) { $NewestFile.FullName } else { "" } $NewestFileDate = if ($NewestFile) { $NewestFile.LastWriteTime } else { "" } # Return both count and newest file path return @{ Count = $Files.Count NewestFile = $NewestFilePath NewestDate = $NewestFileDate } } -ArgumentList $Folder, $Minutes, $Recurse, $Exclude, $GetChildItemParams # Output only the final datapoint in the correct format Write-Output "NumberofFiles=$($Result.Count)" Write-Output "NewestFile=$($Result.NewestFile -replace '\\', '\\')" Write-Output "NewestFileDate=$($Result.NewestDate)" Write-Output "INFO: Found $($Result.Count) file(s) older than $Minutes minutes in $Folder on $ComputerName" } catch { # Optional: Output something recognizable for LogicMonitor if there's an error Write-Output "NumberofFiles=-1" Write-Output "NewestFile=ERROR" Write-Output "NewestFileDate=ERROR" } finally { # Cleanup the session (always!) if ($Session) { Remove-PSSession -Session $Session } } The Graph is fine (NumberofFiles), but I also want to include the "NewestFile" and "NewestFileDate" output in the mail alert. is this possible?105Views0likes8CommentsMonitoring Azure Application Registrations
Does anyone know if LogicMonitor can monitor Application Registrations in Azure? It does not appear on the list of services when configuring Azure cloud integration. It is quite important as we have had various integrations break because of the lack of visibility when application registrations expire.37Views0likes1CommentLM SaaS M365 monitoring
Anyone using LM SaaS-based Office365 monitoring and can check something for me? With the legacy/deprecated Office365 checks, LM would collect many of the stats by using the GraphAPI. This works by downloading a CSV file from M365 which provides 7 days of data. The problem is that this CSV file, at best, is atleast one day behind but frequently even more behind than that. I covered that issue in an old post about it here. Can someone confirm if the newer SaaS method has the same problem? I don't currently have it but looking at the DataSources it says it uses a method of "SAAS OFFICE365 CSV REPORT" and there is still a "Data Offset" datapoint, so I assume it will have the same problem. As far as I know, that is the only way to get this information from M365 so it's kinda understandable. But I guess it's possible LM can do some special backend thing to backdate the data, since they control the whole process, but seems unlikely. You can likely tell by looking at the "Office365 Email Activity" graph with a 30-day change, and check if weekday spikes are offset into the weekend. Assuming most email activity will be M-F for your environment(s). Thanks!178Views0likes0CommentsAlert tuning help
Hi team. Hopefuly someone can point me into the right direction when it comes to disabling alert tuning at a group level. We have a group with a large number of network devices, and would like to disable alerting on all interfaces at the group level. However, there are a few device interfaces we would like to keep alerting enabled. When we look at the device at the resource level, we can see the alert is disable at the group level, but can't figure out how to override it to allow alerting at the resource levelSolved289Views1like2CommentsHow is Escalation Chain throttling supposed to work?
Hi, We had a power outage at a data center yesterday which obviously caused a whole bunch of alerts. We have our settings set with 20 alerts over 10 minutes causes the Chains to throttle. The throttling seems to kick in just fine, but with one big problem. Instead of LM sending us 100+ tickets about all the things that were down, it decided to send us 100+ tickets telling us the Chain was throttled and it wasn't going to send us ticket any more. That doesn't seem like it's working how it's supposed to work. I'd rather get 100 tickets that were for actual alerts than 100 tickets telling me I'm not going to get any more tickets. Anyone run into this before?68Views0likes2CommentsUsing data from another datasource
Hi, we are creating a new datasource that needs data that is already being collected on another datasource. It is possible to use that data already collected instead of polling the device again? Our need is to re organize collected data on another way to simplify the LM Services creation as it cannot filter instances by any instance property. Thanks!174Views9likes6CommentsStatic Thresholds
I am trying to set static threshold for SQL Server Databases, State at the group level. My criteria is to set warning for any value but 0 (online), and Error for 4-6 (Suspect, Emergency, Offline). I set up static threshold for warning: All Day when the State value is not equal to 0 will trigger warning. Then I tried to do it for error 4-6 values but Logic Monitor says that I can only have one All Day static threshold. How do I set it up so it has all these requirements? (Do I just set up multiple thresholds with different time frames?) Warn anything but 0 (online), Error for 4-6 (Suspect, Emergency, Offline).190Views1like1CommentModule Toolbox AppliesTo IDE
I have a new DS to build. I decided, for the first time, to try to build it in the module toolbox instead of the UIv3 editor. I guess "Resource Label" is the display name of the module. That's confusing because it's not the name of the resource this will be on. I guess I can see that it's the label that the module will show up with under the resource. But it's not the label of the resource. It's the label of the module. Technical notes - i guess this now supports markup. Which markup? hypertext transfer markup? Extensible markup? Why not markdown (or does it mean markdown when it says markup)? My big problem is with the "IDE". Only developers would think the word "IDE" makes more sense than "wizard". Most of them are Java/Groovy developers who actually need an IDE to develop in a language as overly complicated as Java/Groovy. This thing is not an IDE but a field picker. Functionality that used to exist is no longer there. When I'm developing a datasource, i usually limit the first runs to one device. I opened the "IDE" hoping to find a way to search for the device and limit it to that device. I could do that in the old UI really easily. I don't even know where to start with this new "IDE". The "IDE" does not auto-complete properties. So even if i started typing out "system.display" it doesn't even suggest a complete property name. Once i get "system.displayname == " into the appliesto, it doesn't suggest display names to choose from. I know LM knows how to do this because they do it with the LM Logs query window. Why is there a big help section in the middle of this "IDE" describing what the "true()" convenience function does? I didn't select it and i'm not using it in my appliesto. Why is the "IDE" so big? Why can't it pop out in a drawer from the left side? I was worried that the cancel button might cancel the progress i've made on the DS so far. Speaking of the cancel button, why is there no "you'll lose the progress on your appliesto if you cancel. are you sure you want to cancel?" warning? Why are we still choosing the collection mechanism type (batchscript in this case) before getting ot the collection setting? Why is the discovery group method selected before instances even exist? Did someone actually say, "it makes more sense to go through the effort of moving this above the discovery arguments"? Why are the results for testing active discovery still not shown in groups? I hit save before putting in a name/resource label. It marked them as red, but didn't scroll up to them. It looked like nothing happened when i hit save.122Views4likes3CommentsAutomate the Infra Alerts
I need to perform the poc on the self-healing part to ensure that any infrastructure alerts that are triggered automatically will result in the job being triggered and resolved depending on the circumstances. So that, customers can reduce the resources and time needed to fix common infrastructure issues.35Views1like0Comments- 88Views2likes3Comments