ContributionsMost RecentMost LikesSolutionsRe: Is there a link between Active Directory security groups and Security groups in LogicMonitor? You can pass security roles to LM in the SSO payload as long as there is a 1 to 1 match to LM roles that already exist. It will only be effective for first time login/account creation via SSO. See the last section on the page Stuart linked for details on how we expect to recive those roles from the SSO IDP. Re: PowerShell -- Instance Property Support You are correct in groovy you can do aninstanceProps.get() – return the specified instance property e.g. instance = instanceProps.get("wildvalue") This is available if you import the santabamodule for Groovy. Unfortunately,we don'thave anything like that for Powershell at this time. Re: PowerShell -- Instance Property Support Hi Joe, Instance Level Properties (ILP's) are available in PowerShell Active Discovery scripts as long as they fit the following format as output. https://www.logicmonitor.com/support/datasources/active-discovery/script-active-discovery/ instance5_id##instance5_name##instance5_description####auto.fooProperty=somevalue&auto.barProperty=anothervalue instance6_id##instance6_name##instance6_description####auto.fooProperty=thisvalue&auto.barProperty=thatvalue Is this what you are trying to accomplish? Or are you trying to use a Powershell PropertySource? Monitor UNC path subdirectories with Active Discovery I have had a few customers come in asking for a way to monitor a large number of directories without having to add each subdirectory. Most of the time they want to monitor how much space each employee is usingon the shared drive, or how much space each VM is taking. So I came up with a PowerShell datasourcethat is able to do just that. It requires that a device property be set:unc.pathand this will be the path that the collector looks at and pulls subdirectories from. It will report the number of items in the subdirectory (files and folders) and the combined size of all of these items in bytes and MB. It also reports the script execution time which can be used as a measure of latency if needed. If you/monthly_2017_09/Screenshot_092817_124602_PM.jpg.d4562b9e4a9773d5c06b541aa5f4008a.jpg" data-fileid="309" rel="">want to use it on the same device multiple times just clone the datasource and change the ##UNC.PATH## to ##UNC.PATH2## in the discovery and collection scripts and add unc.path2 to the device properties. Can keep increasing as needed. Powershell without the Windows headache At LM we are issued MacBooks and support gets a few VM's (Windows and Linux) so we can test new features and replicate bugs that customers come to us with. But with taking an interest in Powershell it was getting tiresome remoting into a Windows VM to test a Datasource or API script every time one came in. Then I heard about Microsofts push to release Powershell on GitHub, I tried the alpha build and had great success and with the beta release of 6.0 they refind the install process so I thought it was time to share my experience. Disclamier: This version of Powershell for the Mac DOES NOT include some of the Windows only cmdlets (including Get-WIMObject and Hyper-v's Get-VM) so you may not be able to test those but you can still use intellisense to help write the scripts. The new install process is very easy you just need a terminall session on your MacBook and the latest Mac OSx build of 10.12: 1. We start by installing Homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. Now we can install Homebrew-Cask so we can install more packages brew tap caskroom/cask 3. Now for Powershell brew cask install powershell Note: The PowerShell formula for Homebrew includes OpenSSL as a dependency. "On macOS, .NET Core requires Homebrew's OpenSSL because the "OpenSSL" system libraries on macOS are not OpenSSL, as Apple deprecated OpenSSL in favor of their own libraries. This requirement is not a hard requirement for all of PowerShell. However, most networking functions (such as Invoke-WebRequest) do require OpenSSL to work properly." If you would like to install without OpenSSL you will lose some functionality but you can follow the steps here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#macos-1012 When new versions of Powershell are released simply update Homebrew and upgrade PowerShell brew update brew reinstall powershell Note: because of this issue in Cask (https://github.com/caskroom/homebrew-cask/issues/29301), you currently have to do a reinstall to upgrade. Now with that out of the way we just need a nice place to look at, debug and run Powershell. So VisualStudio Code works very well for this and you can download the Mac version here https://code.visualstudio.com/ Once you have installed this lets open it up and add the Powershell Extension: 1. Open VScode 2. Click the 5th icon on the left side 3. Search for Powershell and Install the one from Microsoft 4. Once installed click the reload button that replaced install so that the extension loads 5. Now you can open a .ps1 script or create your own! Feel free to add other scripting languages as well from the massive list of extensions that they haveNow if (for some crazy reason) you need to uninstall Powershell, Homebrew makes that easy as well brew cask uninstall powershell Now go have fun and write some cool API or Datasource scripts to share! Monitoring Databases as Instances One of our customers wanted adatasourcethat has instances that call from each database. Trying to use the auto discovery in thedatasourceforjdbcwith a discovery type of "Database List" so that they could monitor each customer's database the same way. Quote Database list:This option is intended to query a global database about other databases to be monitored. It expects the SQL statementto return a list of databases, which are concatenated with the port used. This value can then be used in the JDBCURL. Each listed database will be returned as an instance. So the above per our documentation explains how this should work, but this will returnport#:databaseName. It will pass this to the ##WILDCARD## as port#databaseName (ex: 1433testDB). This is great if you want to see where you have what databases, but if you want to monitor the individual database then it won't work since the database is not written in that form. To do this you canchange the active discovery to be "Instance List" Quote Instance list:The result of the SQL statementwill be used as instances. The query must return only a single column, of varying numbers of rows (e.g. "select name from customers"). and write a SQL statement that will return the database names(Select name asdatabasenameFrom sys.databases) This will discover all of the databases that are in the master database and pass them as wildcards to the collector which you can use in the URL, and then you are able to write a SQL statement that will query all of the databases the same way. Quotes via: https://www.logicmonitor.com/support/datasources/active-discovery/jdbc-active-discovery/
Top ContributionsRe: Is there a link between Active Directory security groups and Security groups in LogicMonitor?Re: PowerShell -- Instance Property SupportRe: PowerShell -- Instance Property SupportMonitor UNC path subdirectories with Active DiscoveryPowershell without the Windows headacheMonitoring Databases as Instances