Skip to content

Instantly share code, notes, and snippets.

@anjali-gour
anjali-gour / check_docker_container.sh
Created March 4, 2020 04:22 — forked from ekristen/check_docker_container.sh
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@anjali-gour
anjali-gour / README.md
Last active February 24, 2020 18:07 — forked from Eyjafjallajokull/README.md
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help
@anjali-gour
anjali-gour / ebs-snaphot.sh
Created January 11, 2020 09:35 — forked from nicosnyman/ebs-snaphot.sh
EBS backup
#!/bin/bash
# Heavily adapted by Nico
# Original script:
# http://www.stardothosting.com/blog/2012/05/automated-amazon-ebs-snapshot-backup-script-with-7-day-retention/
### ebs-snapshot.sh
# Usage: $PROGNAME [OPTION] [Args]
#Take snapshot of AWS volumes marked with a specific tag.
#
@anjali-gour
anjali-gour / ebs-snaphot.sh
Created January 11, 2020 09:34 — forked from nicosnyman/ebs-snaphot.sh
EBS backup
#!/bin/bash
# Heavily adapted by Nico
# Original script:
# http://www.stardothosting.com/blog/2012/05/automated-amazon-ebs-snapshot-backup-script-with-7-day-retention/
### ebs-snapshot.sh
# Usage: $PROGNAME [OPTION] [Args]
#Take snapshot of AWS volumes marked with a specific tag.
#
@anjali-gour
anjali-gour / change_instance.sh
Created January 11, 2020 08:53 — forked from nicosnyman/change_instance.sh
Easily change instance types on AWS EC2 with a bash script
#!/bin/bash
# Nico Snyman, nico@gammafly.com, 14/05/2015
# Change an instance type, while keeping snapshots
# This script will stop an instance identified by instance ID,
# take snapshots of all atached volumes, and restart it
# Use:
# -i instance ID - REQUIRED - stored in instance_id
# -t instance new instance type - REQUIRED - stored in instance_type
# -s if set to 0, no snapshot will be taken, dafault is 1
# (take snapshot of attached volumes) - stored in snapshot