Skip to content

Commit 197f195

Browse files
committed
Create ghes_syslog_setup.MD
Added documentation for sending GHES logs to Splunk.
1 parent 4986cef commit 197f195

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/ghes_syslog_setup.MD

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sending GitHub Enterprise Server Logs to Splunk
2+
3+
GitHub Enterprise Server comes with syslog-ng built in to send data to platforms like Splunk: https://docs.github.com/en/enterprise-server@3.3/admin/user-management/monitoring-activity-in-your-enterprise/log-forwarding. Following those directions will allow you to easily onboard logs to Splunk. However, The GitHub App for Splunk comes with enhancements for those logs that will allow you to search more efficently.
4+
5+
## Sources and Transformations
6+
7+
The syslog feed from GitHub Enterprise Server contains ALL application logs including audit logs, web server logs, database logs, etc. Being able to differentiate the logs is critical. This app includes the ability to overwrite the source of events with the log type out of the box. However, for this to happen, you must use the sourcetype of `GithubEnterpriseServerLog` or duplicate that stanza from the default `props.conf` file into a custom stanza in your local copy. When setting up a TCP input you have the ability to force that specific sourcetype. This will enable easy filtering of log files to their specific process.
8+
9+
## Default `props.conf`
10+
11+
```
12+
[GithubEnterpriseServerLog]
13+
DATETIME_CONFIG =
14+
LINE_BREAKER = ([\r\n]+)
15+
NO_BINARY_CHECK = true
16+
category = Application
17+
pulldown_type = true
18+
TIME_FORMAT =
19+
TZ =
20+
EXTRACT-audit_event = github_audit\[\d+\]\:\s(?<audit_event>.*)
21+
EXTRACT-audit_fields = \"(?<_KEY_1>.*?)\"\:\"*(?<_VAL_1>.*?)\"*,
22+
EXTRACT-github_log_type = \d+\:\d+\:\d+\s\d+\-\d+\-\d+\-\d+\s(?<github_log_type>.*?)\:
23+
EXTRACT-github_document_id = \"_document_id\"\:\"(?<document_id>.*?)\"
24+
FIELDALIAS-source = github_log_type AS source
25+
```

0 commit comments

Comments
 (0)