Recent Discussions
Can LogicMonitor use Active Directory OU information for grouping?
Hi, We have our servers organized in AD and use those OUs to group similar machines together. Can I access that information in LM in any way? I want to make a collection in LM of all the machines in a certain OU in AD but don't know if that's possible or not. Thanks.Kelemvor3 days agoProfessor28Views0likes4CommentsDynamic Alerting/Threshold Setup
Hi, I've just started experimenting with Dynamic alerting, probably something I should have done ages ago! I've read the documentation and been through the training module. I'm experimenting with the SQL Server Global Performance LogicModule which seems a good candidate for this, we get a fair bit of alert noise from this in our environment. I've gone into the Global definition for this module and turned on dynamic alerting for any of the datapoints that have a static threshold alert set. Seems to be working nicely. I've set the Dynamic threshold to suppress notifications, but what is the best way to remove the static threshold all together. I'm not too keen on just deleting them from LogicModule. I suppose one approach could be to duplicate the LogicModule, and modify deleting the static thresholds that one so that my original one is still intact in case I want to go back to it for refer to what the static values were set too. Then disable the original LogicModule. I don't really want the static alert threshold showing up in my alert list at all. Another thing that would be nice (Let me know if it's already there) would be if I was able to see at a glance if an alert had been triggered by a breach in dynamic or static threshold?16Views1like1CommentLocation / credentials / any custom property updater DataSource (framework)
This is a DataSource that enables you to update any single custom property on any collector-monitored resource. Example use case / how this came to be: Let's imagine for a moment that you have a collection of monitored resources on a mobile piece of kit, for example a sea-going vessel. One of those resources is a GPS locator device, out of which you can retrieve latitude and longitude values, and you'd like to use those to populate the 'location' property for the resource in LogicMonitor, such that your various vessel locations can be shown on a LogicMonitor dashboard. This DataSource will let you do exactly that. It's a framework, into which you'll still have to put a bit of effort, namely, you need to add code to actually find the value you want to set/update on the resource. Obviously enough I have no idea what that might be in your case... However, all the rest of the work - actually updating the resource using the LogicMonitor API - is done for you. Yes, you could use this to grab data from another property, such as an auto.prop set by a simple PropertySource. Yes, you could put the same code into a PropertySource or ConfigSource if that were appropriate for your use case, give or take some tweaks to the outputs. Yes, you could use this to pull SNMP location data from a device, although "3rd floor back office cabinet, rack 2, shelf 6" won't translate well onto a Google Maps widget. You will need to: 1. Create LM API token credentials (ID and key) for a user with rights to manage the resource(s) in question. Set these as apiaccessid.key and apiaccesskey.key properties for the resource(s); 2. In the DataSource script, ensure line 27 defines the custom property name you want to update: customPropertyToBeUpdated = 'location'; Note this must be a property that you can access via managing the resource - this excludes any auto.xxx and system.xxx properties; 3. Create and put whatever necessary code into the try{} block of the getNewPropertyValue() function (lines 32-49 in the template), that returns the desired property value as a string. Note that depending on what that code is, you may need to add further imports to the top of the script; 4. Set a polling interval that makes sense for the rate of change of value; 5. Change the AppliesTo rule from false() to whatever is appropriate. What it does: 1. Runs your code to get a new property value; 2. Checks that this would be a change from the existing property value (or absence of property); 3. If it is a change, calls the LM API and updates (or creates) that custom property. It'll graph results on a success/failure basis, and alert if you're missing API credentials or if those credentials are inadequate for the resource. And, look, see, location data: ...granted, you can't tell I didn't just manually do that... Although designed and released as a location updater, bits of this code started life as an SNMP community string updater (by testing multiple community strings from a list, and setting the one that works: a href="https://communities.logicmonitor.com/topic/1867-pick-one-from-multiple-snmp-community-strings/" rel="">https://communities.logicmonitor.com/topic/1867-pick-one-from-multiple-snmp-community-strings/), so could be used for that or for updating any property. Caveats: This script updates exactly one property. If you wanted to update multiple properties, you could clone the DS for each, or you could adapt the script to loop over multiple properties. If you do the clone route, note that the clones will not all run at the same time, so if you're trying to update a username and a password, that's going to leave a mismatch for a period. Also, we have a proper, in-platform, credentials vault integration on the way anyway. v1.2: 3C2PMMAntony_Hawkins5 days agoEmployee358Views2likes6CommentsWindows server CPU data collection issue-Error code 0x00000261
I am facing issue to collect windows server CPU data,here is the error message, The script failed, elapsed time: 41 seconds - java.io.IOException: winproxy return status=0x00000261 errmsg=Process the request timeout java.lang.RuntimeException: java.io.IOException: winproxy return status=0x00000261 errmsg=Process the request timeout at com.logicmonitor.groovy.objects.BaseWrapper.invoke(BaseWrapper.java:124) at com.logicmonitor.groovy.objects.lang.ScriptWrapper.run(ScriptWrapper.java can anyone share the solution?stevenzhang5 days agoNeophyte15Views0likes2CommentsAPI searchId documentation?
The API V3 swagger is filled with references coming back in the RESPONSE with searchId but doesnt say what it is. AI queries say its used for pagination, claims there is no official documentation, but is able to give me examples. I was able to use them by providing my own searchId and getting it back ... for SOME endpoints but NOT ALL. But I'm wondering: Is there an official page I'm not finding that explains how to use searchId ? Does it really not work for some endpoints? I just get null back when I send it in my request to /device/devices but if I do /alert/alerts I get back the searchId I set in my query. Thanks!Lewis_Beard6 days agoProfessor26Views0likes1CommentDeep Dive troubleshooting question
I'm having difficulties tracking down the source of a Service Account Lockout occuring in a fairly complex domain structure. I've found it necessary to set WMI creds at the top of the heirarchy, with sub-groups having different WMI creds, as well as individual devices with their own. On the domain controller that would be targeted with a sub-group WMI cred set, I see most 'Sources collecting correctly, but a few times a day, the SA is locking out. I find the 4740 on the DC, but can't quite track down the specific event (should be a 4625) causing the lockout. The only 4625 I'm finding show the Main group WMI creds... which are in a different domain. Seems as though some 'Sources are using the wrong WMI creds (or defaults based on the Collector's SA). The question: Is there a way to get a !TLIST showing the WMI.USER being leveraged in the debug console for each job?SolvedCole_McDonald7 days agoProfessor61Views0likes6CommentsHistorical SDT en reporting
Hi community, I'm running into a limitation with reporting on Scheduled Downtime (SDT) in LogicMonitor. Right now, i' m able to pull alerts that occurred during SDT' s but i cannot generate a single report that shows all historcal SDTs across all my resources/devices. For my use case, it's important to: Filter per resource group Include this data in regular reporting and analysis to highlight structural SDT usage My questions to the community: is there any way to generate such a historical SDT report, does someone have a script or code to share to get that trough the API Thanks in advance!Admine10 days agoNeophyte49Views3likes1CommentWhat sets auto.config.port? Official resource for where properties are set?
I have a deprecated config source or three (ahem) that I want to get rid of, but I want to test using the Common Config stuff. In particular, I have one device that for some reason doesnt have auto.config.port set. It has auto.network.listening_tcp_ports set to 22, but not auto.config.port. Therefore, it cant pick up any of the common config property sources for exec vs telnet vs etc, because all 5 of those are mutually exclusive to one another BUT all of them require auto.config.port to be set. So I'm wondering: a) where is auto.config.port set at? b) is there some official resource LM has where I can just search for a property and find the module that sets it? ThanksLewis_Beard11 days agoProfessor22Views0likes1CommentNeed an LM Log Source to collect logs from a remote Windows file system
Basically as per, I have about 40 windows boxes I need to get some log file monitoring on. None have internet access , and I don't really want to install 40 odd collectors or OTEL agents, and they are all in different domains so UNC copying isn't really an answer either The path is C:\ProgramData\Microsoft System Center 2012\Orchestrator\RunbookServerMonitorService.exe\Logs , just to make it a bit more awkward, which stays the same . All my attempts at a groovy script to get the files just crash and burn even throwing all the AI engines at it ! This is as far as I can get. It reads the newest 20 lines of code whilst running in a !groovy debug window. That's before we get to converting it to JSON or parsing for specific event text. I gave up when we got to tripple escaping and ##WMI.USER## can't be escaped. Anybody got a LS they can share or point me to ? def remoteComputer = "machinename" def username = 'domain\user' def password = 'password' // Folder to check def folderPath = 'C:\\ProgramData\\Microsoft System Center 2012\\Orchestrator\\RunbookServerMonitorService.exe\\Logs' // PowerShell command (escaped for Groovy) def psCommand = """ \$securePass = ConvertTo-SecureString '${password}' -AsPlainText -Force \$cred = New-Object System.Management.Automation.PSCredential('${username}', \$securePass) Invoke-Command -ComputerName ${remoteComputer} -Credential \$cred -ScriptBlock { param(\$folder) if (Test-Path \$folder) { \$newest = Get-ChildItem -Path \$folder -File -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1 if (\$newest) { \$lines = Get-Content \$newest.FullName -Tail 20 Write-Output "Last 20 lines of: \$newest.Name" Write-Output \$lines } else { Write-Output "No files found in: \$folder" } } else { Write-Output "Folder does not exist: \$folder" } } -ArgumentList '${folderPath}' | Out-String """ // Run PowerShell from Groovy def command = ["powershell.exe", "-NoProfile", "-Command", psCommand] def process = command.execute() def output = new StringBuffer() def error = new StringBuffer() process.consumeProcessOutput(output, error) process.waitFor() println "Output:" println output.toString().trim() if (error) { println "Errors:" println error.toString() }Andy_C11 days agoNeophyte32Views0likes1Comment