All Apps and Add-ons

Citrix XenServer Technology Add-on (TA-XS60-Server) hypervisor:xenserver:sr sourcetype not being populated correctly

cpayne_satisnet
New Member

The sourcetype hypervisor:xenserver:sr isn't being populated correctly in one of the environments I need to work in.

In the inputs.conf of the TA, it shows that bin/getSR.py is populating this.

When manually running the script by the following from the app directory, it outputs some of the SR's then silently dies.

/opt/splunkforwarder/bin/splunk cmd /usr/bin/python bin/getSR.py

0 Karma

cpayne_satisnet
New Member

I found this was dying on:-
if(srRecord["shared"] and srRecord["other_config"]["XenCenter.CustomFields.vol_name"]):
out += " vol_name=%s" % (srRecord["other_config"]["XenCenter.CustomFields.vol_name"])

I changed the script to be :-

    # added try/except to stop script failing after a couple of records
    try:
        if(srRecord["shared"] and srRecord["other_config"]["XenCenter.CustomFields.vol_name"]):
            out += " vol_name=%s" % (srRecord["other_config"]["XenCenter.CustomFields.vol_name"])
    except:
        pass
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...