Skip to content

Instantly share code, notes, and snippets.

@mflopez79
mflopez79 / awsls
Last active November 15, 2019 17:18
Script that returns ip and other data from aws instances (useful when you've got several ASGs/servers on different accounts)
#!/usr/bin/env python
import argparse
import subprocess
from collections import defaultdict
import boto3
#
# On OSX, install boto3 with
# $ pip install boto3 --user
@mflopez79
mflopez79 / check_rabbitmq_status.sh
Created January 16, 2017 15:36
Check rabbitMQ node status and put status to Cloudwatch
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters"
echo "Usage: $0 <metric-name> <server_name>"
exit 100
fi
date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
status_code=$(curl -o /dev/null -s -w "%{http_code}" -u <RABBITMQ_ADMIN_USER>:<RABBITMQ_ADMIN_PWD> "http://localhost:15672/api/healthchecks/node")