This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

AWS Services Monitoring using AWSPowershell (API) via SAM Custom Script Monitor

Hi Everyone,

I am excited to tell everyone that I was able to monitor AWS Services such as Cloud watch Metrics for EC2 Instances, EBS volumes etc., and other AWS services directly such as AWS RDS, EC2 Instances etc. without any Out Of the Box Solarwinds provided template (they don't exist in SAM as of today). Hence I thought to share some of my knowledge, it may help you to build a custom template for required AWS service monitor.

Step1: Install AWSPowershell on the poller from where you want to monitor AWS services.

https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html

Step2: Gather AWS Access Key and Secret Key, these credentials will be used to monitor cloud services

https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html

Step3: Now build Powershell Query to fetch required cloud services metrics, you can use AWSPowershell CMDLETS to pull the data.

https://docs.aws.amazon.com/powershell/latest/reference/TOC.html

Below is the sample query to fetch EC2instance details which is crated using EC2 specific CMDLETS

https://docs.aws.amazon.com/powershell/latest/reference/items/EC2_cmdlets.html

https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html

(Get-EC2Instance -AccessKey $AccessKey -Region ap-est -SecretKey $SecretKey).Instances

Note - Replace Access Key and Secret key variable with actual credentials or you can pass these values in the form of arguments.

Setp4: Now once you are ready with the scripts and able to write message and statistics then you can either use Solarwinds inbuilt SAM Component for Powershell or you can store powershell script on the server and can call the script from SAM Powershell component as below - 

Import-module 'C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell\AWSPowerShell.psd1' -ErrorAction Stop

Powershell C:\AWSMonitor.PS1

Step5: Apply Templates on the nodes and you are done for monitoring Whatever parameter you are trying to monitor.

I hope above strategy would help you to setup your choice of AWS service monitoring, if you need any help then please let me know. I am already running various parameters monitoring for EC2 Instance, CloudWatch Metric (use below link for Cloud Watch Metric Statistic).

https://docs.aws.amazon.com/powershell/latest/reference/items/Get-CWMetricStatistic.html