You must have the AppMon Web Server Agent installer to perform this procedure. You also need the supported NGINX versions:
- AppMon 2018 October Update 11 1.2.5 or later—supported only on AppMon Agent.
- 1.4.7 or later.
The NGINX Agent communicates with the Collector directly. Web Server Master Agent is not needed. See AppMon Agent configuration.
The NGINX Agent doesn't communicate with the Collector directly, but through the Web Server Master Agent.
The Web Server Master Agent should be separately started first, before starting the NGINX Agent.
For an overview of the AppMon Web Server Master Agent technology, see Web Server Master Agent Configuration.
With open source NGINX 1.9.11, dynamic module loading via
load_module was introduced. Please note that the classic agent does not support this feature and will cause crashes. Dynamic modules are not supported by Classic Agent and requires to switch the agent platform.
Activate the NGINX Agent
As NGINX offers no user-facing API for interfacing with its functionality programmatically, the NGINX Agent needs to be started in a somewhat non-typical way. The following factors are involved:
- A file containing addresses (offsets) of specific functions and data fields within the NGINX binary.
- Manual load of the Agent library into NGINX process memory using system LD_PRELOAD functionality.
The offsets file contains the instrumentation information which is used at Agent startup to instrument the NGINX binary. In most situations, the Agent generates the file at startup.
Classic Agent Certain circumstances require manual file generation and the Agent writes an appropriate script to disk to request the user to execute it from command line.
Loading the agent at NGINX startup
The NGINX Agent starts by preloading. You need to set the environment variable
LD_PRELOAD in the NGINX startup script:
Make sure to use the Agent library matching the bitness of your NGINX: one from the
lib directory for 32-bit NGINX or one from
lib64 for 64-bit NGINX.
The agent looks for configuration, including the offset file, in
../conf/ starting from its location on disk. Logs are typically written to
../logs/, although this can be changed in
dtwsagent.ini located in the configuration directory.