I have created an EXEXML Sensor on a remote probe which runs a powershell script on my Windows server. If I run the script from a CMD (using the SYSTEM account) it runs fine, but when I run it from PRTG, I get this error in the log file. In both instances, it should be attempting to use the IAM server role (no access keys involved).
get-sessendquota : Unable to retrieve credentials. At C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXEXML\Custom Powershell AWS SES GetSendQuota.ps1:6 char:17 + $sesSendQuota = get-sessendquota -Region "us-east-1" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Amazon.PowerShe...SendQuotaCm dlet:GetSESSendQuotaCmdlet) [Get-SESSendQuota], InvalidOperationException + FullyQualifiedErrorId : Amazon.Runtime.AmazonServiceException,Amazon.Pow erShell.Cmdlets.SES.GetSESSendQuotaCmdlet <prtg> <result> <channel>Max 24 Hour Send</channel> <value></value> </result> <result> <channel>Max Send Rate</channel> <value></value> </result> <result> <channel>Sent Last 24 Hours</channel> <value></value> </result> </prtg>
Here is my powershell script:
Import-Module AWS.Tools.SimpleEmail $sesSendQuota = get-sessendquota -Region "us-east-1" $Max24HourSend = $sesSendQuota.Max24HourSend $MaxSendRate = $sesSendQuota.MaxSendRate $SentLast24Hours = $sesSendQuota.SentLast24Hours Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Max 24 Hour Send</channel>" Write-Host "<value>$($Max24HourSend)</value>" Write-Host "</result>" Write-Host "<result>" Write-Host "<channel>Max Send Rate</channel>" Write-Host "<value>$($MaxSendRate)</value>" Write-Host "</result>" Write-Host "<result>" Write-Host "<channel>Sent Last 24 Hours</channel>" Write-Host "<value>$($SentLast24Hours)</value>" Write-Host "</result>" Write-Host "</prtg>"
Add comment