Skip to content

2018

Upgrade AppMon from Version 6.5 to 7.1

I am working on upgrading Dynatrace AppMon from version 6.5 to 7.1. AppMon is a performance data gathering tool trusted by many clients; it assists developers in troubleshooting issues within applications. This version upgrade includes new features and a new UI dashboard. Below are the steps to guide you through the process:

First, it's important to consult the system requirements for hardware and the operating system. System Requirements April 2018. For example, if you're running a legacy Java Virtual Machine (JVM), the help desk may not be able to assist you with issues. Make sure you have a 64-bit client and sufficient disk space.

Additionally, move the session storage location out of the installation directory before starting. It's recommended to back up both the session storage and configuration data. Be sure to consult the component compatibility matrix Component Compatibility beforehand.

Second, install the new AppMon 7.1 version. For Linux, run the command:

java -jar dynatrace-full-7.1.0.1803-linux-x86–64.jar

Then deactivate and upgrade the licenses. This will place your server into a grace period before shutting it down.

Click on the "Upgrade" button for the license.

And for the vouchers as well:

Third, shut down the old version 6.5 collector, server, and front-end server. This would be an ideal time to create backups, including those for the Performance Warehouse DB and Session Store.

Fourth, use the migration tool that can be downloaded from here.

Run the command:

java -jar dynatrace-migration.jar -migration -sourceDTHome "<DT_HOME_OLD>" -targetArchiveDir "<ARCHIVE_DIR>"

Here, DT_HOME_OLD is the old AppMon installation path and ARCHIVE_DIR is the backup directory. Note that on a Windows machine, administrator rights are needed to perform this step.

Next, move the backup files to the new 7.1 installation using the command:

java -jar dynatrace-migration.jar -migration -sourceArchive "<ARCHIVE_DIR>/<MIGRATION_ARCHIVE>" -targetDTHome "<DT_HOME_NEW>"

Where ARCHIVE_DIR/MIGRATION_ARCHIVE is the location of the ./dtma file and DT_HOME_NEW is the path for the new Dynatrace 7.1 installation.

Then register and auto-start any additional collector instances.

Fifth, start the new components like the collector and the front-end server.

The client migration step can usually be skipped, and you can activate licenses for the new servers:

Finally, double-check the settings on the server to ensure that the Performance Warehouse and session storage have been migrated and connected.

It's also recommended to restart and update the agent. Last but not least, check and validate that everything is working as expected.

Please let me know if you have any questions.

將 AppMon 從版本 6.5 升級到 7.1

我正在將Dynatrace AppMon從版本6.5升級到7.1。AppMon是許多客戶信任的效能數據收集工具;它幫助開發者在應用系統中解決問題。此版本升級包括新功能和新的UI儀表板。以下是指導你完成此過程的步驟:

首先,重要的是要諮詢硬體和作業系統的系統需求2018年4月系統需求。例如,如果你在運行一個過時的Java虛擬機(JVM),幫助台可能無法協助你解決問題。確保你有一個64位的客戶端和足夠的磁盤空間。

此外,在開始之前,將會話存儲位置移出安裝目錄。建議備份會話存儲和配置數據。務必在此之前諮詢元件兼容性矩陣元件兼容性

其次,安裝新的AppMon 7.1版本。對於Linux,運行命令:

java -jar dynatrace-full-7.1.0.1803-linux-x86–64.jar

然後停用並升級許可證。這將在關閉它之前把你的服務器放在一個寬限期內。

點擊許可證的“升級”按鈕。

以及優惠券的升級按鈕:

第三,關閉舊版6.5的收集器、服務器和前端服務器。這將是創建備份的理想時機,包括性能倉庫數據庫和會話存儲的備份。

第四,使用這裡下載的移植工具。

運行命令:

java -jar dynatrace-migration.jar -migration -sourceDTHome "<DT_HOME_OLD>" -targetArchiveDir "<ARCHIVE_DIR>"

此處,DT_HOME_OLD是舊版AppMon的安裝路徑,ARCHIVE_DIR是備份目錄。請注意,在Windows機器上,需要管理員權限才能執行此步驟。

接著,使用以下的命令將備份檔案移動到新的7.1安裝版:

java -jar dynatrace-migration.jar -migration -sourceArchive "<ARCHIVE_DIR>/<MIGRATION_ARCHIVE>" -targetDTHome "<DT_HOME_NEW>"

其中,ARCHIVE_DIR/MIGRATION_ARCHIVE./dtma檔案的位置,DT_HOME_NEW則是新Dynatrace 7.1安裝的路徑。

然後註冊並自動啟動任何額外的收集器實例。

第五,啟動新的元件,例如收集器和前端服務器。

客戶端移植步驟通常可以跳過,並且您可以為新的伺服器啟動許可證:

最後,再次檢查伺服器上的設定以確保性能倉庫和會話存儲已被遷移並連接。

還建議重新啟動並更新代理。最後但並非最不重要的,檢查並確認所有的東西都按預期運行。

如有任何問題,請告訴我。

AWS Cognito User Pools with Mobile SDK for iOS Using Custom Challenge

I recently integrated an AWS Cognito User Pool into an iOS application. The sign-in feature utilizes a custom challenge for authentication. However, there is limited documentation on how to use the iOS SDK for this purpose. After several trials and errors, I finally succeeded in signing in. Below are the steps to accomplish this:

Step 1: Create a CognitoUserPool

In the AppDelegate, after didFinishLaunchingWithOptions, the user pool is initialized as follows:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

  // Set up service configuration
  let serviceConfiguration = AWSServiceConfiguration(region: CognitoIdentityUserPoolRegion, credentialsProvider: nil)

  // Create pool configuration
  let poolConfiguration = AWSCognitoIdentityUserPoolConfiguration(clientId: CognitoIdentityUserPoolAppClientId, clientSecret: nil, poolId: CognitoIdentityUserPoolId)

  // Initialize user pool client
  AWSCognitoIdentityUserPool.register(with: serviceConfiguration, userPoolConfiguration: poolConfiguration, forKey: AWSCognitoUserPoolsSignInProviderKey)

  // Fetch the user pool client we initialized in the above step
  let pool = AWSCognitoIdentityUserPool(forKey: AWSCognitoUserPoolsSignInProviderKey)

  self.storyboard = UIStoryboard(name: "Main", bundle: nil)

  pool.delegate = self

  return true
}

Step 2: Implement the Protocol Delegate

extension AppDelegate: AWSCognitoIdentityCustomAuthentication {

  func didCompleteStepWithError(_ error: Error?) {

  }

  func getCustomChallengeDetails(_ authenticationInput: AWSCognitoIdentityCustomAuthenticationInput, customAuthCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityCustomChallengeDetails>) {

  }

  func startCustomAuthentication() -> AWSCognitoIdentityCustomAuthentication {
    if self.navigationController == nil {
      self.navigationController = self.storyboard?.instantiateViewController(withIdentifier: "signinController") as? UINavigationController
    }

    if self.signInViewController == nil {
      self.signInViewController = self.navigationController?.viewControllers[0] as? SignInViewController
    }

    DispatchQueue.main.async {
      self.navigationController!.popToRootViewController(animated: true)

      if !self.navigationController!.isViewLoaded || self.navigationController!.view.window == nil {
        self.window?.rootViewController?.present(self.navigationController!, animated: true, completion: nil)
      }
    }

    return self.signInViewController!
  }
}

Step 3: Handle the Custom Challenge Inside the Sign-In View Controller

extension SignInViewController: AWSCognitoIdentityCustomAuthentication {

  func getCustomChallengeDetails(_ authenticationInput: AWSCognitoIdentityCustomAuthenticationInput, customAuthCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityCustomChallengeDetails>) {

    let authDetails = AWSCognitoIdentityCustomChallengeDetails(challengeResponses: ["USERNAME": "YourUserName", "ANSWER": "123456"])
    customAuthCompletionSource.set(result: authDetails)
  }

  public func didCompleteStepWithError(_ error: Error?) {
    DispatchQueue.main.async {
      if let error = error as? NSError {
        print("error")
      } else {
        print("success")
        self.dismiss(animated: true, completion: nil)
      }
    }
  }
}

Step 4: Access User Attributes After Successful Sign-In

self.user?.getDetails().continueOnSuccessWith { (task) -> AnyObject? in
  DispatchQueue.main.async(execute: {
    self.response = task.result

    // Display user details
    print(response)
  })

  return nil
}

If you have any questions, please feel free to ask. I hope AWS updates the documentation and provides sample code to make it easier to understand the SDK without having to resort to trial and error.

使用自訂挑戰的AWS Cognito用戶池與iOS的Mobile SDK

我最近將一個AWS Cognito用戶池整合到一個iOS應用程式中。登入功能使用自訂挑戰進行認證。然而,關於如何使用iOS SDK達到此目的的文件資料很有限。在多次嘗試和失敗後,我終於成功登入。以下是達成此目的的步驟:

步驟1:建立一個CognitoUserPool

AppDelegate中,完成didFinishLaunchingWithOptions後,用戶池如下所示初始化:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

  // Set up service configuration
  let serviceConfiguration = AWSServiceConfiguration(region: CognitoIdentityUserPoolRegion, credentialsProvider: nil)

  // Create pool configuration
  let poolConfiguration = AWSCognitoIdentityUserPoolConfiguration(clientId: CognitoIdentityUserPoolAppClientId, clientSecret: nil, poolId: CognitoIdentityUserPoolId)

  // Initialize user pool client
  AWSCognitoIdentityUserPool.register(with: serviceConfiguration, userPoolConfiguration: poolConfiguration, forKey: AWSCognitoUserPoolsSignInProviderKey)

  // Fetch the user pool client we initialized in the above step
  let pool = AWSCognitoIdentityUserPool(forKey: AWSCognitoUserPoolsSignInProviderKey)

  self.storyboard = UIStoryboard(name: "Main", bundle: nil)

  pool.delegate = self

  return true
}

步驟2:執行協定代表

extension AppDelegate: AWSCognitoIdentityCustomAuthentication {

  func didCompleteStepWithError(_ error: Error?) {

  }

  func getCustomChallengeDetails(_ authenticationInput: AWSCognitoIdentityCustomAuthenticationInput, customAuthCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityCustomChallengeDetails>) {

  }

  func startCustomAuthentication() -> AWSCognitoIdentityCustomAuthentication {
    if self.navigationController == nil {
      self.navigationController = self.storyboard?.instantiateViewController(withIdentifier: "signinController") as? UINavigationController
    }

    if self.signInViewController == nil {
      self.signInViewController = self.navigationController?.viewControllers[0] as? SignInViewController
    }

    DispatchQueue.main.async {
      self.navigationController!.popToRootViewController(animated: true)

      if !self.navigationController!.isViewLoaded || self.navigationController!.view.window == nil {
        self.window?.rootViewController?.present(self.navigationController!, animated: true, completion: nil)
      }
    }

    return self.signInViewController!
  }
}

步驟3:在登入視圖控制器中處理自訂挑戰

extension SignInViewController: AWSCognitoIdentityCustomAuthentication {

  func getCustomChallengeDetails(_ authenticationInput: AWSCognitoIdentityCustomAuthenticationInput, customAuthCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityCustomChallengeDetails>) {

    let authDetails = AWSCognitoIdentityCustomChallengeDetails(challengeResponses: ["USERNAME": "YourUserName", "ANSWER": "123456"])
    customAuthCompletionSource.set(result: authDetails)
  }

  public func didCompleteStepWithError(_ error: Error?) {
    DispatchQueue.main.async {
      if let error = error as? NSError {
        print("error")
      } else {
        print("success")
        self.dismiss(animated: true, completion: nil)
      }
    }
  }
}

步驟4:成功登入後存取用戶屬性

self.user?.getDetails().continueOnSuccessWith { (task) -> AnyObject? in
  DispatchQueue.main.async(execute: {
    self.response = task.result

    // Display user details
    print(response)
  })

  return nil
}

如果你有任何問題,請隨時提問。我希望AWS能更新文檔,並提供範例代碼,以便在不需要透過試驗和錯誤的情況下理解SDK。