Deployment Architecture

Best practice to integrate Citrix mcs to Splunk

dantimola
Communicator

Hi, Splunkers,

Can someone suggest what is the best practice to integrate Citrix mcs to Splunk? Our case is, we can't install splunk universal forwarder on the citrix servers because the server is frequently rebooting, once rebooted, the server will start to its original state meaning all installed app, configuration changes will be removed (just like deep freeze). Thanks.

Cheers,
Dan

0 Karma
1 Solution

jconger
Splunk Employee
Splunk Employee

You have a couple of options:

View solution in original post

jconger
Splunk Employee
Splunk Employee

You have a couple of options:

dantimola
Communicator

Is there any deployment application out there for Citrix MCS?

0 Karma

FloydArtWorks
New Member

For MCS, the biggest challenge is creating unique GUIDs for machines in the catalog under instance.cfg. Follow the procedure mentioned below:

1. Create the master image and install splunk forwarder.
2. Stop the Splunk Forwarder service and mark it as disabled under services.msc.

3. Run the clone-prep-clear-config command as described in following link:
Integrate a universal forwarder onto a system image | Splunk Docs

4. Create a scheduled task to run at system startup, under actions point to a powershell script with following content: (Make sure the execution policy for powershell is set correctly so script can run)

# Paths
$CfgPath = "C:\Program Files\SplunkUniversalForwarder\etc\instance.cfg"

# Use hostname as deterministic identity
$hostname = $env:COMPUTERNAME.ToUpper()

# Generate SHA-256 hash
$bytes = [System.Text.Encoding]::UTF8.GetBytes($hostname)
$sha256 = [System.Security.Cryptography.SHA256]::Create()
$hash = $sha256.ComputeHash($bytes)

# Create a proper strongly-typed byte array (16 bytes for GUID)
[byte[]]$guidBytes = $hash[0..15]

# Cast to byte[] manually to avoid argument expansion
$guid = [System.Guid]::new($guidBytes)

# Ensure directory exists
$folder = Split-Path $CfgPath
if (!(Test-Path $folder)) {
New-Item -ItemType Directory -Path $folder -Force | Out-Null
}

# Write instance.cfg
$content = "[general]`nguid = $guid"
Set-Content -Path $CfgPath -Value $content -Force

# Configure the service startup type for Splunk Forwarder service as Automatic and start it

Set-Service -Name "SplunkForwarder" -StartupType Automatic

Start-Service -Name "SplunkForwarder

4. Shutdown the machine and create snapshot.
5. Create a non-persistent MCS catalog using this snapshot. Each machine will generate a separate GUID and also the GUID will persist over reboots.

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...