mhashemi

Members
  • Content Count

    18
  • Joined

  • Last visited

  • Days Won

    5

Community Reputation

6 Neutral

About mhashemi

  • Rank
    Community Whiz Kid

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am trying to monitor my first site that uses the customer’s SSO through Office 365 (https://customer.sharepoint.com). When I hit the site, I am redirected to https://login.microsoftonline.com/{GUID}/login. How do I setup a web check to authenticate and check the site’s status?
  2. 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.
  3. 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.
  4. Thanks, this is useful. Incidentally, you can no longer select "Informational" from the Level drop-down menu.
  5. mhashemi

    SNMP - Use RAW value in datapoint

    You could also do a script DS that converts the compass direction to a number.
  6. 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.
  7. mhashemi

    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.
  8. 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.
  9. mhashemi

    LogicMonitor PowerShell module

    I took your changes to Update-LogicMonitorCollectorProperties and added them, along with support for PATCH and PUT in 1.0.0.29. 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.
  10. mhashemi

    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.
  11. mhashemi

    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.
  12. mhashemi

    LogicMonitor PowerShell module

    Yup, I forgot to upload 1.0.0.17 when I made the TLS change. That's done now.
  13. mhashemi

    LogicMonitor PowerShell module

    What did you have in mind?
  14. mhashemi

    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>
  15. mhashemi

    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.