Server Not Showing Up in NewRelic

This isn’t an article, just a note for the blog of an ordinary tech guy.

In my work I often run load testing for client sites. In most cases - there’s nothing special to say about it. I’ve only written one article about a case that was unlike the others.

During load testing I obviously monitor the servers, so that at the end I can figure out what they’re missing to handle a stream of several thousand users per second.

So for the servers I try to monitor with Cacti whenever I can. If for whatever reason Cacti can’t handle the snmp requests, I have to use Munin. At the end I get nice performance graphs for every server.

I always use NewRelic to see how php, mysql, memcache behave during a stress test.

Today I was hammering a site that runs on three web heads and ran into a funny quirk of NewRelic. And this site wasn’t even publicly available yet, DNS records still pointed to the old server. newrelic-php-agent was installed on all the servers per the official manual.

But only 1 server showed up in the NewRelic dashboard. The rest of the servers weren’t showing up.

The catch is that a server doesn’t start reporting to NewRelic if it isn’t getting any traffic. Since at that point I was the only visitor to the site, my traffic was only hitting one server.

Watch out for this if you have a load balancer and multiple servers.