microsoftarchive / wamo

Apache License 2.0
15 stars 12 forks source link

Invalid storage account or error retrieving storage keys #1

Open josepsaez opened 10 years ago

josepsaez commented 10 years ago

/usr/local/nagios/libexec# ./check_azure_paas.py. -s myST -p name.publishersettings -a -w 10 -c 20 cloud

Im getting this error... Invalid storage account or error retrieving storage keys

I´ve put my primary key inside the script

primary_key = 'mykey....afsafasdas'

but I´m getting the same error....

colud you please tell me waht can I do to solve this?

thanks!!!

jeffmendoza commented 10 years ago

Hi, sorry for the delay. Can you run with these options and paste the output?

check_azure_paas.py -p </path/to/psfile.publishsettings>  -s <storage_account_name> <cloud_service> -vvv

You don't need to put the storage account key in the script. Do you have more than one Azure subscription in your .publishsettings file? The plugin will only look in the first subscription for the storage account. If so, try removing the subscription that you are not using. example:

<?xml version="1.0" encoding="utf-8"?>
<PublishData>
  <PublishProfile
    PublishMethod="AzureServiceManagementAPI"
    Url="https://management.core.windows.net"
    ManagementCertificate="secret">
    <Subscription
      Id="asdf-1234"
      Name="Sub number 1" />
    <Subscription
      Id="qwer-5678"
      Name="Sub number 2" />
  </PublishProfile>
</PublishData>

Remove the Subscription tag you are not using.

Make sure the storage account name you are giving is valid (myST in your example).