Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Add missing instance size and normalization factor #7

Merged
merged 2 commits into from Aug 26, 2019

Conversation

chaspy
Copy link
Contributor

@chaspy chaspy 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 August 26, 2019 10:49
@chaspy
Copy link
Contributor Author

chaspy 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
Copy link
Contributor Author

chaspy commented Aug 26, 2019

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

Copy link
Contributor

@isaoshimizu isaoshimizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@chaspy chaspy deleted the chaspy/add-missing-instance-class branch August 26, 2019 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants