• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by mhashemi

  1. Can you put the device in SDT in the portal? What version of the module are you using?
  2. Sorry, I don't know, to which field you are referring. Maybe you can post a screenshot?
  3. I monitor certain ConfigSources, using the API. In my use case, I am taking the config data and sending it to documentation, but you could do the same, but send a message. It could look like this: 1. ConfigSource gets the membership. If a change is detected, generate an alert 2. Using the API, a DataSource script gets alerts for the CS. If an alert is detected, retrieve the latest config data 3. The DataSource could then generate an alert and/or just send a message with the membership, to an e-mail Of course, you could also just run the alert-check script as a scheduled task, it does not need to be a DataSource.
  4. I don't have a device against which to test, but it looks like Palo Alto firewalls need a valid .xml file. You could export from the UI and compare that file format to the downloaded CS backup from LM.
  5. To what UI field does this correspond? If you don't see the desired value in the UI, I'd think you cannot retrieve it from the API.
  6. This can totally be done with the API. I just use the Get-LogicMonitorDataSource cmdlet from my PowerShell module ( Then, you can just inspect the alertExpr property for each datapoint.
  7. If your script wrote the members to a file, you could detect changes by comparing current membership to the content of that file.
  8. Is anyone monitoring agent and call status in UCCX?
  9. I am trying to monitor my first site that uses the customer’s SSO through Office 365 ( When I hit the site, I am redirected to{GUID}/login. How do I setup a web check to authenticate and check the site’s status?
  10. I am looking for a way to export the results of various debug commands. Specifically, I think it would be useful to be able to export large datasets, such as the results of !tlist or !adlist. Reading the results in the debug window is not ideal.
  11. I am looking for a way to include a device's properties in an alert message, generated by an EventSource. According to your documentation, ##device property## is available in DataSources but not EventSources. I suggest changing that.
  12. Thanks, this is useful. Incidentally, you can no longer select "Informational" from the Level drop-down menu.
  13. You could also do a script DS that converts the compass direction to a number.
  14. I recently published CGYKT4. In this DataSource, a groovy script checks for the presence of the custom.MonitoredServices property. If the value is "SYN_Windows_Basic_Services" then the script replaces that with a hard-coded set of standard services. If custom.MonitoredServices contains any comma-spearated list of services, then the script just uses those. Finally, if custom.MonitoredServices contains "SYN_Windows_Basic_Services" and a comma-separated list of services, then the standard list of services is added to the values from the property. Once the list of services is determined, the script checks if those services exist on the target device. If so, an instance is created and the script generates an alert if the service is not running.
  15. @Sarah Terry, I must have missed the notification for your reply. To clarify, I was referring to a list of released collector versions, not the version installed on a particular collector. It appears that the requested functionality will be released (and documented) eventually. Thanks.
  16. Please add an API method that will report the current collector version. This will help us to programmatically determine and report on how many collectors are not running the current version.
  17. I took your changes to Update-LogicMonitorCollectorProperties and added them, along with support for PATCH and PUT in I have to go on a trip, but if you wanted to look at updating Update-LogicMonitorDeviceProperties, that would be cool. Device updating has a more complicated JSON structure based on whether or not you are updating custom or standard properties. Either way, thanks for the help.
  18. Sounds good. Why did you limit the JSON depth to 6? Why define it at all? Oh, you know what? Even though it isn't documented, I believe this part of the API supports the PATCH method (like devices). I was thinking of updating it to build the property/value pairs using the same code as is in the Update-LogicMonitorDeviceProperties cmdlet. As far as I can tell, it does not suffer from the same bug as you have pointed out here. Do you agree? I prefer PATCH over PUT because it is so easy to screw up when using PUT.
  19. Thanks for the input! I accepted your first one, for Add-EventLogSource. This is my first open source project, so I'm not sure what the etiquette is, on accepting code changes. Did you test your changes in hotfix/update-lmcollectorproperties-data ? This is exciting. Yeah, I use psake to build the individual .ps1 files into the module, publish to PowerShellGallery, and push to GitHub.
  20. Yup, I forgot to upload when I made the TLS change. That's done now.
  21. Oh, you don't need the hash table. When I run with the property capitalization, the cmdlet works fine. For "display name", you need to use "displayName". Update-LogicMonitorDeviceProperties -AccessId $lmAccessId -AccessKey $lmAccessKey -AccountName <account name> -DeviceId <id> -PropertyNames displayName -PropertyValues <new name>
  22. Your experience is interesting, because I update the displayName property of our new collectors several times a week. In the script we use to deploy collectors, I use the following code: $BlockLogging = $true # Just used for this example, to prevent the steps from being written to the event log. $collectorProperties = @{"displayName" = "testdevice"; "hostGroupIds" = "<a valid group ID>"} Foreach ($keyValuePair in $collectorProperties.GetEnumerator()) { Try { $lmResponse = Update-LogicMonitorDeviceProperties -AccessId $lmAccessId -AccessKey $lmAccessKey -AccountName <account> -DeviceId <device ID> -PropertyNames $keyValuePair.Key -PropertyValues $keyValuePair.Value } Catch { $message = ("{0}: Unexpected error updating the property: {1} on {2}. The value should be: {3}. The specific error is: {4}." -f (Get-Date -Format s), $keyValuePair.Key, $hubLongName, $keyValuePair.Value, $lmResponse) If ($BlockLogging) {Write-Host $message -ForegroundColor Red} Else {Write-Host $message -ForegroundColor Red; Write-EventLog -LogName Application -Source $EventLogSource -EntryType Error -Message $message -EventId 5417} } } If you put the displayName property into a hash table like I did, do you have the same problem? I'll try to find some time to create the other cmdlet you suggested.
  23. I have published a PowerShell module, which refactors part of the REST API, to the PowerShell gallery. Please feel free to make requests (or send me cmdlets you want added).
  24. Our network guys have complained that they don't know what network gear is connected to what, when an alert occurs. In other monitoring tools (e.g. SolarWinds Orion), you can upload a network diagram (usually an image, I believe) and associate it with (the equivalent of) a group. Is there any way to do something like that in LM? Thanks.