jorgedlcruz / veeam-enterprise_manager-grafana

How to monitor a Veeam Enterprise Manager Environment using Powershell, Telegraf, InfluxDB and Grafana
MIT License
23 stars 11 forks source link

base64 encoding issues for username and password #14

Open matt9595-matt opened 7 months ago

matt9595-matt commented 7 months ago

Username and password entered in variables (Line 34 & 35):

veeamUsername="YOUREMUSER" veeamPassword='YOUREMPASSWORD'

and encoded in base64 with (Line 37):

veeamAuth=$(echo -ne "$veeamUsername:$veeamPassword" | base64);

can sometimes get 'wraparound' resulting in an authentication error. I fixed it by modifying line 37 like so.

veeamAuth=$(echo -ne "$veeamUsername:$veeamPassword" | base64 -w 0);

Solution Source (https://stackoverflow.com/questions/38578528/base64-encoding-new-line)