All Apps and Add-ons

urlopen error [Errno -2] Name or service not known when sending an alert to Xmatters?

natalienguyenme
Explorer

Hello,

We have the xmatters Splunk app installed on our Splunk Cloud SH.

It's not sending alerts to xmatters and the xmatters log is coming up with the below.

I've tested the app on my own instance and xmatters has tested it on their end and both splunk instances are sending alerts to xmatters.

Has anyone come across this issue? I think the SH might be having issues when resolving the xmatters URL, but how do I get Splunk Cloud Support to look at this if the app is not supported?

2020-04-05 23:45:37,954 ERROR [xmatters.alert_action.main] [xmatters] [<module>] [14006] <urlopen error [Errno -2] Name or service not known>
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/xmatters_alert_action/bin/xmatters.py", line 143, in <module>
    REQUEST_ID = XM_ALERT.execute()
  File "/opt/splunk/etc/apps/xmatters_alert_action/bin/xmatters.py", line 119, in execute
    request_id = xm_client.send_event(self.endpoint_url, xm_event)
  File "/opt/splunk/etc/apps/xmatters_alert_action/lib/xmatters_sdk/xm_client.py", line 61, in send_event
    force_https=True
  File "/opt/splunk/etc/apps/xmatters_alert_action/lib/common_utils/rest.py", line 160, in post
    return self._send_request(req, headers)
  File "/opt/splunk/etc/apps/xmatters_alert_action/lib/common_utils/rest.py", line 100, in _send_request
    res = urllib2.urlopen(req)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 1241, in https_open
    context=self._context)
  File "/opt/splunk/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>
Labels (1)
0 Karma
1 Solution

natalienguyenme
Explorer

Turns out that this was an issue with the Splunk precedence. Splunk Cloud support changed the precedence and the alerts are now working.

View solution in original post

0 Karma

natalienguyenme
Explorer

Turns out that this was an issue with the Splunk precedence. Splunk Cloud support changed the precedence and the alerts are now working.

0 Karma

tdepuy
Path Finder

Hi!
That's not good. The error indicates the underlying python code can't resolve the address of the url. So this means the machine doesn't know about the xmatters.com domain, or the url is somehow mis-configured. Can you double (triple?) check the "Inbound Integration URL" in the xMatters App configuration page. You can see a screen shot on this page, in the "How to install the xMatters integration in Splunk" section:
https://help.xmatters.com/integrations/logmgmt/splunk.htm?cshid=Splunk

The url in that field should be the url generated in the built-in configuration on the xMatters side.

If the url is correct, I would be interested if you get the same error using "https://www.google.com". If you do get the same error that would definitely point to a DNS configuration issue on the box and you'd need to follow up with Splunk support. If you get a different error, it still might be a DNS issue, but might help point us in the right direction.

(full disclosure, I work for xMatters)
Happy Tuesday!

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...