4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    page 1 / 1
    4 results tagged boto x
    • Note: some draft about monitoring beanstalk applications health with boto3 python script
      import pprint
      p = pprint.PrettyPrinter(indent=4)
      p.pprint(x)

      or

      import pprint
      pprint.pformat(x)


      import logging
      import pprint
      logging.info(pprint.pformat(dict))



       $ cat monitor_beanstalk.py
      #!/bin/python

      import boto3
      import pprint
      pp = pprint.PrettyPrinter(indent=4)


      #List all env and status and instances health

      client = boto3.client('elasticbeanstalk')


      envs = client.describe_environments()['Environments']

      #pp.pprint(envs)


      for env in envs:
          print 'ApplicationName: {} EnvironmentName: {} Health: {} HealthStatus: {} Status: {}'.format(env['ApplicationName'].ljust(30),env['EnvironmentName'].ljust(30),env['Health'].ljust(10),env.get('HealthStatus', 'N/A').ljust(10),env['Status'].ljust(10))
          if (env['Health'] != 'Green') or (env.get('HealthStatus', 'N/A') != 'Ok' and env.get('HealthStatus', 'N/A') != 'N/A'):
              print '\nProblem'
              details = client.describe_environment_health(EnvironmentName=env['EnvironmentName'],AttributeNames=['All'])
              #pp.pprint(details)
              print details['Causes']
              print details['InstancesHealth']
              print '\n'
      June 15, 2017 at 11:12:05 AM GMT+2 * - permalink - archive.org - https://links.infomee.fr/?eFFzMg
      aws beanstalk boto pprint python
    • Note: boto3 subnet sorted by name

      subnets = ec2.subnets.all()
      subnets_sorted = sorted(subnets, key=lambda k: k.tags[next(index for (index, d) in enumerate(k.tags) if d["Key"] == "Name")]['Value'])

      Well, my python level is not good enough to clearly understand this but my Google level was largely enough to build this

      March 24, 2017 at 4:02:34 PM GMT+1 - permalink - archive.org - https://links.infomee.fr/?Fn--jw
      aws boto boto3 python
    • EC2 — Boto 3 Docs 1.4.0 documentation

      These are the resource's available collections:

      classic_addresses
      dhcp_options_sets
      images
      instances
      internet_gateways
      key_pairs
      network_acls
      network_interfaces
      placement_groups
      route_tables
      security_groups
      snapshots
      subnets
      volumes
      vpc_addresses
      vpc_peering_connections
      vpcs
      October 5, 2016 at 10:05:58 AM GMT+2 - permalink - archive.org - http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#service-resource
      aws boto
    • Quickstart — Boto 3 Docs 1.4.0 documentation
      September 29, 2016 at 11:16:39 AM GMT+2 - permalink - archive.org - http://boto3.readthedocs.io/en/latest/guide/quickstart.html
      aws boto python
    Links per page: 20 50 100
    page 1 / 1
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation