BugSnag is now Insight Hub - we're making some changes to how the product looks, but this won't impact the way you use BugSnag or any of your integrations.

Command line interface

Command line interface for managing BugSnag On-premise

Download

Run these commands to download and setup permissions for the current stable release of the CLI:

curl -L "https://bugsnag-onprem-cli.s3.amazonaws.com/bugsnag-linux-amd64" -o bugsnag
sudo chmod +x bugsnag
curl -L "https://bugsnag-onprem-cli.s3.amazonaws.com/bugsnag-windows-amd64.exe" -o bugsnag.exe
curl -L "https://bugsnag-onprem-cli.s3.amazonaws.com/bugsnag-darwin-amd64" -o bugsnag
sudo chmod +x bugsnag
curl -L "https://bugsnag-onprem-cli.s3.amazonaws.com/bugsnag-darwin-arm64" -o bugsnag
sudo chmod +x bugsnag

Configure

Create a file named bugsnag.yaml in the same directory as the CLI with the following content:

type: clustered
kubernetes:
  config_path: /path/to/.kube/config
  context: context
  namespace: default

The configuration options are described below:

  • config_path: this is the location of the kube config file, by default it is usually found at $HOME/.kube/config, $HOME is the location of you home folder.
  • context: this is current default context in the .kube/config file pointing to the Kubernetes cluster. You can display the list of contexts by running kubectl config get-contexts.
  • namespace: this is the namespace in which BugSnag is deployed to, for most installations this can be set to default.

Commands

You can see the list of available commands by running:

./bugsnag help
./bugsnag.exe help
./bugsnag help
./bugsnag help

Or, for help with a specific command, run:

./bugsnag help COMMAND
./bugsnag.exe help COMMAND
./bugsnag help COMMAND
./bugsnag help COMMAND

BugSnag status

You can run the following to see the status of bugsnag:

./bugsnag status [flags]
./bugsnag.exe status [flags]
./bugsnag status [flags]
./bugsnag status [flags]

Flags reference

Flag (short, long) Type Description
-v,
--verbose
boolean verbose logging

Restart BugSnag Services

The following command performs a rolling restart of the specified BugSnag service.

./bugsnag restart SERVICE
./bugsnag.exe restart SERVICE
./bugsnag restart SERVICE
./bugsnag restart SERVICE

Argument reference

  • SERVICE - Service to restart. You can see a list of services by running the status command with the verbose flag -v/--verbose

Get logs for a service

The following command will get the logs for the specified service.

./bugsnag logs SERVICE [flags]
./bugsnag.exe logs SERVICE [flags]
./bugsnag logs SERVICE [flags]
./bugsnag logs SERVICE [flags]

Argument reference

  • SERVICE - Service to get logs for. You can see a list of services by running the status command with the verbose flag -v/--verbose

Flags reference

Flag (short, long) Type Description
-c,
--container
string Container to get logs for, defaults to first container if unspecified
-f,
--follow
boolean Follow log output
None,
--tail
int Number of lines to show from the end of the logs, defaults to all logs if unspecified

Run a command in a service

Runs the specified command in the specified service:

./bugsnag exec SERVICE [flags] -- COMMAND
./bugsnag.exe exec SERVICE [flags] -- COMMAND
./bugsnag exec SERVICE [flags] -- COMMAND
./bugsnag exec SERVICE [flags] -- COMMAND

Argument reference

  • SERVICE - Service to run command in. You can see a list of services by running the status command with the verbose flag -v/--verbose
  • COMMAND - Command to run

Flags reference

Flag (short, long) Type Description
-c,
--container
string Container to run command in, defaults to first container if unspecified

Retrieve password

The following command will retrieve the specified password.

./bugsnag admin get-password PASSWORD
./bugsnag.exe admin get-password PASSWORD
./bugsnag admin get-password PASSWORD
./bugsnag admin get-password PASSWORD

Argument reference

  • PASSWORD - Password to retrieve, supported values: grafana, minio-access-key, minio-secret-key, redis, support-auth-token

Version

The following command will return the version information.

./bugsnag version
./bugsnag.exe version
./bugsnag version
./bugsnag version

Generate support bundle

If you need to generate a support bundle run the following from the command line:

./bugsnag support-bundle
./bugsnag.exe support-bundle
./bugsnag support-bundle
./bugsnag support-bundle

This will generate a support bundle in your current directory.