Below is a step-by-step guide on how to ingest IIS logs from a Cloudmersive Private Cloud deployment (which uses IIS) into Splunk. These instructions assume that you have administrative access to both the Windows Server where Cloudmersive Private Cloud is running (and thus where IIS logs reside) and the Splunk environment (either Splunk Enterprise or Splunk Cloud).
Prerequisites
-
Administrative Permissions:
- You must have administrative privileges on the Windows Server hosting Cloudmersive Private Cloud (IIS logs).
- You must have credentials with sufficient permissions to configure Splunk data inputs and/or install forwarders on the Windows Server.
-
Splunk Universal Forwarder:
- If you plan to forward IIS log data from a Windows Server to a Splunk indexer (or Heavy Forwarder), you need to install the Splunk Universal Forwarder on the same host running Cloudmersive Private Cloud.
-
Windows IIS:
Install and Configure Splunk Universal Forwarder
Skip this section if you already have a Splunk forwarder installed and running on your Windows Server.
-
Download and install the Universal Forwarder:
- Download the appropriate Universal Forwarder installer for your Windows version from Splunk Downloads.
- Run the installer with administrative privileges.
- Follow the prompts and provide the required configuration details (Splunk credentials, default management port, etc.).
-
Obtain the Splunk Receiver Information:
- You will need the Splunk indexer’s hostname or IP and the receiving port (often
9997
by default) if you are sending logs directly to the indexer or heavy forwarder.
-
Enable Receiving on the Splunk Indexer (if needed):
- In Splunk Web on the Indexer:
- Go to Settings > Forwarding and receiving > Receive data.
- Click New Receiving Port and enter the port (e.g.,
9997
).
- Save your changes.
-
Configure the Forwarder to send data to the Indexer:
-
On the Windows Server, open the Splunk Universal Forwarder configuration file outputs.conf
, typically found under:
C:\Program Files\SplunkUniversalForwarder\etc\system\local\outputs.conf
-
Add or update the [tcpout]
settings to point to your Splunk Indexer:
[tcpout]
defaultGroup = default-auto
[tcpout:default-auto]
server = <your_indexer_hostname_or_IP>:9997
-
Restart the Universal Forwarder service for changes to take effect.
net stop splunkforwarder
net start splunkforwarder
Identify the IIS Log Directory
By default, IIS logs are stored under:
C:\inetpub\logs\LogFiles\
Each site configured within IIS typically has its own sub-folder (e.g., W3SVC1
, W3SVC2
, etc.). Confirm the specific path for Cloudmersive Private Cloud’s IIS site logs by:
- Opening Internet Information Services (IIS) Manager.
- Right-clicking on the specific site (Cloudmersive Private Cloud site).
- Selecting Explore or Open Feature for Logging to identify the folder path.
Configure the Universal Forwarder to Monitor IIS Logs
-
Open the inputs.conf
file:
-
Create a new monitor stanza for IIS logs:
- Add a stanza that points to your IIS log directory and set the correct sourcetype for IIS logs. For instance:
[monitor://C:\inetpub\logs\LogFiles\W3SVC*]
sourcetype = iis
index = iis_logs ; Or any index you prefer. Must be defined in Splunk
disabled = 0
- Note: If you prefer to monitor all subdirectories under
LogFiles
, you can use:
[monitor://C:\inetpub\logs\LogFiles\*]
sourcetype = iis
index = iis_logs
disabled = 0
-
Save and Exit:
Create/Verify the IIS Index in Splunk
If you’ve specified a custom index (e.g., iis_logs
) in inputs.conf
, ensure it exists on your Splunk indexer:
- In Splunk Web, go to Settings > Indexes.
- Click New Index (if not already created).
- Provide a name, e.g.,
iis_logs
.
- Save the new index.
(Optional) Install and Configure the Splunk Add-on for Microsoft IIS
For better field extractions and CIM compliance, you can use the Splunk Add-on for Microsoft IIS. This add-on automatically extracts many IIS fields and makes searches easier.
- Download the Add-on from Splunkbase.
- Install the Add-on on your search head (and on your heavy forwarders if relevant).
- Configure the add-on to process data with the sourcetype
iis
or a custom sourcetype you define.
Validate Data Ingestion
-
Log in to Splunk (either Enterprise or Cloud).
-
Navigate to Search & Reporting (or Search in Splunk Cloud).
-
Run a search for your index and sourcetype:
index=iis_logs sourcetype=iis
or if you used a different index name, adjust accordingly.
-
Check for New Events:
- You should see events corresponding to your IIS logs.
- Confirm fields are properly extracted (e.g.,
date_time
, cs_uri_stem
, sc_status
, etc.) if using the Splunk Add-on for Microsoft IIS.
-
Troubleshoot if necessary:
- Verify the Universal Forwarder is running.
- Check
splunkd.log
on the forwarder for errors (found in C:\Program Files\SplunkUniversalForwarder\var\log\splunk\
).
- Confirm that the Indexer is receiving traffic (forwarder management screen or Monitoring Console in Splunk).
Recommended Search & Dashboards
Once data is flowing, you can create dashboards to monitor key metrics from your Cloudmersive Private Cloud instance:
-
Requests Over Time:
index=iis_logs sourcetype=iis
| timechart count by cs_method
-
Top 10 URIs:
index=iis_logs sourcetype=iis
| stats count by cs_uri_stem
| sort -count
| head 10
-
HTTP Status Breakdown:
index=iis_logs sourcetype=iis
| stats count by sc_status
| sort -count
Use these searches as a starting point for further exploration and to build operational dashboards.
Summary
By following these steps:
- Install and configure the Splunk Universal Forwarder on the Windows Server running IIS for Cloudmersive Private Cloud.
- Set up monitor inputs for the IIS log directory in
inputs.conf
.
- Specify the correct sourcetype (e.g.,
iis
) and index (e.g., iis_logs
).
- Validate ingestion by searching the logs in Splunk.
This setup ensures comprehensive visibility into your Cloudmersive Private Cloud’s IIS logs, allowing you to monitor activity, troubleshoot issues, and generate insights through Splunk dashboards and alerts.