I use the new relic to monitor my servers and MySQL. I already configured newrelic_mysql_plugin-1.0.7.jar file location and copied newrelic-mysql-plugin.debian and newrelic-mysql-plugin.rh these two files to /etc/int.d folder and reboot Apache and VPS. However its MySQL plugin fails to send data after 20-30 minutes left.
My VPS MySQL plugin installed this folder "/root/support/newrelic_mysql_plugin-1.0.7". To fix this issue every time I have to run following command line to re-start that plugin.
java -jar newrelic_mysql_plugin-1.0.7.jar
Therefore I'm considering running it as a cron job. As far as I know, I have to use following type crontab job command (planned to run every 20 minutes).
20 * * * * root <command>
New relic newrelic_mysql_plugin-1.0.7.jar file located in following directory. So how do I navigate to this directory and execute command using cron.
Last edited by Slim Shaddy; 10-18-2013 at 10:24 AM.
20 * * * * cd /root/support/newrelic_mysql_plugin-1.0.7; java -jar newrelic_mysql_plugin-1.0.7.jar
This cron is running the 20th min of every hour, meaning running hourly. you need to change it like this
*/20 * * * * cd /root/support/newrelic_mysql_plugin-1.0.7; java -jar newrelic_mysql_plugin-1.0.7.jar
Notice the "*/20" on the first time setting, that will run every 20mins or 3 times an hour.
█ Inode Hosting - Reliable Web Hosting for the right price.
█ Shared & Reseller hosting featuring the industry leading cpanel
█ 99.9% Uptime Guarantee ,30 Day Money Back Guarantee ,24/7 Support
█ Established since 2011