Install OpenResty XRay’s Agents on Amazon Linux via Package Bundles
We’ll show how to install OpenResty XRay’s Agent service on Amazon Linux. If your target machines have poor network connectivities, you can download and transfer all the package files in a single bundle.
Logging in to the Console
Let’s log in.
Enter your account name.
Type in the password.
Click on “Sign in”.
Click on “Go to console”.
It’ll take you to the guide for the Agent installation.
Installing the Agent via Bundle Packages
It’ll take you to the guide for the Agent installation.
Let me show you how to install via package bundles.
First, choose the operating system. It’s Amazon Linux in this case.
Select the “Amazon Linux” version as the operating system.
If your target machines have poor network connectivities, you can download and transfer all the package files in a single bundle. Choose the “package bundle”.
You can download the package bundle from here.
Use the wget
command to save the file on your local computer.
Copy the download link address.
Execute the command.
The file is saved to the local file system.
Use this command to execute the script.
The installation command was completed successfully.
Configuring and Detecting Applications
Let’s go back to the wizard page.
In non-production mode, the system will take a more aggressive approach to analysis to get results faster.
The production mode is for analyzing online production environments. It tries hard to minimize the performance impact on the target applications and servers. It may take longer to analyze, though.
The paranoid mode is similar to the production mode, but it will try to reduce the performance impact on the target servers' request latency further.
Let’s detect running applications.
These are the applications automatically detected.
If you need to add a new application to detect, you can customize the configuration.
You can type in the new application name.
Select the type of application.
You can select the process corresponding to the new application from the list here.
Initiating Analyzers and Viewing Insights
Click to initiate analyzers.
The analyzers just started running.
Click on “Traffic and Load”.
The system has detected there’s sufficient traffic and load on the machine. It can only conduct meaningful analysis when the target applications has traffic and load.
Let’s enter the console dashboard.
Go to the “Insights” page.
Wait for the first analysis report since the first Agent was just installed. The report in"Insights" page is generated by aggregating all applications on all Agents.
You can watch the progress in real-time.
The first fully automated analysis report has already been generated. Daily and weekly reports will be automatically generated regularly in the future.
Go to the “Dashboard” page.
We can see flame diagrams and charts for various kinds of applications. Such as Go, OpenResty, and Python applications, among others.
Install Another Agent
To install another Agent, just click here.
You can also install the Agent on Amazon Linux using the network.
To install on other operating systems, or use installation methods like containers. Just click here.
We’re back to the wizard page we saw previously. Where we can choose different installation options or operating systems.
What is OpenResty XRay
OpenResty XRay is a dynamic-tracing product that automatically analyzes your running applications to troubleshoot performance problems, behavioral issues, and security vulnerabilities with actionable suggestions. Under the hood, OpenResty XRay is powered by our Y language targeting various runtimes like Stap+, eBPF+, GDB, and ODB, depending on the contexts.
If you like this tutorial, please subscribe to this blog site and/or our YouTube channel. Thank you!
About The Author
Yichun Zhang (Github handle: agentzh), is the original creator of the OpenResty® open-source project and the CEO of OpenResty Inc..
Yichun is one of the earliest advocates and leaders of “open-source technology”. He worked at many internationally renowned tech companies, such as Cloudflare, Yahoo!. He is a pioneer of “edge computing”, “dynamic tracing” and “machine coding”, with over 22 years of programming and 16 years of open source experience. Yichun is well-known in the open-source space as the project leader of OpenResty®, adopted by more than 40 million global website domains.
OpenResty Inc., the enterprise software start-up founded by Yichun in 2017, has customers from some of the biggest companies in the world. Its flagship product, OpenResty XRay, is a non-invasive profiling and troubleshooting tool that significantly enhances and utilizes dynamic tracing technology. And its OpenResty Edge product is a powerful distributed traffic management and private CDN software product.
As an avid open-source contributor, Yichun has contributed more than a million lines of code to numerous open-source projects, including Linux kernel, Nginx, LuaJIT, GDB, SystemTap, LLVM, Perl, etc. He has also authored more than 60 open-source software libraries.