I’m planning to setup web server agents in NGINX servers, based on your wiki page, I tried but unable to succeed.
I had mentioned this line in nginx.conf,
It gives this below error.
nginx: [emerg] unknown directive "LD_PRELOAD=/opt/dynatrace-6.2/agent/lib64/libdtagent.so" in /app/icws/nginx/conf/nginx.conf:13
Solved! Go to Solution.
The nginx configuration is a bit different then apache, you don´t add the config line to the nginx.conf file.
You have to start nginx with the prefix LD_PRELOAD=/opt/dynatrace-6.2/agent/lib64/libdtagent.so, thats why the line is LD_PRELOAD=/opt/dynatrace-6.2/agent/lib64/libdtagent.so nginx
You can run that manually, which of course would not persist over restarts. But you can add the line via the systemd/upstart/init.d start script, depending on your system.
Here is the documentation for adding the nginx agent: https://community.dynatrace.com/community/display/...
If you tell me your startup system or distro/version I can help you with fining the correct way.
Thanks Patrick, i did it start up, and i see in DT logs, its connected to collector, but still its not showing up in Dynatrace either under system profile agents overview or all the agents overview
if i restart nginx, i see in DT bootstrap log, its Connected to Server/Collector and "Loading Agent /opt/dynatrace-6.2/agent/downloads/18.104.22.1685/native/linux-x86-64/libdtnginxagent.so".
in the other DT log, it gives one "warning [native] Some stub module variables are missing."
and in the next log it says, "bash: syntax error near unexpected token `('"
i specified the collector server name and agent mapping name in dtwsagent.ini file, similar to how we configure it for apache. Is this not right.
#The name of the web server agent (used for agent mapping on the dynaTrace Server).
#The address of the dynaTrace Collector this agent should connect to.
# The address is of the form host:port, e.g. exampleserver:9998
That's correct. Now if you start the Webserver agent you configured with the dtwsagent.ini, it should already be visible in the agent overview, even if the nginx isn't started yet. If not, there is a connection problem with the webserver agent.