ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

vMA + Splunk = Syslog Awesomeness

By Andy | Last Updated: November 9, 2022

Shares

How to manage vMA logs with Splunk

This is a guest post by Andy Grant.

Managing syslog messages in nearly any size of environment can be daunting.  Aside from the effort configuring every client to send syslog messages to your target server, searching for relevant data can be just as challenging.  There are many articles online on how to use VMware's vSphere Management Assistant for collecting your ESX/i host syslog messages and naturally, after reading such an article the first thing I did was to jump into my lab and setup vilogger.  But then what?  While it was nice to have all my logs in one location, I still had to manually search through the files using some conglomeration of cat, ls, less and grep.

Having been introduced to Splunk a number of years ago, and using it on and off since then, playing a little but barely getting my feet wet.  David Convery has a great document on VIOPS describing one way to exported individual ESX/i host syslog messages to Splunk, but it is not always administratively efficient to configure each and every host and my memory never served me well enough to be a PowerCLI master.  So why not marry the best of both worlds, and use vMA to consolidate the logs and then ship them off to Splunk with one fell-swoop.

I will be starting with the assumption that you have successfully deployed and configured your vMA appliance and configured vilogger.

The first step is to download a free copy of Splunk from Splunk.com.  The people at Splunk provide a very handy wget snippet that we can run right from our vMA appliance.

How to install and configure Splunk as a destination for ESXi log files

Next, install Splunk

How to install and configure Splunk as a destination for ESXi log files

Next, we start the Splunk daemon

$ /opt/splunk/bin/splunk start –accept-license –answer-yes –no-prompt

Now to discuss a few options.  By default, Splunk installs the full-blown application, web search and database engine, you may or may not want to run the full stack from vMA.  I would actually recommend against using the default installation and we will focus on using the Splunk Light Forwarder to send our syslog data to an existing Splunk installation.  If you don't already have a Splunk installation, getting one up and running is a simple as show above then enable the receiving of our data inputs.  See Installing Splunk on Linux or Installing Splunk on Windows on Splunk.com for details, and don't forget to enable receiving.

Enable the Splunk Light Forwarder using the default credentials of admin/changeme.

$ sudo /opt/splunk/bin/splunk enable app SplunkLightForwarder -auth admin:changeme –accept-license –answer-yes –no-prompt

To change the default password;

$ sudo /opt/splunk/bin/splunk edit user admin -password NEW_PASSWORD -roles admin -auth admin:changeme

Next we want to ensure that Splunk starts on bootup.

$ sudo /opt/splunk/bin/splunk enable boot-start

We need to add the log directory we wish to monitor, in this case /var/log/vmware is the path of all our syslog collection.  To do this we need to edit our inputs.conf located in /opt/splunk/etc/system/local/ by breaking out or favorite text editor.

$ sudo vi /opt/splunk/etc/system/local/inputs.conf

Add the following section:

[monitor:///var/log/vmware]

blacklist = .(gz|bz2|z|zip)$

blacklist = vma

recursive=yes

host_regex = /var/log/vmware/(S+/)

We are doing a few things here.  Not only are we setting recursively monitoring the log directory, but blacklisting rotated logs, and parsing the hostname out of the file path (forgive my poor regex, your comments welcome here to get rid of the trailing “/” in the Hosts screenshot below).  I am also blacklisting the hostname of my vMA appliance to reduce my logging amount and stay within the daily free license limit.

After any changes to your inputs.conf you will need to restart Splunk.

$ sudo /opt/splunk/bin/splunk restart

We are now monitoring the logs collected by vMA and will forward them to the full-blown Splunk installation.

$ sudo /opt/splunk/bin/splunk add forward-server <Splunk-server-IP_or_FQDN>:9997 -auth admin:changeme

Now point your web browser to your Splunk installation

How to install and configure SplunK as a destination for ESXi log files

Your hard work will be rewarded by new entries in Splunk, each file indexed will be listed as a new host.  When you first enable your vMA to forward syslog to Splunk, it will perform a complete index of all stored log files.   Depending on the number of hosts you are collecting logs from and the length of time you store them, this may push you past the limit imposed by the free version of Splunk of 500MB per day.   Use the Deployment Monitor to get a handle on your data inputs.

(As you can see my nested ESX hosts are not using DNS resolution).

And there you have it, you can now use Splunk to search, correlate and report on your VMware environments syslog data.  Try it out!

Splunk has a great community user base, fabulous documentation and quite possibly some really exciting VMware apps in the pipeline.  Stay posted.

Shares
5/5 - (1 vote)

| Filed Under: Server Virtualization Tagged With: Splunk, syslog messages, VMware vMA

Comments

  1. EV_Simon says

    May 18, 2011 at 9:25 am

    Doh, you beat me to it, this was to be my next project, although I was going down the Windows Server route rather than vMA. I will still carry on with it tho (I am looking at Snare for the Windows guests as well).

    • Andy G says

      May 18, 2011 at 9:37 am

      Hi EV

      I too started using the Windows route, it is by far the easiest to setup your first Splunk server that way.  I would highly recommend you look into using the Splunk Light Forwarder instead of Snare.

      It would be good to see an article on setting up a Splunk server for the first time, ultimately I transitioned to CentOS for mine.

      • Michael Wilde says

        May 18, 2011 at 2:50 pm

        Using a Splunk Forwarder is very reliable for moving data around as it will eat not only eventlogs (and do proper GUID resolution) but any kind of data.  If you’re thinking about using a forwarder and you don’t need local filtering, try the “Splunk Universal Forwarder”.  Headless and even lighter-weight than the “Light Forwarder”.

        Michael Wilde
        Splunk Ninja

        • Andy says

          May 19, 2011 at 12:10 am

          The Light Forwarder is definitely the way to go.   I am no-where near being a Splunk Ninja, but the docs are fabulous!

      • Michael Wilde says

        May 18, 2011 at 2:50 pm

        Two words Andy.

        EFFING SHWEET!

        • Andy says

          May 18, 2011 at 11:59 pm

          Thanks Michael

  2. Nathan S says

    May 18, 2011 at 8:31 pm

    I have a spunk server setup and sent the sys logs from esxi 4.1. My only problem is the three hosts log 600+ MB a day. It just doesn’t seem scalable. Do you have any thoughts on this?

    • Andy says

      May 19, 2011 at 12:08 am

      I had a similar problem at first.  The key for me was to blacklist the hostname of the vMA appliance.  It had to deal with log rotation and the way the vMA gzips the old logs (it was re-indexing all the other ESX host logs). It showed up pretty clearly in the search I posted in the screenshot with the vMA host accounting for the most events.

      Not sure if that is related to your particular setup, 600+MB seems like a LOT for three hosts.

    • Michael Wilde says

      May 19, 2011 at 12:22 pm

      Splunk scales like a champ, but if there’s a chance you’re using the free version of Splunk limited at 500MB/day there are some ways to filter out data you might deem unnecessary.

      • Andy says

        May 19, 2011 at 12:56 pm

        I concur with Michael.

        Install the Deployment Monitor and under License Usage –> Usage Statistics sort by hosts for the last 24 hours to determine who is sending the most data.  Filter (blacklist/whitelist) as necessary.

        • Michael Wilde says

          May 19, 2011 at 1:16 pm

          One more thing… to add to Andy’s comment.  When you install Splunk 4.2.1 it will allow you to “enable” the Deployment Monitor.  Which at first, seems sweet.  But there’s an upgrade available.  Go to “Manager –> Apps” and you’ll see a “Overwrite with 4.2.2” message under Deployment Monitor.  Go for it.  You will not be warned, but you NEED TO RESTART SPLUNK.  If you don’t, you won’t see a new dashboard view called “License Report”.  When we came out with Splunk 4.2, the “peak usage stuff” got moved out of License Manager–and in to the Deployment Monitoring app (which is the right place for it).  However, we overlooked some much needed reports and I had them added.  Please upgrade, and thanks for diggin splunk!

  3. awesome says

    May 18, 2011 at 9:13 pm

    Awesome! very nice post! now if only I could get an EA License for Spunk I would be set!

    • Andy says

      May 19, 2011 at 12:03 am

      Wouldn’t we all 🙂

  4. PiroNet says

    May 24, 2011 at 5:10 am

    Great post Andy!
    How would you compare Splunk+vMA to VMware vCOps?

    Thx,
    Didier

    • Andy G says

      May 24, 2011 at 8:30 am

      Hi Didier

      I have vCOps Std in my lab and I really find little comparable between the two.  vCOps Std analyzes performance metrics that syslog does not monitor.  Perhaps the Configuration Management portion of vCOps Enterprise Edition might provide greater similarities however I have not yet had any exposure to Enterprise Edition.  Splunk could very well provide change management and audit trail alerts that you do not get in vCOps Std.  

      There may be more merit to revisit this come the release of the VMware for Splunk app (speculation on my part) whenever that may be.  

      Andy

  5. Michael Wilde says

    May 24, 2011 at 9:23 am

    Splunk User Conference is coming up in August… lots of goodness coming.  VMware app?  Dunno.. we’ll see!

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Veeam Backup & Replication v13 Beta: A Game-Changer with Linux
  • What is Veeam Data Cloud Vault and how it can help SMBs
  • Nakivo Backup and Replication – Malware Scan Feature
  • Zerto 10 U7 released with VMware NSX 4.2 Support
  • XorMon NG 1.9.0 Infrastructure Monitoring – now also with Veeam Backup Support
  • Heartbeat vs Node Majority StarWind VSAN Failover Strategy
  • Vulnerability in your VMs – VMware Tools Update
  • FREE version of StarWind VSAN vs Trial of Full version
  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in