Generating Support Bundles

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 10 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Generating Support Bundles in GitHub Enterprise

Introduction: The Critical Role of Support Bundles

When managing a GitHub Enterprise Server (GHES) environment, you are essentially maintaining a complex, distributed system that integrates version control, identity management, automation pipelines, and security scanning. Despite your best efforts to maintain a stable environment, issues will inevitably arise. Whether it is an unexpected performance degradation, a failing background job, or a complex synchronization error between your primary and replica nodes, troubleshooting these issues requires deep visibility into the system's internal state.

This is where the "Support Bundle" becomes your most valuable asset. A support bundle is a comprehensive archive of system logs, configuration files, process snapshots, and health metrics generated directly from your GitHub Enterprise instance. It acts as a "black box" recording for your server, providing the granular data that the GitHub support team or your internal infrastructure engineers need to diagnose failures. Without these bundles, you are effectively flying blind, relying on guesswork rather than empirical evidence to resolve critical service disruptions.

Understanding how to generate, manage, and analyze these bundles is not merely a task for "when things break"; it is a fundamental skill for proactive system administration. By mastering the generation of support bundles, you shorten the Mean Time to Resolution (MTTR) for incidents, ensure compliance with support service level agreements (SLAs), and gain a better understanding of how your specific configuration affects the overall performance of the platform.


Not read yet

Understanding the Anatomy of a Support Bundle

Before we dive into the "how-to," it is essential to understand what is actually inside a support bundle. When you trigger the generation process, the GHES appliance performs a series of system calls to gather diagnostic data. This data is then compressed into a tarball, typically encrypted, and made available for download.

A standard support bundle includes several key categories of information:

  • System Logs: These are the primary source of truth for debugging. They include syslog, application-specific logs for services like Unicorn (web), Resque (background jobs), and Git processes.
  • Configuration Snapshots: The bundle captures the state of your github.conf file and other environment variables. This allows support engineers to see exactly how your instance is tuned, which is vital for identifying configuration-related bottlenecks.
  • Performance Metrics: This includes CPU usage, memory consumption, disk I/O statistics, and network throughput data. These metrics help identify resource contention issues that might be slowing down repository operations.
  • Database Diagnostics: Information about the PostgreSQL database state, including connection pools, query performance, and replication lag status, is often included to help troubleshoot data integrity or latency issues.
  • GitHub-Specific State: Metadata regarding the current status of background migrations, internal service health checks, and cluster-wide status (if you are running in High Availability mode).

Callout: Why Support Bundles Matter Think of a support bundle as the "medical record" of your server. Just as a doctor cannot diagnose a mysterious ailment without blood tests and X-rays, a system administrator cannot resolve deep-seated platform issues without the diagnostic data contained in a support bundle. It is the bridge between a vague "the server is slow" complaint and a concrete "the background job queue is blocked by a long-running repository migration" diagnosis.


Not read yet

Generating Support Bundles: Step-by-Step

There are two primary ways to generate a support bundle: through the web-based Management Console and via the command-line interface (CLI). In most scenarios, the Management Console is sufficient, but the CLI approach is invaluable for automated workflows or when the web interface is unresponsive.

Method 1: Using the Management Console

The Management Console is the preferred method for most administrators because it provides a clear, visual interface and handles the background processing of the bundle generation gracefully.

  1. Access the Console: Navigate to your GitHub Enterprise Management Console (typically https://hostname:8443).
  2. Authenticate: Log in with your site administrator credentials.
  3. Navigate to Support: Click on the "Support" link located in the top navigation bar.
  4. Initiate Generation: Locate the "Generate support bundle" section. Click the button to start the process.
  5. Wait for Completion: Depending on the size of your logs and the activity on your instance, this process can take several minutes. Keep the browser window open or check back periodically.
  6. Download: Once the generation is complete, a link to download the .tar.gz file will appear. Save this file to a secure, local location.

Method 2: Using the Command-Line Interface (CLI)

When you are logged into the appliance via SSH, you have more direct control over the diagnostic process. This is particularly useful if you are experiencing a "headless" failure where the web UI is unreachable.

Step-by-Step CLI Generation:

  1. SSH into the appliance: Use your authorized SSH key to connect to your GHES instance. ssh admin@your-ghes-hostname
  2. Execute the utility: GitHub provides a built-in utility called ghe-support-bundle that automates the collection process. ghe-support-bundle
  3. Monitor the output: The utility will provide real-time feedback as it gathers logs, database snapshots, and configuration files.
  4. Locate the output file: Once the script finishes, it will display the path to the generated archive, usually located in /var/log/.

Warning: Storage Space Constraints Always check your available disk space before running a support bundle on the command line. A support bundle can be quite large, especially if your instance has been running for a long time without log rotation. If your disk is already near capacity, generating a large bundle could trigger a system-wide failure by exhausting remaining space.


Not read yet

Best Practices for Managing Support Bundles

Generating a support bundle is only half the battle. Managing these files effectively ensures that you can provide the right information to the right people at the right time while maintaining the security of your organization's sensitive data.

1. Data Sensitivity and Redaction

Support bundles contain logs that may include sensitive information, such as internal IP addresses, user emails, or even fragments of commit data if an error occurred during a push. Before sharing a support bundle with anyone outside of your organization (including the GitHub Support team), you should ideally review the contents.

  • Tip: If you are working with GitHub Support, they provide secure channels (like their managed Zendesk portal) for uploading these bundles. Never upload support bundles to public file-sharing services or unencrypted cloud storage.
  • Automation: If your company has strict compliance requirements, consider writing a small script to scan the bundle for PII (Personally Identifiable Information) before transferring it.

2. Timeliness of Generation

The most common mistake administrators make is generating a support bundle after the incident has been resolved. If you are experiencing a temporary spike in CPU usage or a transient network error, generate the bundle while the issue is occurring. Logs are often rotated or overwritten; if you wait until the end of the day, the crucial error messages that explain the behavior may have already been purged from the system.

3. Version Control for Bundles

Keep a local archive of support bundles generated during major system upgrades or configuration changes. If you upgrade from GHES 3.8 to 3.9 and suddenly notice a performance drop, having a "before" bundle from 3.8 and an "after" bundle from 3.9 allows you to perform a side-by-side comparison of system performance metrics.

Callout: The "Differential Analysis" Strategy When troubleshooting, the most effective technique is comparing a "known good" state with the "current failed" state. By keeping a library of support bundles from periods where the server was running perfectly, you give yourself a baseline. You can compare the process counts, memory usage, and background job throughput between the two states to isolate the exact component that changed.


Not read yet

Common Pitfalls and Troubleshooting the Troubleshooting

Even with the best intentions, the process of generating support bundles can encounter issues. Here are some common hurdles and how to navigate them.

Pitfall 1: The "Hanging" Bundle

Sometimes, the ghe-support-bundle command will appear to hang. This usually happens when the script attempts to read a log file that is currently being heavily written to or is corrupted.

  • Solution: Check the process list (top or htop) to see if the script is still actually consuming CPU. If it is, be patient—it might be processing a massive log file. If the process is stuck in a "D" (uninterruptible sleep) state, you may have an I/O issue with your storage backend, which is a much more serious problem that requires immediate investigation.

Pitfall 2: Excessive Log Volume

If your instance has a high volume of activity, log files can grow to sizes that make the support bundle unwieldy or impossible to transfer.

  • Solution: Use the command-line flags for ghe-support-bundle to limit the scope of the collection if you know which service is causing the issue. For example, if you know the issue is related to the database, you can often focus the collection on database-specific logs rather than the entire system dump.

Pitfall 3: Failing to Include Relevant Context

A support bundle is useless if the person analyzing it doesn't know what happened. When you send a bundle to support, always include:

  • The exact timestamp of the issue.
  • The usernames of the affected accounts.
  • The URLs of any repositories or pages that were failing.
  • A summary of what you were doing right before the issue started.

Not read yet

Comparison: Web Console vs. Command Line

Feature Management Console Command Line (CLI)
Ease of Use High (Point and click) Moderate (Requires SSH access)
Visibility Provides progress bar Provides stream of actions
Automation Not easily automated Highly scriptable
Reliability Depends on web server health Can run even if web UI is down
Best For Routine diagnostics Emergency, "headless" recovery

Automating Support Bundle Collection (Advanced)

In a large-scale enterprise, you might manage dozens of GitHub Enterprise instances. Manually logging into each one to generate a bundle is not scalable. You can automate this process using standard Linux tools coupled with the ghe-support-bundle command.

Example: Automated Remote Collection Script You can use an orchestration tool or a simple bash script that iterates through your instance list and triggers the bundle generation via SSH.

#!/bin/bash
# A simple script to trigger a support bundle on multiple instances
INSTANCES=("ghes-prod-01" "ghes-prod-02" "ghes-dr-01")

for instance in "${INSTANCES[@]}"; do
  echo "Generating bundle for $instance..."
  ssh admin@$instance "ghe-support-bundle"
  echo "Bundle generated on $instance."
done

Note: When using automation, ensure that your SSH keys are correctly managed and that you have a strategy for retrieving the files (e.g., using scp or rsync to pull the bundles to a central log server). Do not store these bundles on the production appliances indefinitely, as they will consume valuable disk space.


Not read yet

Analyzing the Bundle: What to Look For

Once you have the bundle, you need to know how to look inside it. The bundle is a standard archive. Once you extract it, you will see a directory structure that mirrors the Linux filesystem.

  1. /var/log/github/: This is your primary area. Look at unicorn.log for web request failures and resque.log for background job failures.
  2. /var/log/syslog: This contains system-level events. If you see "Out of Memory" (OOM) killer events here, you have an immediate lead on why your instance is crashing.
  3. /etc/github/: This directory contains your configuration. If you suspect that a recent configuration change (like an LDAP setting or an SMTP relay change) caused the issue, check these files to verify the current configuration state.
  4. metrics.json (or similar performance files): If included, these files provide time-series data. Look for spikes that correlate with the timestamp of your user complaints.

The "Grep" Strategy

When you are staring at a 500MB log file, don't read it top to bottom. Use the grep command to search for keywords.

  • grep -i "error" unicorn.log
  • grep -i "timeout" resque.log
  • grep -i "failed" authentication.log

If you are dealing with a recurring issue, searching for specific error codes or message patterns will save you hours of manual review.


Not read yet

Integrating Support Bundles into Incident Response

Your incident response plan should explicitly mention the generation of support bundles. When a Severity 1 incident occurs, the generation of the bundle should be the second step, right after "Verify impact."

  1. Acknowledge the incident.
  2. Generate a support bundle.
  3. Initiate communication with stakeholders.
  4. Analyze the bundle.
  5. Apply a fix or workaround.

By making this a standard operating procedure (SOP), you remove the "panic factor." Your team knows exactly how to get the data they need, which keeps everyone focused on the solution rather than scrambling to figure out how to gather diagnostic information.

Tip: Training Exercises Once a quarter, conduct a "Game Day" exercise where you deliberately trigger a non-disruptive issue (e.g., stopping a minor non-critical service) and have your junior admins practice generating, downloading, and identifying the relevant logs in a support bundle. This builds muscle memory so that when a real emergency happens, the process feels routine.


Not read yet

Common Questions (FAQ)

Q: Does generating a support bundle slow down the server? A: Yes, it can. The process involves reading many files and compressing them. In a high-load environment, you might notice a temporary increase in CPU and I/O wait times. It is recommended to perform this during off-peak hours if possible, though if the system is already failing, the impact of the bundle generation is usually negligible compared to the outage itself.

Q: Can I customize what goes into a support bundle? A: The standard ghe-support-bundle utility is designed to be comprehensive. While you cannot easily "filter out" files through the CLI tool, you can manually delete files from the archive after it is created, provided you are careful not to break the archive format. However, it is generally recommended to provide the full bundle to GitHub Support so they have the complete context.

Q: How long should I keep old support bundles? A: Treat these as temporary diagnostic artifacts. Once the support ticket is closed and the issue is resolved, delete the bundles. Keeping them indefinitely consumes storage and creates a potential security risk if the bundles contain sensitive configuration data or user information.

Q: What if the support bundle fails to generate? A: This is a red flag. If the system cannot generate a bundle, it often means the underlying filesystem is corrupted, the disk is full, or the admin user lacks the necessary permissions. In this scenario, you should prioritize checking your disk health and system logs manually.


Not read yet

Key Takeaways for Administrators

  • Diagnostic Priority: The support bundle is the single most important tool for debugging GitHub Enterprise Server. Treat it as the first step in your incident response lifecycle.
  • Proactive vs. Reactive: Do not wait for a catastrophic failure to learn the process. Practice generating and inspecting bundles regularly so you are comfortable with the output.
  • Security First: Always handle support bundles as sensitive data. They contain internal system information that should not be exposed to unauthorized parties.
  • Context is King: A bundle alone is rarely enough. Always pair your bundle with a clear, concise description of the incident, including timestamps and affected users.
  • Automation for Scale: For environments with multiple instances or complex architectures, script the collection process to save time and ensure consistency.
  • Baseline Comparison: Maintain a library of "healthy" support bundles to help you identify what has changed when performance problems arise.
  • Check Disk Space: Before running the generation utility, ensure you have sufficient disk space to avoid turning a minor issue into a total system failure.

By integrating these practices into your daily administration routine, you transform from a reactive troubleshooter into a proactive platform architect. You gain the ability to look inside the "black box" of your GitHub Enterprise environment, ensuring that your developers have the stable, performant, and reliable platform they need to ship code effectively. The support bundle is not just a file; it is your window into the health and soul of your infrastructure.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.