-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkmate CLI #1558
Comments
Checkmate CLI ProposalsI want to discuss and verify the work load. I have the demo for two concepts. Proposal 1: Internal CLINodeJS or Shell Scripts Internal means that the CLI is part of the Checkmate codebase and is not a separate executable.(All commands must be executed at Usage./cli [options] [command] [command options] ./cli monitors [add, remove, list]
./cli users [add, remove, list]
./cli incidents [list]
./cli pagespeed [list]
./cli backup [mongo, redis] | shell: using system binaries / node: using packed db drivers
./cli restore [mongo, redis] | shell: using system binaries / node: using packed db drivers
./cli upgrade | Technical Details
ImpactSystem administrators will be able to use
Database connections must be made with Mongo and Redis clients. If we don't want to make cli dependent to system wide installed mongodb and redis databases we must pack the client tools with the cli. Proposal 2: External CLIGolang External means that the CLI is a separate executable that is not part of the Checkmate codebase. Usagecheckmate [options] [command] [command options] checkmate monitors [add, remove, list]
checkmate users [add, remove, list]
checkmate incidents [list]
checkmate pagespeed [list]
checkmate backup [mongo, redis] | using packed db drivers and remote connections
checkmate restore [mongo, redis] | using packed db drivers and remote connections Technical Details
ImpactAdministrators can manage their Checkmate instances on their PCs terminal. They just need to authenticate with an admin/superuser level API token. |
Hi Mert. My take is this CLI will mostly be used for bulk monitor adding, adding/removing users, doing a backup and restoring. I am good with both options in fact. The second option is more friendly, but takes additional step to install. First option is straightforward but requires logging in in case it's needed (which, by nature, won't be quite often). Hence, there are advantages and disadvantages to both approaches. I'd say that for the sake of simplicity, we can assume that MongoDB and Redis are on the same server, and that 1st option can be used initially to see how it goes. @ajhollid what do you think? |
Checkmate CLIManage your Checkmate monitoring setup with the Checkmate CLI. OverviewThe Checkmate CLI is a command-line interface for system administrators to manage monitoring setup, users, data, and configurations of the Checkmate monitoring tool. The CLI will be a standalone tool that can be installed on the same machine with the Checkmate setup. Checkmate is an open-source, self-hosted tool designed to track and monitor server hardware, uptime, response times, and incidents in real-time with beautiful visualizations. Checkmate CLI Core Requirements🟢 Runtime ConfigurationUsers will be able to configure the Checkmate CLI runtime with a configuration file. The configuration file will be in YAML format. Linux: Windows:
base_url: "URL_TO_CHECKMATE_API" # Only base url without the trailing slash or path.
api_key: "YOUR_CHECKMATE_API_KEY" # The api key for the Checkmate API.
# Please don't forget to look at action-list item 2 for the token system.
settings:
# CLI settings will be here, if any.
... 🟡 Backup and RestoreUsers will be able to use Checkmate CLI to backup and restore their monitoring setup. ! These commands will be available only for the Docker Compose setup. Docker Compose files will be used to determine the backup and restore process. Backup command will extract the volumes to a tarball. This backup tarboll will be restored to the specified volume with the restore command.
🟡 Bulk Monitor AddingUsers will be able to add multiple monitors at once with a single command. Bulk monitor adding will be done by importing a JSON file containing the monitor definitions. The CLI will parse the JSON file and add the monitors to the Checkmate API.
Example CSV File
Depends on Checkmate API. It will be a wrapper around the Checkmate API. Users should export their authentication token to the environment variable 🟡 Add/Remove UsersAdmins will be able to add and remove users from the Checkmate CLI.
Depends on Checkmate API. It will be a wrapper around the Checkmate API. Admins should export their authentication token to the environment variable Action List
|
I solved data backup and restore mechanisms with managing the Docker Volumes. While the "External CLI" can be executed from anywhere, backup and restore operations must be performed on the device where Checkmate is installed. Which is the host machine. Actions
|
Hey @mertssmnoglu, I think you're right, a separate repository for the CLI tool makes more sense, especially since it is an external CLI. As for tokens, we'll have to work that into the backend at some point, it shouldn't take too long to implement. We're planning an overhaul of the auth system anyways so that can be added to the TODO. @gorkem-bwl can you set up an empty repository for this CLI tool? I think we're good to go ahead and add it to our documentation too. Looking really cool! |
Sure, what is your suggestion for the repo name @mertssmnoglu ? Either |
I don't have any cool options in my mind, It could be |
It will hard to remember and type in the terminal. checkmate backup
checkmatemate backup
|
This issue is a part of the $5000 grant funding program.
A command line interface which can manage Checkmate directly from terminal.
Features:
The text was updated successfully, but these errors were encountered: