All Apps and Add-ons

KeyError: 'LaunchConfigurationName' in Splunk App for AWS

cemeyer2
Explorer

I am seeing thousands of errors in my splunk logs from the App for AWS in the form:

2019-02-18 15:46:34,156 level=ERROR pid=26588 tid=MainThread logger=splunk_ta_aws.modinputs.cloudwatch.handler pos=utils.py:wrapper:71 | start_time=1550504529.1, iam_role="" region="========" account="==========", datainput="cloudwatch_===========" region="us-east-1" | message="Task was interrupted by an unhandled exception." 
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/Splunk_TA_aws/bin/splunksdc/utils.py", line 69, in wrapper
    return func(*args, **kwargs)
  File "/opt/splunk/etc/apps/Splunk_TA_aws/bin/splunk_ta_aws/modinputs/cloudwatch/handler.py", line 121, in run
    metrics = self._load_metrics(checkpoint, client)
  File "/opt/splunk/etc/apps/Splunk_TA_aws/bin/splunk_ta_aws/modinputs/cloudwatch/handler.py", line 128, in _load_metrics
    metrics = self._discover(client)
  File "/opt/splunk/etc/apps/Splunk_TA_aws/bin/splunk_ta_aws/modinputs/cloudwatch/handler.py", line 160, in _discover
    for metrics in self._discovery(client):
  File "/opt/splunk/etc/apps/Splunk_TA_aws/bin/splunk_ta_aws/modinputs/cloudwatch/discovery/ec2.py", line 121, in __call__
    lcn = group['LaunchConfigurationName']
KeyError: 'LaunchConfigurationName'

It seems like this might be what is causing my ec2 insights page to not display any data. Is there some configuration I missed when setting up the add on?

brt
Loves-to-Learn

Did you ever get this resolved?
I'm getting the same exact error on a brand new Splunk AWS add-on installation (I have restarted it since the install).

0 Karma

Vijeta
Influencer

Did any of the configs for AWS TA changed, like any of the API keys. Check if all the keys are same in AWS for your inputs in Splunk AWS add-on.The message in your first line is "Task was interrupted by an unhandled exception". This message seems to be for cloudwatch input, see if something changed.

0 Karma

cemeyer2
Explorer

nothing should have changed, been seeing this error since I configured the addon

0 Karma

Vijeta
Influencer

Did you restart after doing the config. I was getting error from python script regarding authentication and for me restarting the Heavy forwarder where my add-on was configured resolved the issue.

0 Karma

cemeyer2
Explorer

yep, its been restarted several times

0 Karma

adityapavan27
Engager

@cemeyer2 : Any luck resolving this?

0 Karma

ngohel
Explorer

I have had the same error.  I was able to eliminate that error by updating the ec2.py script as suggested by Splunk Support Team.

Update from Splunk Support:

Please try the following workaround

  1. Open %SPLUNK_HOME/etc/apps/Splunk_TA_aws/bin/splunk_ta_aws/modinputs/cloudwatch/discovery/ec2.py
  2. Find the following lines, those lines should be located at line 120 to line 123

for group in auto_scaling_groups:    

lcn = group['LaunchConfigurationName']   

typename = configurations[lcn]   

metric_names = self._create_metric_names(typename)

  1. Remove line 121 and hardcode the typename, it should looks like the following text after editing  

for group in auto_scaling_groups:   

typename = 'c5'   

metric_names = self._create_metric_names(typename)

using your corresponding instance type.

There is a known limitation of AWS Launch template instance type detection.

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...