What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

EXEXML Sensor cannot access Powershell AWS credentials

Votes:

0

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>"

aws powershell prtg

Created on Feb 10, 2023 9:19:51 PM

Last change on Feb 14, 2023 6:00:10 AM by  Felix Wiesneth [Paessler Support]



3 Replies

Votes:

0

Hello Noah,

Please check the following:

- Did you enter the same user account in the settings of the parent device in PRTG?

- Did you use the 32 bit Powershell while running the script manually? PRTG will also use the 32 bit Powershell and not the 64 bit.

As a site note, we also recommend using "write-output" instead of "write-host".

Created on Feb 16, 2023 10:19:44 AM by  Timo Dambach [Paessler Support]



Votes:

0

I verified that the script is running as nt authority\system when called from PRTG. I had not tried the 32-bit version of Powershell before, but did just now and it does work properly. Do you have any other ideas to try?

I went ahead and changed to write-output.

Created on Feb 20, 2023 4:32:45 PM



Votes:

0

Instead of using the local system, have you tried selecting "Use Windows credentials of parent device" instead of "Use security context of PRTG probe service" in the sensor settings and configuring the same user account in the settings of the parent device for which the manual script execution is working fine?

If the issue persists, would you mind to reach out to us directly at [email protected] so we can take a closer look at your current settings and the most recent sensor log files?

Created on Feb 23, 2023 2:04:09 PM by  Timo Dambach [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.