Splunk Dev

Splunk for Cloudwatch

michaeloleary
Path Finder

Hi Folks,

I was wondering if you ladies/gents could help me. I'm trying to integrate Splunk for Cloudwatch to pick up message that are in an SQS. I have created and SNS and test alarms and I can see these passing the the SQS.

I have also created and AWS secret key and an access key to query the cloudwatch and edited this in the aws_sqs.py

access_key = 'blah'
secret_key = 'blah'
queue_name = 'splunk_cloudwatch_test_sqs'

Unfortunately I'm getting an error when I'm attempting to poll the SQS as seen in the output below.

[*************** bin]# ./aws_sqs.py
Traceback (most recent call last):
File "./aws_sqs.py", line 45, in
q.set_message_class(RawMessage)
AttributeError: 'NoneType' object has no attribute 'set_message_class'
[*************** bin]#

Could anyone point me in the right direction as to what I'm missing that could be causing this issue?

Regards
Michael

Tags (1)
0 Karma

michaeloleary
Path Finder

Actually it was just a problem with the version of python-boto that was installed on the system. Version 2.5 of python-boto was installed by upgrading to python-boto 2.10 the issue was solved and now I can see all regions. Just something to watch out for if you guys are doing any work with AWS in the future. I also explicitly told the script to connect to the APAC southeast 2 region using the boto.sqs.connect_to_region() object found in the docs below.

Docs:
http://boto.readthedocs.org/en/latest/sqs_tut.html

[RegionInfo:us-east-1, RegionInfo:eu-west-1, RegionInfo:us-west-1, RegionInfo:us-west-2, RegionInfo:sa-east-1, RegionInfo:ap-northeast-1, RegionInfo:ap-southeast-1, RegionInfo:ap-southeast-2]
2.10.0
[Queue(https://ap-southeast-2.queue.amazonaws.com//splunk_test_queue_ap_southeast_2)]

0 Karma

walmc
New Member

Hi,

Looks like you are trying to call set_message_class on a 'NoneType' .. so my bet is that what was returned from sqs.get_queue(queue_name) was None .. i.e you dont have a SQS queue with that name set up in your account.

Wal

0 Karma

michaeloleary
Path Finder

The queue was setup but because python-boto 2.5 was unable to see the ap-southeast-2 region It was returning None instead of the queue that I created. Cheers Walmc for the information, I'm not really a python programmer so the info you gave me got me started on the right track.

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...