Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing instance size and normalization factor #7

Merged
merged 2 commits into from Aug 26, 2019

Conversation

@chaspy
Copy link
Contributor

commented Aug 26, 2019

Found the following error.

2019-08-24 12:40:11 UTC | ERROR | dd.collector | checks.aws_ec2_count(__init__.py:841) | Check 'aws_ec2_count' instance #0 failed
Traceback (most recent call last):
  File "/opt/datadog-agent/agent/checks/__init__.py", line 824, in run
    self.check(copy.deepcopy(instance))
  File "/etc/dd-agent/checks.d/aws_ec2_count.py", line 318, in check
    reserved_instances = fetcher.get_reserved_instances()
  File "/etc/dd-agent/checks.d/aws_ec2_count.py", line 246, in get_reserved_instances
    reserved_instance['InstanceType'],
  File "/etc/dd-agent/checks.d/aws_ec2_count.py", line 132, in get_itype
    return self.get(az, family, size)
  File "/etc/dd-agent/checks.d/aws_ec2_count.py", line 126, in get
    self.__instances[az][family][size] = InstanceCounter(NormalizationFactor.get_value(size))
  File "/etc/dd-agent/checks.d/aws_ec2_count.py", line 31, in get_value
    raise TypeError('unknown instance size : {}'.format(size))
TypeError: unknown instance size : 12xlarge

@chaspy chaspy marked this pull request as ready for review Aug 26, 2019

@chaspy

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2019

Hi, @mounemoi
Thank you for the very useful software!
After we start using 12xlarge class, the agent didn't work.

If I should write more test, I would be happy if you could guide me 🙏
Please review and merge.

@chaspy

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2019

I applied these changes to our agent's configuration, it works fine 👍

@isaoshimizu
Copy link
Member

left a comment

On behalf of @mounemoi, there was no problem with review and operation check. Thank you for the pull request.

@isaoshimizu isaoshimizu merged commit 86bc059 into mixi-inc:master Aug 26, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chaspy chaspy deleted the chaspy:chaspy/add-missing-instance-class branch Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.