Toger Blog

Minecraft and NewRelic

NewRelic is an exceptionally useful tool for monitoring java applications, or at least those that deal with web or other transational workloads. I tried hooking it up to MineCraft and it doesn’t report anything. The free version doesn’t let me look at the JVM stats (threads and such) so it appears to be a waste. However, they also provide a general unix server agent that does provide some nifty dashboards. The procedure to install it is:

1
2
3
4
rpm -Uvh https://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
yum install newrelic-sysmond
nrsysmond-config --set license_key=YourLicenseKey
/etc/init.d/

The RPM is EL5-era so doesn’t understand SystemD, so I created a unit file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description=NewRelic service
After=syslog.target

[Service]
ExecStart=/usr/sbin/nrsysmond -c /etc/newrelic/nrsysmond.cfg -f
WorkingDirectory=/
User=newrelic
Group=newrelic
PrivateTmp=true
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

and installed it as /etc/systemd/system/newrelic.service, then:

1
2
3
systemctl daemon-reload
systemctl restart newrelic
systemctl enable newrelic

NewRelic generates a pretty picture such as:

However, NewRelic is not the only server/stats monitor in town so I’ll check out some others another time.