@DevOpsSummit Authors: Elizabeth White, Pat Romanski, Liz McMillan, Yeshim Deniz, SmartBear Blog

Related Topics: @DevOpsSummit, Containers Expo Blog

@DevOpsSummit: Blog Post

Docker Logentries Container | @DevOpsSummit #DevOps #Docker #Containers #Microservices

The Docker Logentries Container pulls statistics from the Docker Remote API

How to Log with the Docker Logentries Container

By Mike Neville-O'Neill

Logentries offers a variety of ways to get logs out of your containerized environment, including our Linux Agent, application plugin libraries, and Syslog. In this post we'll cover collecting and forwarding logs via our Docker Logentries Container, which requires Docker 1.5 or higher.

To configure the Docker Logentries Container you'll need to do the following:

  • Create a destination log in your Logentries account to record your Docker logs.
  • Clone the Docker Logentries repository to your container host(s) and build the logging container.
  • Run the Docker Logentries Container.


First, you'll need to sign-up for a free Logentries trial if you don't already have an account.

Next, create a token-based log using the instructions available in our documentation. Copy the log token associated with your newly created log and keep it somewhere handy; you'll need it to configure the Docker Logentries Container.

Now you'll need to clone the Docker Logentries repository to your server or instance and build the logging container by running the following as separate commands in your terminal:

git clone https://github.com/nearform/docker-logentries.git
cd docker-logentries
sudo docker build -t docker-logentries .

Lastly, run the container in the background using the log token you obtained earlier:

sudo docker run -d -v /var/run/docker.sock:/var/run/docker.sock logentries/docker-logentries -t <YOUR_LOG_TOKEN> -j

You can pass the -j switch if you log in JSON format, like Bunyan. You can also pass the--no-stats flag if you do not want container statistics to be forwarded to Logentries. The -a or --add flag allows adding fixed values to log messages before they are sent to Logentries. These values are added to your log messages in an easily searchable key value pair format, i.e. "name=value".

That's it! Once you run the Docker Logentries Container it will immediately begin collecting logs from existing containers, and will automatically collect logs from new containers as soon as they're created.

The Docker Logentries Container pulls statistics from the Docker Remote API, and provides metrics relating to network, memory, and CPU utilization. The logging container will also forward all other logs sent to STDOUT from your containers.

By installing the Docker Community Pack in your Logentries account, you can quickly set up dashboards, tags, alerts and saved queries to ensure you're getting the most out of your container metrics.


Sign-up for a free 30 Day Trial

Get set up in minutes, and gain insights in seconds

Start Free Trial Setup a Demo

More Stories By Trevor Parsons

Trevor Parsons is Chief Scientist and Co-founder of Logentries. Trevor has over 10 years experience in enterprise software and, in particular, has specialized in developing enterprise monitoring and performance tools for distributed systems. He is also a research fellow at the Performance Engineering Lab Research Group and was formerly a Scientist at the IBM Center for Advanced Studies. Trevor holds a PhD from University College Dublin, Ireland.

@DevOpsSummit Stories
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throughout enterprises of all sizes.
For better or worse, DevOps has gone mainstream. All doubt was removed when IBM and HP threw up their respective DevOps microsites. Where are we on the hype cycle? It's hard to say for sure but there's a feeling we're heading for the "Peak of Inflated Expectations." What does this mean for the enterprise? Should they avoid DevOps? Definitely not. Should they be cautious though? Absolutely. The truth is that DevOps and the enterprise are at best strange bedfellows. The movement has its roots in the tech community's elite. Open source projects and methodologies driven by the alumni of companies like Netflix, Google and Amazon. This is a great thing for the evolution of DevOps. It can be alienating for Enterprise IT though. Learning about Netflix and their simian armies, or Facebook and their mind-melting scale is fascinating. Can you take it back to the office on Monday morning though?
For organizations that have amassed large sums of software complexity, taking a microservices approach is the first step toward DevOps and continuous improvement / development. Integrating system-level analysis with microservices makes it easier to change and add functionality to applications at any time without the increase of risk. Before you start big transformation projects or a cloud migration, make sure these changes won’t take down your entire organization.
Learn how to solve the problem of keeping files in sync between multiple Docker containers. In his session at 16th Cloud Expo, Aaron Brongersma, Senior Infrastructure Engineer at Modulus, discussed using rsync, GlusterFS, EBS and Bit Torrent Sync. He broke down the tools that are needed to help create a seamless user experience. In the end, can we have an environment where we can easily move Docker containers, servers, and volumes without impacting our applications? He shared his results so you can decide for yourself.
The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, compared the Jevons Paradox to modern-day enterprise IT, examining how the Internet and the cloud has allowed for the democratization of IT, resulting in an increased demand for the cloud and the drive to develop new ways to utilize it.