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: single-machine
docker:
  socket: unix:///var/run/docker.sock

The configuration options are described below:

  • socket: The default location of the Docker socket. unix:///var/run/docker.sock is sufficient for most installs. If your Docker installation socket is not available at that location, amend the location to match your installation.

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

Start Bugsnag

The following command will start your Bugsnag instance if it is stopped.

./bugsnag start
./bugsnag.exe start
./bugsnag start
./bugsnag start

Stop Bugsnag

The following command will stop your Bugsnag instance if it is started.

./bugsnag stop [flags]
./bugsnag.exe stop [flags]
./bugsnag stop [flags]
./bugsnag stop [flags]

Flags reference

Flag (short, long) Type Description
-f,
--force
boolean force stop Bugsnag

Restart Bugsnag

The following command will stop, then start your Bugsnag instance.

./bugsnag restart [flags]
./bugsnag.exe restart [flags]
./bugsnag restart [flags]
./bugsnag restart [flags]

Flags reference

Flag (short, long) Type Description
-f,
--force
boolean force restart Bugsnag

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 -- COMMAND
./bugsnag.exe exec SERVICE -- COMMAND
./bugsnag exec SERVICE -- COMMAND
./bugsnag exec SERVICE -- 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

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 and display the path of the generated bundle.

Reset the Replicated management console password

Your console password can be reset by running the following command. (then visit https://SERVER_IP:8800/create-password and set a new password)

replicated auth reset