https://github.com/optum/kong-error-log
Expose NGINX error logs for Kong lua plugin consumption
https://github.com/optum/kong-error-log
api-gateway kong optum
Last synced: about 1 year ago
JSON representation
Expose NGINX error logs for Kong lua plugin consumption
- Host: GitHub
- URL: https://github.com/optum/kong-error-log
- Owner: Optum
- License: apache-2.0
- Created: 2018-12-27T06:25:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-23T18:25:15.000Z (about 2 years ago)
- Last Synced: 2025-04-14T15:22:04.769Z (about 1 year ago)
- Topics: api-gateway, kong, optum
- Language: Lua
- Size: 482 KB
- Stars: 4
- Watchers: 8
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Kong Error Log Plugin
## Overview
This plugin will expose the nginx webserver error logs to a field "kong.ctx.shared.errmsg" that other Kong plugins can consume.
Our use case was simple, we wanted to log the L4 errors NGINX was throwing around problems proxying to backend API services. Hence the observable defaults in our plugin schema that target and trim upstream related NGINX errors.
To leverage this plugin, you will need to define a shm in your nginx conf:
```lua_capture_error_log 100k;```
Example Error Log Highlighted:

## Supported Kong Releases
Kong >= 1.x
## Installation
Recommended:
```
$ luarocks install kong-error-log
```
Other:
```
$ git clone https://github.com/Optum/kong-error-log.git /path/to/kong/plugins/kong-error-log
$ cd /path/to/kong/plugins/kong-error-log
$ luarocks make *.rockspec
```
## Maintainers
[jeremyjpj0916](https://github.com/jeremyjpj0916)
[rsbrisci](https://github.com/rsbrisci)
Feel free to open issues, or refer to our [Contribution Guidelines](https://github.com/Optum/kong-error-log/blob/master/CONTRIBUTING.md) if you have any questions.