<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344437#M94853</link>
    <description>&lt;P&gt;After upgrading from TA-OMS_Inputs from v1.2 to v1.3.3 on, splunk v6.5.4 we are getting the following errors when log retrieval is attempted.  The upgrade was achieved by removing the old version and installing the new version. Log retrieval from OMS was successful with v1.2 &lt;/P&gt;

&lt;P&gt;ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" Traceback (most recent call last):&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/ta_oms_inputs/modinput_wrapper/base_modinput.py", line 127, in stream_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     self.collect_events(ew)&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py", line 96, in collect_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     input_module.collect_events(self, ew)&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/input_module_oms_inputs.py", line 108, in collect_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     event = Event()&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" NameError: global name 'Event' is not defined&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" ERRORglobal name 'Event' is not defined&lt;/P&gt;

&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/199197"&gt;@jkat54&lt;/a&gt; are you able to advise.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:05:32 GMT</pubDate>
    <dc:creator>pete_meyers</dc:creator>
    <dc:date>2020-09-29T19:05:32Z</dc:date>
    <item>
      <title>What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344437#M94853</link>
      <description>&lt;P&gt;After upgrading from TA-OMS_Inputs from v1.2 to v1.3.3 on, splunk v6.5.4 we are getting the following errors when log retrieval is attempted.  The upgrade was achieved by removing the old version and installing the new version. Log retrieval from OMS was successful with v1.2 &lt;/P&gt;

&lt;P&gt;ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" Traceback (most recent call last):&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/ta_oms_inputs/modinput_wrapper/base_modinput.py", line 127, in stream_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     self.collect_events(ew)&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py", line 96, in collect_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     input_module.collect_events(self, ew)&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"   File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/input_module_oms_inputs.py", line 108, in collect_events&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py"     event = Event()&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" NameError: global name 'Event' is not defined&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py" ERRORglobal name 'Event' is not defined&lt;/P&gt;

&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/199197"&gt;@jkat54&lt;/a&gt; are you able to advise.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344437#M94853</guid>
      <dc:creator>pete_meyers</dc:creator>
      <dc:date>2020-09-29T19:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344438#M94854</link>
      <description>&lt;P&gt;Hi Pete,&lt;/P&gt;

&lt;P&gt;I took a quick look at the code for the latest version .&lt;BR /&gt;
I believe this error message is due to a missing import statement in &lt;CODE&gt;input_module_oms_inputs.py&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The missing import would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;from splunklib.modularinput import *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which holds definition of the Event class.&lt;/P&gt;

&lt;P&gt;Not sure if your tag was taken into account there, so I'll tag the author again so he can have a look and confirm if that is indeed the problem.&lt;/P&gt;

&lt;P&gt;@jkat54&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344438#M94854</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-20T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344439#M94855</link>
      <description>&lt;P&gt;Almost looks as if it’s failing to populate a variable called Event.  Which makes me think something else is failing.  &lt;/P&gt;

&lt;P&gt;I have an even newer version of the app in development on my machine so I can’t load the old one to test just yet.&lt;/P&gt;

&lt;P&gt;Can you tell me what this search reveals?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*oms*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 18:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344439#M94855</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-04-20T18:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344440#M94856</link>
      <description>&lt;P&gt;Thanks for tagging me&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 18:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344440#M94856</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-04-20T18:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344441#M94857</link>
      <description>&lt;P&gt;Hi Michael,&lt;/P&gt;

&lt;P&gt;Here's the anonymized contents of /opt/splunk/var/log/splunk/ta_oms_inputs_oms_inputs.log with debug logging enabled for the add-on&lt;/P&gt;

&lt;P&gt;2018-xx-xx xx:28:33,494 INFO pid=36937 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1&lt;BR /&gt;
2018-xx-xx xx:28:35,251 INFO pid=36937 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1&lt;BR /&gt;
2018-xx-xx xx:28:38,184 INFO pid=36937 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1&lt;BR /&gt;
2018-xx-xx xx:28:41,160 INFO pid=36937 tid=MainThread file=splunk_rest_client.py:_request_handler:100 | Use HTTP connection pooling&lt;BR /&gt;
2018-xx-xx xx:28:41,160 DEBUG pid=36937 tid=MainThread file=binding.py:get:664 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/TA_OMS_Inputs_checkpointer" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/TA_OMS_Inputs_checkpointer&lt;/A&gt; (body: {})&lt;BR /&gt;
2018-xx-xx xx:28:41,161 INFO pid=36937 tid=MainThread file=connectionpool.py:_new_conn:758 | Starting new HTTPS connection (1): 127.0.0.1&lt;BR /&gt;
2018-xx-xx xx:28:41,171 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_make_request:387 | "GET /servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/TA_OMS_Inputs_checkpointer HTTP/1.1" 200 5526&lt;BR /&gt;
2018-xx-xx xx:28:41,172 DEBUG pid=36937 tid=MainThread file=binding.py:new_f:71 | Operation took 0:00:00.011681&lt;BR /&gt;
2018-xx-xx xx:28:41,172 DEBUG pid=36937 tid=MainThread file=binding.py:get:664 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/&lt;/A&gt; (body: {'offset': 0, 'search': 'TA_OMS_Inputs_checkpointer', 'count': -1})&lt;BR /&gt;
2018-xx-xx xx:28:41,175 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_make_request:387 | "GET /servicesNS/nobody/TA-OMS_Inputs/storage/collections/config/?offset=0&amp;amp;search=TA_OMS_Inputs_checkpointer&amp;amp;count=-1 HTTP/1.1" 200 4724&lt;BR /&gt;
2018-xx-xx xx:28:41,177 DEBUG pid=36937 tid=MainThread file=binding.py:new_f:71 | Operation took 0:00:00.005082&lt;BR /&gt;
2018-xx-xx xx:28:41,179 DEBUG pid=36937 tid=MainThread file=binding.py:get:664 | GET request to &lt;A href="https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/data/TA_OMS_Inputs_checkpointer/last_date" target="_blank"&gt;https://127.0.0.1:8089/servicesNS/nobody/TA-OMS_Inputs/storage/collections/data/TA_OMS_Inputs_checkpointer/last_date&lt;/A&gt; (body: {})&lt;BR /&gt;
2018-xx-xx xx:28:41,181 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_make_request:387 | "GET /servicesNS/nobody/TA-OMS_Inputs/storage/collections/data/TA_OMS_Inputs_checkpointer/last_date HTTP/1.1" 404 140&lt;BR /&gt;
2018-xx-xx xx:28:41,192 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Performing instance discovery: &lt;A href="https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" target="_blank"&gt;https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/A&gt;&lt;BR /&gt;
2018-xx-xx xx:28:41,192 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Performing static instance discovery&lt;BR /&gt;
2018-xx-xx xx:28:41,192 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Authority validated via static instance discovery&lt;BR /&gt;
2018-xx-xx xx:28:41,193 INFO pid=36937 tid=MainThread file=log.py:info:103 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - TokenRequest:Getting token with client credentials.&lt;BR /&gt;
2018-xx-xx xx:28:41,193 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - TokenRequest:No user_id passed for cache query&lt;BR /&gt;
2018-xx-xx xx:28:41,193 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:finding with query: {"_clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}&lt;BR /&gt;
2018-xx-xx xx:28:41,193 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Looking for potential cache entries:&lt;BR /&gt;
2018-xx-xx xx:28:41,193 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:{"_clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}&lt;BR /&gt;
2018-xx-xx xx:28:41,193 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Found 0 potential entries.&lt;BR /&gt;
2018-xx-xx xx:28:41,207 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_new_conn:809 | Starting new HTTPS connection (1): login.microsoftonline.com&lt;BR /&gt;
2018-xx-xx xx:28:41,383 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_make_request:400 | &lt;A href="https://login.microsoftonline.com:443" target="_blank"&gt;https://login.microsoftonline.com:443&lt;/A&gt; "POST /xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/token?api-version=1.0 HTTP/1.1" 200 1376&lt;BR /&gt;
2018-xx-xx xx:28:41,386 INFO pid=36937 tid=MainThread file=log.py:info:103 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Get Token Server returned this correlation_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;BR /&gt;
2018-xx-xx xx:28:41,387 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Adding entry AccessTokenId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;BR /&gt;
2018-xx-xx xx:28:41,391 DEBUG pid=36937 tid=MainThread file=log.py:debug:108 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Added entry is MRRT&lt;BR /&gt;
2018-xx-xx xx:28:41,393 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_new_conn:809 | Starting new HTTPS connection (1): management.azure.com&lt;BR /&gt;
2018-xx-xx xx:28:43,433 DEBUG pid=36937 tid=MainThread file=connectionpool.py:_make_request:400 | &lt;A href="https://management.azure.com:443" target="_blank"&gt;https://management.azure.com:443&lt;/A&gt; "POST /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/x-xxx-xx-xxxx-xxx-xx/providers/Microsoft.OperationalInsights/workspaces/xxxxxx-xxx-xxxxx/search?api-version=2017-04-26-preview HTTP/1.1" 200 None&lt;BR /&gt;
2018-xx-xx xx:28:43,465 DEBUG pid=36937 tid=MainThread file=base_modinput.py:log_debug:286 | OMSInputName="PCEtest" status="200" step="Post Query" search_params="{'start': '2018-xx-xxT00:00:00', 'top': '1000', 'query': 'Type=xxxxxxxxx', 'end': '2018-xx-xxTxx:28:41'}'&lt;BR /&gt;
2018-xx-xx xx:28:43,619 ERROR pid=36937 tid=MainThread file=base_modinput.py:log_error:307 | Get error when collecting events.&lt;BR /&gt;
Traceback (most recent call last):&lt;BR /&gt;
  File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/ta_oms_inputs/modinput_wrapper/base_modinput.py", line 127, in stream_events&lt;BR /&gt;
    self.collect_events(ew)&lt;BR /&gt;
  File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/oms_inputs.py", line 96, in collect_events&lt;BR /&gt;
    input_module.collect_events(self, ew)&lt;BR /&gt;
  File "/opt/splunk/etc/apps/TA-OMS_Inputs/bin/input_module_oms_inputs.py", line 108, in collect_events&lt;BR /&gt;
    event = Event()&lt;BR /&gt;
NameError: global name 'Event' is not defined&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:11:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344441#M94857</guid>
      <dc:creator>pete_meyers</dc:creator>
      <dc:date>2020-09-29T19:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344442#M94858</link>
      <description>&lt;P&gt;Hi Damien,&lt;/P&gt;

&lt;P&gt;Thanks for the reply&lt;/P&gt;

&lt;P&gt;Adding  the missing import on line 5 of input_module_oms_inputs.py did the trick.&lt;/P&gt;

&lt;P&gt;Collection is now successful.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344442#M94858</guid>
      <dc:creator>pete_meyers</dc:creator>
      <dc:date>2020-09-29T19:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: What's causing the error global name 'Event' is not defined after upgrading Microsoft OMS Modular Inputs TA from v1.2 to v1.3.3?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344443#M94859</link>
      <description>&lt;P&gt;Not sure how this happened.  I’m using the add-on builder to package this thing...&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 11:36:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/What-s-causing-the-error-global-name-Event-is-not-defined-after/m-p/344443#M94859</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-04-23T11:36:40Z</dc:date>
    </item>
  </channel>
</rss>

