Skip to main content

GitHub

Overview

GitHub collects audit logs from a specified GitHub organization using the GitHub API. It periodically polls the GitHub API to retrieve organization audit log events.

Supported platforms

  • Linux: Logs
  • Windows: Logs
  • macOS: Logs

Authentication

GitHub supports authentication to securely access the organization audit logs.

Authentication is configured using the Credential Type field.

ParameterTypeDescription
Credential TypestringSpecifies the authentication mechanism
BearerTokenAuthoptionEnables bearer token authentication.

Note: When BearerTokenAuth is selected, a valid GitHub Personal Access Token (PAT) must be provided. The token must have sufficient permissions to access the organization audit logs.

Basic Configuration

ParameterTypeRequiredDefaultDescription
orgstringYesnoneName of the GitHub organization from which audit logs will be retrieved.
intervaldurationNo1mPolling interval used to periodically fetch audit logs from the GitHub API.
apiurlstringNohttps://api.github.comBase URL of the GitHub API. This value can be changed when using GitHub Enterprise.
perpageintegerNo100Number of audit log records retrieved per API request.
logtypestringYeswebSpecifies the type of logs to retrieve from GitHub. Supported Values:web git all
maxpagesintegerNo10Maximum number of pages to retrieve during each polling cycle.
phrasestringNononeOptional search phrase used to filter the audit logs returned by the GitHub API.
startfromdatetime (RFC3339)NononeSpecifies the starting timestamp from which audit logs should be fetched.
insecureskipverifyboolNofalseWhether to skip verification of the server's certificate

Example Configuration

{
"org": "", // required, default: none

"interval": "1m", // default: "1m"
"apiurl": "https://api.github.com", // default: "https://api.github.com"
"perpage": 100, // default: 100
"logtype": "web", // default: "web"
"maxpages": 10, // default: 10
"phrase": "", // default: none
"startfrom": "", // default: none

"tls": {
"insecureskipverify": false, // default: false
},
}

Metrics Covered

Metric NameDescription
collector_source_records_received_totalTotal number of log records successfully received
collector_source_received_bytes_totalTotal number of bytes received while fetching audit log events.
collector_source_errors_totalCounts operational errors encountered by the source. Possible reasons include auth_failed auth permission_denied timeout io rate_limit throttle and pagination
collector_source_parse_errors_totalCounts errors that occur while parsing API responses. Possible reason: json