Skip to content

Instantly share code, notes, and snippets.

Avatar

Jayan Kandathil jayankandathil

View GitHub Profile
View keybase.md

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 Jan 22, 2020
Slightly customized PowerShell Script from Microsoft that enumerates all blobs in an Azure blobstorage container and writes out a .csv file to local disk
View list_all_blobs.ps1
# 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 Jul 19, 2018
Collect CloudWatch metrics for an EC2 instance in AWS using PowerShell
View CollectAWSEC2CloudWatchData.ps1
# 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 Jul 19, 2018
Collect CloudWatch metrics for an EBS volume in AWS using PowerShell
View CollectAWSEBSCloudWatchData.ps1
# 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 Jul 17, 2018
Collect CloudWatch metrics for a PostgreSQL RDS instance in AWS using PowerShell
View CollectAWSRDSPostgreSQLCloudWatchData.ps1
# 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 Oct 25, 2017
Creates an Amazon S3 bucket policy that white-lists a list of IP addresses in the CIDR format
View s3_bucket_policy-whitelist_ip_addresses.json
{
"Version": "2012-10-17",
"Id": "customerpoc",
"Statement": [
{
"Sid": "IPDeny",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
View Attach_Existing_NIC_to_Stopped_VM_then_Remove_Other_NIC.ps1
# 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"
View ConvertAzureAppGatewayAccessLogJSONToCSV.ps1
<#
.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 Aug 19, 2017
PowerShell script to output all [Data Store] Blobs in AEM Azure Blob Storage
View ListAllAEMBlobsToCsv.ps1
<#
.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 Jul 8, 2017
Configuration File for the MongoDB Disk Performance Assesssment Tool [mongoperf]
View mongoperf.conf.js
{
nThreads:4,
fileSizeMB:128,
sleepMicros:1,
mmf:false,
r:true,
w:true,
recSizeKB:8,
syncDelay:0
}