Skip to content

Instantly share code, notes, and snippets.

View jayankandathil's full-sized avatar

Jayan Kandathil jayankandathil

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jayankandathil on github.
  • I am jayankandathil (https://keybase.io/jayankandathil) on keybase.
  • I have a public key ASDb8cE-11PpWLeH5mAXM6y_WLMZoJJEEkIJiNWD5zUZ_go

To claim this, I am signing this object:

@jayankandathil
jayankandathil / list_all_blobs.ps1
Last active January 22, 2020 16:57
Slightly customized PowerShell Script from Microsoft that enumerates all blobs in an Azure blobstorage container and writes out a .csv file to local disk
# Original script from Microsoft at https://docs.microsoft.com/en-us/azure/storage/scripts/storage-blobs-container-calculate-size-powershell
# Login to Azure interactively
Login-AzAccount
# Specify the Azure subscription
Select-AzSubscription -SubscriptionName "My Subscription"
$resourceGroup = "my_resourcegroup"
$storageAccountName = "mystorageaccount"
@jayankandathil
jayankandathil / CollectAWSEC2CloudWatchData.ps1
Created July 19, 2018 21:42
Collect CloudWatch metrics for an EC2 instance in AWS using PowerShell
# Author : Jayan Kandathil (Adobe Managed Services)
# Date : July 19, 2018
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ec2-metricscollected.html
# https://aws.amazon.com/blogs/developer/writing-and-archiving-custom-metrics-using-amazon-cloudwatch-and-aws-tools-for-powershell/
# Get authentication credentials
Set-AWSCredential -AccessKey YOURAWSACCESSKEY -SecretKey yOUR354aws39875358sECRET93453-96kEY -SessionToken yOURawssESSIONtOKENEaDKGld+XcXoR/yOUtHINKtHISiSreAL2XD1k9tgQ/TKIjhXXTXxM
# Set Test Start Time and Test End Time (remember to adjust for your time zone - CloudWatch data is in UTC)
@jayankandathil
jayankandathil / CollectAWSEBSCloudWatchData.ps1
Created July 19, 2018 18:53
Collect CloudWatch metrics for an EBS volume in AWS using PowerShell
# Author : Jayan Kandathil (Adobe Managed Services)
# Date : July 19, 2018
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html
# https://aws.amazon.com/blogs/developer/writing-and-archiving-custom-metrics-using-amazon-cloudwatch-and-aws-tools-for-powershell/
# Get authentication credentials
Set-AWSCredential -AccessKey YOURAWSACCESSKEY -SecretKey yOUR354aws39875358sECRET93453-96kEY -SessionToken yOURawssESSIONtOKENEaDKGld+XcXoR/yOUtHINKtHISiSreAL2XD1k9tgQ/TKIjhXXTXxM
# Set Test Start Time and Test End Time (remember to adjust for your time zone - CloudWatch data is in UTC)
@jayankandathil
jayankandathil / CollectAWSRDSPostgreSQLCloudWatchData.ps1
Last active July 17, 2018 23:59
Collect CloudWatch metrics for a PostgreSQL RDS instance in AWS using PowerShell
# Author : Jayan Kandathil (Adobe Managed Services)
# Date : July 17, 2018
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html
# https://aws.amazon.com/blogs/developer/writing-and-archiving-custom-metrics-using-amazon-cloudwatch-and-aws-tools-for-powershell/
# Get authentication credentials
Set-AWSCredential -AccessKey YOURAWSACCESSKEY -SecretKey yOUR354aws39875358sECRET93453-96kEY -SessionToken yOURawssESSIONtOKENEaDKGld+XcXoR/yOUtHINKtHISiSreAL2XD1k9tgQ/TKIjhXXTXxM
# Set Test Start Time and Test End Time (remember to adjust for your time zone - CloudWatch data is in UTC)
@jayankandathil
jayankandathil / s3_bucket_policy-whitelist_ip_addresses.json
Created October 25, 2017 00:35
Creates an Amazon S3 bucket policy that white-lists a list of IP addresses in the CIDR format
{
"Version": "2012-10-17",
"Id": "customerpoc",
"Statement": [
{
"Sid": "IPDeny",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
# https://docs.microsoft.com/en-us/azure/virtual-machines/windows/multiple-nics
# "Stop" the VM first
$subscriptionname = "yoursubscription"
$resourcegroupname = "yourresourcegroup"
$vmname = "yourvmname"
$vnetname = "vnetname"
$subnetname = "subnetname"
$wantednicname = "newnicname"
<#
.SYNOPSIS
Converts Azure Application Gateway access logs in JSON format to CSV
.DESCRIPTION
This PowerShell script was tested with PowerShell v5.1
.NOTES
AUTHOR: Jayan Kandathil (Adobe AEM Managed Services)
LASTEDIT: October 20, 2017
#>
@jayankandathil
jayankandathil / ListAllAEMBlobsToCsv.ps1
Last active February 21, 2024 11:55
PowerShell script to output all [Data Store] Blobs in AEM Azure Blob Storage
<#
.SYNOPSIS
List all AEM [Data Store] Blobs to a CSV file
.DESCRIPTION
This PowerShell script was tested with Azure PowerShell v4.3.1
.NOTES
AUTHOR: Jayan Kandathil (Adobe AEM Managed Services)
LASTEDIT: August 19, 2017
@jayankandathil
jayankandathil / mongoperf.conf.js
Created July 8, 2017 17:38
Configuration File for the MongoDB Disk Performance Assesssment Tool [mongoperf]
{
nThreads:4,
fileSizeMB:128,
sleepMicros:1,
mmf:false,
r:true,
w:true,
recSizeKB:8,
syncDelay:0
}