Splunk doesnt support Ruby scripts out of the box. You have a few options though.
You can wrap your ruby code in a powershell script and setup the powershell script as a scripted input.
You can wrap your ruby code in a batch script and setup the batch script as a scripted input.
You can wrap your ruby code in a python script and setup the python script as a scripted input.
See inputs.conf for configuring scripted inputs.
How do you wrap a script you may ask?
In c:\run_my_ruby.bat you might do this:
c:\path\to\your\ruby.exe your_ruby_code.rb
Then in Splunk inputs.conf you could do this
[script://c:\run_my_ruby.bat]
interval = 60
Then restart splunk and profit. This would execute c:\run_my_ruby.bat every 60s from when splunk is restarted. Check inputs.conf for other interval options.
... View more