joseph-holland / lambda-graffiti-monkey

An AWS Lambda function to run Graffiti Monkey
Apache License 2.0
15 stars 8 forks source link

filter option not working #12

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hi Guys,

I am trying to use filter option for one particular instance or tag value buts not working. Can anyone help me on this please. want to test on one instance first in PROD before implementing in entire environment.

joseph-holland commented 6 years ago

Hi @vishalbaghla , Apologies for not coming back to you sooner. What's happening with the filter option? You say you've tried tags and instance ids.

See more info in graffiti_monkey source:

# Filter values with the same key (eg, tag:app) are an OR
# Different filter keys are an AND operation (eg, tag:app and tag:team)
# See the Filter section in http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html#API_DescribeInstances_RequestParameters
# Example entries:
#    'tag:app':   ['app1', 'app2']
#    'tag:team': 'team1'

-Joe

joseph-holland commented 6 years ago

I've also thought of something that should assist you. Graffiti Monkey supports running in dry run mode where it will not make any changes, but only output what it would have done if ran fully.

I can implement a new feature to allow a DRY_RUN environment variable to be specified. Defaults to false, but can be to true to only test the function.

How does this sound?