Recent Discussions
HP Aruba 6000 switch Support?
Good Afternoon, It seems that the newest switch chassis from Aruba/HP Isn't playing too nicely with LM at the moment. The same DataSources that were useful for the previous HP Switches don't appear to work for the newer 6000 series devices (we have a 6000 and a few 6500s) specifically, the Memory snmp query seems to poll no data - luckily the default CPU for SNMP does work. Has anyone run into this themselves?Jordan-Eil3 months agoNeophyte34Views1like0CommentsVM creation date info from Vsphere
Hi, I am trying to add an attribute forVM creation date on datasource:VMware_vSphere_VirtualMachinePerformance I tried to add below line in the Active Discovery script: 'auto.config.create_Date' : vmConfig?.createDate, But getting an error. Has anyone else already tried getting this property of the VM or knows a solution?192Views8likes0Commentsincreasing speed of 'Sources using Powershell Remote Sessions
TLDR: don't load session profiles when using Powershell Remote. Use an explicit pssession with the -nomachineprofile flag present. Several LM provided 'Sources use it. Many of the 'Sources I've written in the past use it as well. Here's the find/replace for the LM provided ones (find & replace are separated into comment regions): #region FIND try { #-----Determin the type of query to make----- # check to see if this is monitoring the localhost collector, as we will not need to authenticate. if ($hostname -like $collectorName) { $response = Invoke-Command -ScriptBlock $scriptBlock } # are wmi user/pass set -- e.g. are these device props either not substiuted or blank elseif (([string]::IsNullOrWhiteSpace($wmi_user) -and [string]::IsNullOrWhiteSpace($wmi_pass)) -or (($wmi_user -like '*WMI.USER*') -and ($wmi_pass -like '*WMI.PASS*'))) { # no $response = Invoke-Command -ComputerName $hostname -ScriptBlock $scriptBlock } else { # yes. convert user/password into a credential string $remote_pass = ConvertTo-SecureString -String $wmi_pass -AsPlainText -Force; $remote_credential = New-Object -typename System.Management.Automation.PSCredential -argumentlist $wmi_user, $remote_pass; $response = Invoke-Command -ComputerName $hostname -Credential $remote_credential -ScriptBlock $scriptBlock } exit 0 } catch { # exit code of non 0 will mean the script failed and not overwrite the instances that have already been found throw $Error[0].Exception exit 1 } #endregion #region REPLACE try { $option = New-PSSessionOption -NoMachineProfile #-----Determin the type of query to make----- if ($hostname -like $collectorName) { # check to see if this is monitoring the localhost collector, # as we will not need to authenticate. $session = new-pssession ` -SessionOption $option } elseif ( ([string]::IsNullOrWhiteSpace($wmi_user) ` -and [string]::IsNullOrWhiteSpace($wmi_pass)) ` -or ( ($wmi_user -like '*WMI.USER*') ` -and ($wmi_pass -like '*WMI.PASS*') ) ) { # are wmi user/pass set # -- e.g. are these device props either not substiuted or blank # no $session = new-pssession ` -computername $hostname ` -SessionOption $option } else { # yes. convert user/password into a credential string $remote_pass = ConvertTo-SecureString ` -String $wmi_pass ` -AsPlainText ` -Force; $remote_credential = New-Object ` -typename System.Management.Automation.PSCredential ` -argumentlist $wmi_user, $remote_pass; $session = new-pssession ` -computername $hostname ` -credential $remote_credential ` -SessionOption $option } $response = Invoke-Command ` -session $session ` -ScriptBlock $scriptBlock exit 0 } catch { # exit code of non 0 will mean the script failed and not overwrite the instances # that have already been found throw $Error[0].Exception exit 1 } #endregion p.s. the replacement code has the formatting I prefer. Feel free to change it to suit your whitespace/line length needs. Mine is a blend of every language I've ever used as I traditionally have been the only one looking at my code. I call my formatting method the "I have to fix this 2 years from now and have a half an hour to figure it out" format. generally, 1 specific function per line, sections that collapse into a single line to make it easier to work through the code. The first character of each line should inform how it relates to the line above it. spaces added to make neat functional columns of similar parts of the line (parameter name, variable). Most programmers hate the formatting I use, but it works for me. There are line continuation characters " `" to make it all fall into place.Cole_McDonald3 years agoProfessor55Views6likes0CommentsPalo Alto data source to grab HA Interfaces stats improved.
Hello, We've noticed that the config source 'PaloAlto_FW_HA_Interface' that's published on LM repo (version 1.4) doesn't use the best logic to try both API variations. On newer versions of PA (>=10.2.x) the API call changes slightly (since they've placed the <counters> section in a different path). With that being said, the OOTB module was failing on PAs with >= version. We've added some logic there & we're now having the version in mind (making use of ##auto.entphysical.softwarerev## property) to define how the API call will look like. Tested on several versions & it works smoothly. We've published our version on the exchange (code: DL74FN). If it's unavailable there for some reason, you can grab ithere. Thank you!Vitor_Santos3 years agoAdvisor32Views0likes0CommentsPalo Alto config source to capture XML configuration improved.
Hello, We've noticed that the config source 'PaloAlto_FW_RunningConfigXML' that's published on LM repo (version 1.4) doesn't use the best logic to try both API variations. They're using an IF statement to capture errors after the 1st API attempt, however, the script raises an exception if it fails, which will cause the script to abort & never actually try the 2nd variation. Instead of an IF statement, this should be done with the try{}catch{} statement, this way it will attempt the 2nd variation if the 1st one fails. We've published our version on the exchange (code: 9A779T). If it's unavailable there for some reason, you can grab it here. Thank you!Vitor_Santos3 years agoAdvisor116Views0likes0Comments