Help Docs

NGINX Error Logs

Site24x7 AppLogs is an agent-based log management tool on the cloud that natively facilitates effective and simple management for NGINX error logs. It separates critical data in a simple and accessible format by segregating them into components like date & time, log level, process ID, thread ID, unique ID, and message.  Learn more about log management with Site24x7.

Getting started 

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows | Linux). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

Logs file path

Each application writes logs in different folders and files. By default, NGINX error logs are sourced from the below-mentioned folder path for the respective Operating System. If you have logs in a different folder, you can mention it under the File Path to source them from that particular folder while creating a log profile.

Linux icon
:
/var/log/nginx*/error*.log
Windows icon
:
C:\\nginx*\\logs\\error*.log
 
 
C:\\Program Files\\nginx*\\logs\\error*.log

Log pattern

$DateTime:date$ $LogLevel$ $ProcessId:number$ $ThreadId:number$: $UniqueId:number$ $Message$

This is the default log pattern defined by Site24x7 for parsing NGINX error logs based on the sample log mentioned below.

Sample log

2017/08/01 01:05:50 error 28148#28148: *154 FastCGI sent in stderr

The above sample log can be separated into 6 fields, each of which will take its respective value from here and will then be uploaded to Site24x7.

 Field name  Field value
Date Time  2017/08/01 01:05:50
Log Level error
Process ID  28148
Thread ID #28148
Unique ID -*154
Message FastCGI sent in stderr

Related log types

Was this document helpful?

Shortlink has been copied!