There are three main ways to disable the Java agent:
Method 1 – Set agent_enabled to false in newrelic.yml(linux), then restart the JVM.
Method 2 – Use the JVM command line flag:
-Dnewrelic.config.agent_enabled=false
Then restart the JVM.
Method 3 – Remove the newrelic.jar or newrelic.yml file from specified location, then restart the JVM.
Note – After you disable the agent, it may take several minutes for data to stop showing up.
Method 4 – To permanently disable APM, uninstall the agent.
To remove the Java agent: Delete the newrelic folder from your app server’s root directory. Remove the JVM argument you used to include the agent in your startup script. After you complete these steps, restart your app.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND