All Apps and Add-ons

Splunk App for AWS CPU stats collection error with get_ops.py

davidts
Path Finder

Hi,

I have just installed the Splunk App for AWS and I can see my billing information in the dashboards. However, there are two panels that show CPU Utilisation which are showing no results. The app uses a python script, get_ops.py, to collect the CPU stats. When I run the script in terminal I get the following error:

Traceback (most recent call last):
File "./get_ops.py", line 125, in
fOPSTMP.write(dt+' subaccount='+cols[0]+' region='+rn+' instanceid='+iid+' instancetype='+citype+' cpuutilization='+cpu1+' networkin='+ntin1+' networkout='+ntout1+'\n')
NameError: name 'dt' is not defined

Has anyone seen this error before?

0 Karma
1 Solution

ICTMoretonbay
Explorer

Yes I am seeing this as well as a bunch of other errors.

Have you resolved your problem yet?

View solution in original post

0 Karma

aandrieu
Engager

I resolved the problem adding a tab before "fOPSTMP.write" at line 125: this is due to an indentation problem.

0 Karma

ICTMoretonbay
Explorer

Yes I am seeing this as well as a bunch of other errors.

Have you resolved your problem yet?

0 Karma

davidts
Path Finder

Unfortunately I have not manage to fix this issue.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...