---
title: "How to analyze nginx logs"
page_name: "How to Analyze NGINX Logs with Sumo Logic"
type: "blog"
slug: "analyze-nginx-logs"
published_at: "2017-01-23"
modified_at: "2025-05-09"
url: "https://www.sumologic.com/blog/analyze-nginx-logs"
canonical: "https://www.sumologic.com/blog/analyze-nginx-logs"
markdown_url: "https://www.sumologic.com/blog/analyze-nginx-logs.md"
lang: "en"
excerpt: "Sumo Logic provides best-in-class cloud monitoring, log management, Cloud SIEM tools, and real-time insights for web and SaaS based apps."
taxonomy_blog_category:
  - "DevOps &amp; IT Operations"
---

[ All blogs ](https://www.sumologic.com/blog "blog")[DevOps &amp; IT Operations](https://www.sumologic.com/blog/devops-it-operations)

# How to Analyze NGINX Logs with Sumo Logic

[Vince Power](#blog-author-block-315)

January 23, 2017

3 min read 

[DevOps &amp; IT Operations](https://www.sumologic.com/blog/devops-it-operations)

##### Table of contents

 

 

 

So you have one or more NGINX instances happily logging to files. Now what? Consolidating all your logs from all your instances using Sumo Logic makes it quick and easy to find trends and errors.

In this blog post, I’ll explain how to aggregate NGINX logs with Sumo Logic.

## Enabling NGINX Logging

I am going to assume that you either have or will have an NGINX instance running somewhere. By default, NGINX has two log files, error.log and access.log. Depending on how you install the product, they can be in various locations. For example, if NGINX was installed using Yum on a Red Hat-based Linux distribution, the log files would be in /var/log/nginx.

If you want more information on customizing what is logged, including changing the name and number of log files, you can find it in the NGINX documentation.

## Ingesting NGINX Logs into Sumo Logic

At this point, there are one or more NGINX instances running, generating logs, and now we need to get them into Sumo Logic. There are two options to do this. Both are built into the setup wizard, which is launched the first time you log into Sumo Logic, or when you go to the Manage menu and select Setup Wizard from the Sumo Logic console.

**Option 1 is uploading files**. This is simple and straightforward, and great for one-time analysis, but it’s not the most effective way to really leverage the platform.

**Option 2 is streaming data**. Streaming Data is agent-based, and takes care of keeping the log files flowing into Sumo Logic’s platform without constant manual intervention. Following the setup wizard, simply select NGINX as the type of data, the OS you are on, and then the wizard will give the specific commands to run.

As long as your host has access to connect to Sumo Logic, then the agent will be discovering logs and uploading them within minutes. I’ve used this wizard multiple times and it works every time. (\*Note: if you have installed NGINX using a non-standard location inside the OS, it will ask where the log files are. The rest of the streaming will work great—It just needs some help finding the files the first time.)

## How NGINX Logging Benefits from Sumo Logic Integration

The power of Sumo Logic’s centralized logging with search and dashboards is now available to you, and will streamline your ability to analyze NGINX logs.

The following things are now true:

- No checking log files on every host just to find out what web servers were involved.
- No complex command lines where you’re using every command line tool to try to make a single data file to deal with (from grep to awk to sort to uniq).
- No more writing scripts in everything from perl to python to bash because some person always wants the same data from the logs, but doesn’t have access to the server to get it.

## How to Use Sumo Logic Dashboards for NGINX Log Analysis

Sumo Logic has a [pre-built set of dashboards for NGINX](https://www.sumologic.com/app-catalog/nginx) that will cover all your basic needs. You also have the ability to make new dashboards or customize what metrics are shown on existing dashboards.

Every metric on every dashboard can be drilled down into, and can be switched to the search view to show the raw data that is being used to generate the graphs and other visuals.

For example, this is the NGINX Overview dashboard that is preconfigured:

This is the search screen that was one click away from the Traffic Distribution by Server metric:

## Live Tail for NGINX Log Search and Analysis

Of course, the search features of Sumo Logic are extremely valuable when it comes to root-cause analysis and determining trends, and you will use these features day in and day out.

When it comes to operators and developers working on production problems, the Live Tail (datasheet) feature alone will make life easier, and makes it worth trying the platform. I can’t count the number of times I’ve gone straight to `tail -f /var/log/nginx/error.log` or countless other error files to watch for where the error is happening in real time across multiple terminal sessions, with people peering over my shoulder because they don’t have the access or knowledge to do the same thing.

With Sumo Logic’s Live Tail feature, you can just go to the web application and filter the live incoming logs by a variety of criteria and get single or multiple views of the data they need with the context that works for them, live. There’s no need for system-level access or CLI commands.

### Article Tags

- [DevOps &amp; IT Operations](https://www.sumologic.com/blog/devops-it-operations)

Vince Power

Vince Power is a Solution Architect who has a focus on cloud adoption and technology implementations using open source-based technologies. He has extensive experience with core computing and networking (IaaS), identity and access management (IAM), application platforms (PaaS), and continuous delivery.

[](https://www.sumologic.com/feed "RSS Feed")[](https://twitter.com/intent/tweet?text=How%20to%20Analyze%20NGINX%20Logs%20with%20Sumo%20Logic&url=https%3A%2F%2Fwww.sumologic.com%2Fblog%2Fanalyze-nginx-logs "X")[](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.sumologic.com%2Fblog%2Fanalyze-nginx-logs "Facebook")[](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.sumologic.com%2Fblog%2Fanalyze-nginx-logs "Linkedin")

[Previous blog

Overview of AWS Lambda Monitoring](https://www.sumologic.com/blog/overview-aws-lambda-monitoring)[Next blog

ECS Container Monitoring with CloudWatch and Sumo Logic](https://www.sumologic.com/blog/ecs-container-monitoring-cloudwatch-sumo-logic)

People who read this also enjoyed

[  

Sumo Logic AWS Region European Sovereign Cloud is now generally available

June 2, 2026

 

 ](https://www.sumologic.com/blog/sumo-logic-aws-region-european-sovereign-cloud-generally-available)[  

How to secure cloud workloads without building a full-scale SOC

April 30, 2026

 

 ](https://www.sumologic.com/blog/secure-cloud-workloads-with-limited-resources)[  

Join operator and Query Agent for smarter log analysis

April 22, 2026

 

 ](https://www.sumologic.com/blog/using-the-join-operator)[  

92% of security leaders say their SIEM is effective. 51% say it’s exceptional. What’s living in that gap?

April 16, 2026

 ](https://www.sumologic.com/blog/from-effective-to-exceptional-siem)

[AI Instructions](https://www.sumologic.com/ai-instructions.md)
