none
[Java][Azure Storage] Unable to get the Table Storage details configured for Application Diagnostics using Azure Java SDK RRS feed

Answers

  • Hello Athipathy,

    You can refer to the blog below that has the code for 'Windows Azure Diagnostics for Java':

    http://blog.persistent.com/index.php/2012/06/02/windows-azure-diagnostics-for-java/#.VYk9xf4w_5V

    As suggested in my previous post, There is no existing documentation on or support for Java SDK.

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks,
    Syed Irfan Hussain

    Tuesday, June 23, 2015 11:10 AM
  • Hi,

    I have tried to use Java SDK to do this, In my side the appSettings size is 2, and I list the table storage details, here is the result:

    Hope this could give you some tips, and if you confuse with the config object, please refer to https://azure.microsoft.com/en-gb/documentation/articles/java-create-azure-website-using-java-sdk/ for more details.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, June 25, 2015 1:12 AM
    Moderator

All replies

  • Hello Athipathy,

    I am not an expert with Java, but as far as I have researched on this, Windows Azure SDK for Java does not offer an API to configure and host DiagnosticsMonitor, and there is no REST API as well.

    Diagnostics must be enabled with .NET code. Also note that enabling the diagnostics is independent of any Java application you write.

    You can refer to the article below that give information on features supported by the latest Java SDK:

    https://msdn.microsoft.com/library/azure/hh690943(VS.103).aspx

    Here is the link for Java libraries:

    http://dl.windowsazure.com/javadoc/

    You can also consider using some of the other tools availaible for monitoring website such as 'New Relic'

    Thanks,
    Syed Irfan Hussain

    Saturday, June 20, 2015 4:55 AM
  • Hi,

    Based on my understanding, you want to get the table storage details that configured for application Diagnostics in azure portal, if so, we can use rest API to do this, the following is the request url:

    #“https://management.core.windows.net:8443/<subid>/services/WebSpaces/<WebSpaceName>/sites/<SiteName>/config"

    we can use https://management.core.windows.net/<subscription-id>/services/WebSpaces/ to list web spaces, and please remember the header should be set to 2012-10-10 or a later version, here is a part of the result that I get:

    Here is I configured in azure portal:

    ><p>Here is I configured in Azure wep app:</p><p><img alt=

    About how to use rest API in java, please refer to http://gauravmantri.com/2013/08/25/consuming-windows-azure-service-management-api-in-java/, If I misunderstand, please feel free to let me know.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.





    Monday, June 22, 2015 1:49 AM
    Moderator
  • Hi Jambor Yao,

    Could you please give me the rest API reference link for the above operation. also please let me know if the same can be achieved via Azure JAVA SDK.

    Thanks

    Monday, June 22, 2015 7:07 AM
  • i would like to know where could i find a proper documentation for getting the constants that can be used to get the APPSettings of Azure Website via JAVA SDK.  i am trying to retrieve the properties "DIAGNOSTICS_AZURETABLESASURL","DIAGNOSTICS_AZUREBLOBCONTAINERSASURL","DIAGNOSTICS_AZUREBLOBRETENTIONINDAYS" using the below code snippet but always i the appsettings size retrieved is "0" so please let me know what is the correct constants to be used to get the  Website APPSetting.

    WebSiteListParameters webSiteListParameters=new WebSiteListParameters();
    ArrayList<String> propertiesToIncludeValue=new ArrayList<String>();
    propertiesToIncludeValue.add("DIAGNOSTICS_AZURETABLESASURL");
    propertiesToIncludeValue.add("DIAGNOSTICS_AZUREBLOBCONTAINERSASURL");
    propertiesToIncludeValue.add("DIAGNOSTICS_AZUREBLOBRETENTIONINDAYS");
    webSiteListParameters.setPropertiesToInclude(propertiesToIncludeValue);
    webSites = azureWebsiteUtil.getWebSitesWithWebSpace(webSpace.getName(),webSiteListParameters);

    for (WebSite webSite : webSites) {
    HashMap<String, String> appSettings=webSite.getSiteProperties().getAppSettings();
    System.out.println("appSettings size:: "+appSettings.size());
    for (String appSettingVal : appSettings.values()) {
    System.out.println(appSettingVal);
                    }

    }

    Monday, June 22, 2015 11:20 AM
  • Hello Athipathy,

    You can refer to the blog below that has the code for 'Windows Azure Diagnostics for Java':

    http://blog.persistent.com/index.php/2012/06/02/windows-azure-diagnostics-for-java/#.VYk9xf4w_5V

    As suggested in my previous post, There is no existing documentation on or support for Java SDK.

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Thanks,
    Syed Irfan Hussain

    Tuesday, June 23, 2015 11:10 AM
  • Hi,

    I have tried to use Java SDK to do this, In my side the appSettings size is 2, and I list the table storage details, here is the result:

    Hope this could give you some tips, and if you confuse with the config object, please refer to https://azure.microsoft.com/en-gb/documentation/articles/java-create-azure-website-using-java-sdk/ for more details.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, June 25, 2015 1:12 AM
    Moderator
  • Hi Jambor Yao,

    i tried running it locally using the below code but always i get the parsing error as follows. all other operations like listing webspace,website are working fine. not sure what could be the problem. pls help.

    WebSiteGetConfigurationResponse webSiteGetConfigurationResponse=webSiteManagementClient.getWebSitesOperations().getConfiguration("SouthCentralUSwebspace", "athiDevWEB");
            HashMap<String, String> wHashMap=webSiteGetConfigurationResponse.getAppSettings();
            System.out.println(wHashMap.size());
       


    Exception in thread "main" java.lang.IllegalArgumentException: /Date(1435066140000+0000)/
        at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseAndSetYear(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl.<init>(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source)
        at javax.xml.bind.DatatypeConverterImpl._parseDateTime(Unknown Source)
        at javax.xml.bind.DatatypeConverterImpl.parseDateTime(Unknown Source)
        at javax.xml.bind.DatatypeConverter.parseDateTime(Unknown Source)
        at com.microsoft.windowsazure.management.websites.WebSiteOperationsImpl.getConfiguration(WebSiteOperationsImpl.java:2853)

    Friday, June 26, 2015 6:34 AM
  • Hi,

    The error message seems tell us that we have some issues in parse datetime object, however, I couldn't find the datetime object, this is weird, if you run the code in a new class with static void main method, the same error message will received? please try it and raise your further questions here.

    Best Regards,

    Jambor 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 29, 2015 6:23 AM
    Moderator