Send ESXi 5.0 Syslog to Splunk


1) Install Splunk. In my example, I use Linux as the Splunk server. rpm -i splunk-4.3.4-136012-linux-2.6-x86_64.rpm /opt/splunk/bin/splunk start 2) Go the web server http://dev-linux-01:8000 to open the TCP and UDP 514 port. Do the same to open UDP port 514. 3) Login to the ESXi host to configure the remote syslog host. esxcli system syslog … Continue reading Send ESXi 5.0 Syslog to Splunk

AWstats Configuration Example


AWstats is an open source log analyzer. I built up one on a Windows 2003 server to analyze the intranet (IIS server) usage. Here is my step by step how to: The software version I use in my example: 1) Install Apache, this is where I want to publish my log analysis. You also can … Continue reading AWstats Configuration Example

PowerShell: Hyper-V VM Inventory


Having a clean inventory of all virtual machines is a good practice to avoid virtual machine sprawl. I created a script to send me to the Monthly VM Inventory automatically, this includes the Guest name, status, OS, vCPU, RAM, host and notes. The results look like this: JC-VM-01STATUS: RunningVCPU: 1RAM: 2048 MOS: Windows Server 2008 … Continue reading PowerShell: Hyper-V VM Inventory

PowerShell: Monitor Hyper-V VM Heartbeat


$hostname = “ServerName” $service = gwmi -class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -ComputerName $hostname $VM = gwmi -ComputerName $hostname -namespace "root\virtualization" -query "Select * from Msvm_ComputerSystem where Caption='Virtual Machine'" Foreach ($_ in $VM) { Write-Host $_.ElementName $settings = gwmi -ComputerName $hostname -namespace "root\virtualization" -query ("ASSOCIATORS OF {" + $_.__PATH + "} WHERE resultClass = Msvm_VirtualSystemsettingData") $HB = … Continue reading PowerShell: Monitor Hyper-V VM Heartbeat

PowerShell: Send Email


I scheduled a task to send me the every day report by Email. Here is how I did by using PowerShell: $emailFrom = Monitor@test.com$emailTo = jackie.chen@test.com $subject = "Everyday Report"$body = Get-Content C:\Logs\EverydayReport.txt $smtpServer = "SMTP.test.com"$smtp = new-object Net.Mail.SmtpClient($smtpServer)$smtp.Send($emailFrom, $emailTo, $subject, $body)