10-21-2021 08:10 AM
Hi,
Are there any powershell examples to pull logs from the imc? I'm trying to use powershell to get info like the "fault logs" or SEL logs. Actually any examples of getting hardware status so that we can poll mulitple imc(s) for bad drives or any other failed hardware.
Have installed the cisco.imc modules and there isn't much docs on monitoring IMCs, mostly setting up and configuring IMC.
Thanks.
10-27-2021 04:33 PM
After running Connect-Imc, you can try these 2 commands:
Get-ImcSyslog and Get-ImcSyslog
Extra info below:
I found these commands in Cisco.IM module.
To get a list of all commands in a module you can run: Get-Command -Module Cisco.IMC
To get a list of all of the modules you have installed you can run:
Get-Module -ListAvailable
I have Powershell and Powershell-UCS installed on my MAC so I can run bash commands along with Powershell commands. This helps you narrow down the search.
Get-Module -ListAvailable | grep -i 'Cisco'
I see the 4 Cisco modules (Cisco.IMC, Cisco.UCS.Core, Cisco.UCSCentral, Cisco.UCSManager), and we need the Cisco.IMC one.
Then we can look for log|fault|event type of commands using this command - we are looking to view the logs so I also look for the Get word. Also I filter out the word "Catalog" as those show up when looking for log.
PS /Users/kkhlebop/Dropbox/src/imcsdk> Get-Command -Module Cisco.IMC | grep -iE "log|event|fault" | grep -vi catalog | grep -i get Alias Get-ImcTtyLog 2.5.1.6 Cisco.IMC Function FnGetImcTtyLog 2.5.1.6 Cisco.IMC Cmdlet Get-ImcAdaptorFcPortFLogiProfile 2.5.1.6 Cisco.IMC Cmdlet Get-ImcAdaptorFcPortPLogiProfile 2.5.1.6 Cisco.IMC Cmdlet Get-ImcBiosPlatformDefaults 2.5.1.6 Cisco.IMC Cmdlet Get-ImcBiosVfIntelVirtualizationTechnology 2.5.1.6 Cisco.IMC Cmdlet Get-ImcEventManagement 2.5.1.6 Cisco.IMC Cmdlet Get-ImcFault 2.5.1.6 Cisco.IMC Cmdlet Get-ImcKmipServerLogin 2.5.1.6 Cisco.IMC Cmdlet Get-ImcPlatformEventFilters 2.5.1.6 Cisco.IMC Cmdlet Get-ImcSysdebugMEpLog 2.5.1.6 Cisco.IMC Cmdlet Get-ImcSyslog 2.5.1.6 Cisco.IMC Cmdlet Get-ImcSyslogClient 2.5.1.6 Cisco.IMC
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide