newrelic/c-daemon
The New Relic C daemon acts as a proxy between the C-SDK and the New Relic collector to reduce network traffic and to improve response time for instrumented applications. If the daemon is not running, no data is reported to New Relic.
This image only contains the daemon and is not intended to be a one-container solution. If you would like your application and daemon installed in the same container, follow the documentation on our GitHub.
Data transmitted to the daemon is not encrypted. We recommend only using a private network when connecting to the daemon.
An additional application container, with the C-SDK installed, is required. The C-SDK will send data over TCP to the daemon. The default port for this image is 31339. The daemon will then send up the collected data to New Relic.
Once you've pulled the image, running the daemon container is as simple as:
$ docker run --name some-daemon -d newrelic/c-daemon
some-daemon
should be replaced with the name that you want assigned to the running container.
Requirements:
To learn more about monitoring an application with the SDK visit the GUIDE.md in the C-SDK repo.
Using the docker exec
command will give you access to a shell inside the docker container.
$ docker exec -it some-daemon sh
You can use the docker logs
command to access the daemon logs.
$ docker logs some-daemon
You may want to run the daemon using a custom config. The -c
flag, passed to the daemon, must be set to the location of the config file. The -v
flag, passed to docker, will copy a local config file into the container. An absolute path is required when using the -v
flag.
docker run --name some-daemon -v $PWD/newrelic.cfg:/etc/newrelic/newrelic.cfg newrelic-daemon -c /etc/newrelic/newrelic.cfg
If the daemon container is not started before the SDK starts sending data, the SDK will not connect to the daemon. This may cause loss of data.
docker pull newrelic/c-daemon