PagerTree CLI: Command Line Interface
Explore PagerTree's Command Line Interface (CLI). Learn to manage alerts efficiently with our CLI. Perfect for DevOps teams seeking streamlined incident management.
Last updated
Was this helpful?
Explore PagerTree's Command Line Interface (CLI). Learn to manage alerts efficiently with our CLI. Perfect for DevOps teams seeking streamlined incident management.
Last updated
Was this helpful?
The (pagertree
or pagertree.exe
) is a command-line utility designed to interact with the PagerTree incident management platform. It enables users to create, acknowledge, and resolve alerts, as well as integrate PagerTree with other tools via shell scripts. The CLI communicates with , providing a flexible way to automate incident management tasks.
From Source:
Clone the repository and install manually:
The PagerTree CLI can use multiple methods for configuration:
The CLI will look for a .env
file in the current working directory. A .env
file simply loads key value pairs into environment variables on application initialization.
Alternatively, you can specify the .env
file through the command flag.
You can run the CLI with the environment variables directly set.
PAGERTREE_API_KEY
Yes
PAGERTREE_BASE_URL
The PagerTree API endpoint (default: https://api.pagertree.com/api/v4
).
No
PAGERTREE_VERBOSE
Enable verbose output.
No
The PagerTree CLI offers a range of commands for interacting with PagerTree. Run pagertree --help
to see the complete list of commands.
pagertree alerts list --status "open"
: List open alerts.
pagertree alerts create --title "Out of Memory" --alias "oom" --team-id "01JT13C98M186XA3QTRFC250MT
: Create a new alert with an alias.
pagertree teams list
: List all teams.
pagertree teams current-oncall "01JT13C98M186XA3QTRFC250MT"
: List current on-call users for a team.
The CLI includes a contextual help system. Use the --help
flag to explore commands and options:
List all commands:
Get help for a specific command:
Enable verbose output for debugging by adding the --verbose
or -v
flag:
Command Not Found: Ensure pagertree
is installed and accessible in your PATH
. Ensure you have typed the command correctly.
API Key Errors: Verify that your API key is supplied and correct.
Connection Issues: Check your internet connection or proxy settings (if applicable).
pagertree
includes a built-in to guide users through available commands and options. It is ideal for integrating PagerTree with monitoring tools, automating workflows, or performing administrative tasks from the command line.
This documentation provides instructions for installing, configuring, and using the PagerTree CLI. For the latest updates and source code, visit the .
PagerTree Account: You need a valid PagerTree account and an API key. Create an API Key in your to obtain your API key.
Internet Access: The CLI requires an internet connection to communicate with PagerTree's API. If your environment uses a proxy, configure proxy settings as described in the .
Precompiled Binaries: Download precompiled distributions from the .
Python: The PagerTree CLI is built using Python. Ensure you have Python 3.8 or later installed. Download it from .
An .env
Your PagerTree API key, obtained from the .
For additional support, file an issue on the or contact PagerTree support at .