• Content count

  • Joined

  • Last visited

  • Days Won


Community Reputation

5 Neutral

About mhashemi

  • Rank
    Community Whiz Kid
  1. SNMP - Use RAW value in datapoint

    You could also do a script DS that converts the compass direction to a number.
  2. 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.
  3. API call for collector versions

    @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.
  4. 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.
  5. LogicMonitor PowerShell module

    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.
  6. LogicMonitor PowerShell module

    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.
  7. LogicMonitor PowerShell module

    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.
  8. LogicMonitor PowerShell module

    Yup, I forgot to upload when I made the TLS change. That's done now.
  9. LogicMonitor PowerShell module

    What did you have in mind?
  10. LogicMonitor PowerShell module

    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>
  11. LogicMonitor PowerShell module

    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.
  12. LogicMonitor PowerShell module

    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).
  13. Network diagram

    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.
  14. UI elements

    I am looking to write some internal documentation and want to make sure that I refer to the parts of the UI correctly. Does anyone know of a document that describes the UI elements? Something similar to this: ? Thanks.