Comments (7)
🎉 Thanks for opening your first issue here! Welcome to the community!
from pcs-sizing-scripts.
Thank you for this report. I see that
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#output
Prisma Cloud only counts running instances when calculating credit consumption. In your possible solution, you did not include this filter:
--filters "Name=instance-state-name,Values=running"
https://github.com/PaloAltoNetworks/pcs-sizing-scripts/blob/main/aws/resource-count-aws.sh#L106
Could you explain why this script should count stopped instances?
I see that AmiLaunchIndex
is documented as a property of a described instance:
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#output
How does the existence of the AmiLaunchIndex
property change the count of this script?
If you could provide example output (with any sensitive data redacted) from a call to describe-instances
with the AmiLaunchIndex
and State
properties, similar to:
We could test this.
Thanks!
from pcs-sizing-scripts.
Thank you for your reply.
--filters "Name=instance-state-name,Values=running"
My possible solution is include this filter, because this filter include the function aws_ec2_describe_instances.
https://github.com/PaloAltoNetworks/pcs-sizing-scripts/blob/main/aws/resource-count-aws.sh#L107
I will provide an example output below.
In this case, the desired count is 3, but the current count is 2.
{
"Reservations": [
{
"Groups": [],
"Instances": [
{
"AmiLaunchIndex": 0,
"InstanceId": "i-01234567890",
}
],
},
{
"Groups": [],
"Instances": [
{
"AmiLaunchIndex": 0,
"InstanceId": "i-abcdefghijk",
},
{
"AmiLaunchIndex": 1,
"InstanceId": "i-567890abcde",
}
]
}
]
}
Would you please confirm?
Thanks!
from pcs-sizing-scripts.
Sorry, I missed that those filters are defined in the function.
This appears to be an issue with the output from aws ec2 describe-instances
having Reservations
as the outer object rather than Instances
as the outer object, rather than the existence of AmiLaunchIndex
.
I don't know if this is a recent change in the output, given ...
550a5e4#diff-df255a31916be93e0b704bdc951dbbcd607fe60c7a9f25ac3513edb61dcf96e6R15
... or if it is somehow context-sensitive, but I'll submit a PR that expects:
{
"Reservations": [{
"Groups": [],
"Instances": [{
"InstanceId": "0abcdef1234567890"
},
{
"InstanceId": "0abcdef1234567891"
}
]
},
{
"Groups": [],
"Instances": [{
"InstanceId": "1abcdef1234567890"
}]
}
]
}
Rather than:
{
"Instances": [{
"InstanceId": "0abcdef1234567890"
}]
}
... from the aws ec2 describe-instances
command.
from pcs-sizing-scripts.
@HeroInfinity could you confirm this fix?
from pcs-sizing-scripts.
@tkishel Great! I've solved it.
from pcs-sizing-scripts.
Thank your for reporting and confirming!
from pcs-sizing-scripts.
Related Issues (10)
- [Community Health Assessment] Changes needed HOT 5
- AWS accounts beginning in 0 generate error at line 190 HOT 3
- Update AWS sizing script to include a "--compute" parameter rather than 2 separate scripts HOT 2
- AWS Organizations integration fails after scanning the first member account HOT 2
- Convert documentation from PDF to Markdown HOT 1
- Support for ELBv2 HOT 4
- Aliyun Sizing Script HOT 1
- Please can we have resource counts for ELBs and EKS clusters? HOT 2
- ECS Task is not counted correctly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcs-sizing-scripts.