KAgent is a multi-faceted administration, installation, and configuration management tool. It provides a centralized way to perform a consistent install across an existing or yet-to-be-cloud-provisioned cluster of computers. KAgent can also assist in automating tasks such as provisioning cloud hardware, configuring cluster security, adding and removing nodes, data backup and restoration, monitoring cluster health, managing and configuring cluster high availability. It has both a graphical (web) interface as well as a command line interface.
Features
KAgent facilitates or directly performs the following operations:
UI
The KAgent UI is usually available on port 8081 of the desired machine, so it can be accessed via http://<kagent-host>:8081. The KAgent UI has a navigation pane on the left-hand side and a Notifications pane on the right-hand side. Review Logging In / Out for information on accessing the KAgent UI.
Notifications
The Notifications pane lists notifications from metric or event Alerts. If there are no unread notifications, click See Past Notifications to open the Alert History . Click Mark All as Read to mark all unread notifications as read; click Mark as Read to mark an individual unread notification as read.
Logging In / Out
Once a cluster is added to KAgent (either via the installation or cluster addition process), users must login to KAgent any time they need to use any of its features. Conversely, if no clusters are in KAgent, there's no need to login, and thus, there's no way to log out (the button won't be available) until a cluster is added. To log into KAgent:
Navigate to KAgent (http://<kagent-host>:8081)
Provide a username for the Username field. Only System Admin users have access to KAgent.
Provide a password for the Password field.
Select a cluster from the Authentication Cluster drop-down menu.
Click Log In.
Important
Authenticating against a particular cluster does not restrict users from accessing other clusters that have been added to this particular instance of KAgent.
After a successful login, the KAgent UI displays the Dashboard page by default.
To log out of KAgent:
- From the KAgent UI (http://<kagent-host>:8081), click Logout in the navigation pane.
CLI
The KAgent CLI is available via the kagent executable typically stored in /opt/gpudb/kagent/bin/.
The form of the command is as follows:
|
|
Options
Option | Description |
---|---|
-h --help | Show the help menu. When used following one of the subcommands, the subcommand-specific help menu will be shown. |
--debug | Log debug messages. |
--quiet | Suppress all output messages. |
-f <path> --dbfile <path> | Path to KAgent cluster configuration database. |
--kagent-dir <path> | Path to where KAgent and its playbooks reside. |
-o <format> --output <format> | The output message format to use:
|
--user <username> | Specify what user is performing the actions, for logging purposes. |
-v --verbose | Run ansible-playbook with -vvv to debug issues. |
Subcommands | |
ring | Manage rings. |
cluster | Manage clusters. |
node | Manage nodes. |
log | Manage logs. |
check | Check cluster connectivity. |
etcd-control | Manage etcd nodes. |
factory-reset | Reset KAgent to its original state and uninstall Kinetica packages. |
get-etcd-credentials | Show kinetica-etcd credentials autogenerated during package installation. |
monitor | Set a monitor for checking cluster connectivity. |
refresh-config | Force a refresh of the clusters from current status. |
update | Update global KAgent settings. |
Ring
The form of the command to manage rings is as follows:
|
|
Ring Command | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
add [options] <name> | Add a new ring with the given name.
| ||||||||||||||
backup [options] <name> | Backup an existing ring with the given name.
| ||||||||||||||
control <name> <operation> <component> | Control the services of the ring with the given name. Apply one of the following operations:
To one of the following components:
| ||||||||||||||
force-lock <name> | Force the ring with the given name to lock. | ||||||||||||||
force-unlock <name> | Force the ring with the given name to unlock. | ||||||||||||||
gather-logs [options] <name> | Download the logs from the ring with the given name to a destination on the KAgent host.
| ||||||||||||||
inspect <name> | Inspect the details of the ring with the given name. | ||||||||||||||
install <name> | Install the HA platform on the ring with the given name. | ||||||||||||||
list | List all managed rings. | ||||||||||||||
rabbit-recovery [options] <name> | Attempt a RabbitMQ recovery; the process will clear all queues.
| ||||||||||||||
remove <name> | Remove the ring with the given name. | ||||||||||||||
update [options] <name> | Update the details of the ring with the given name.
| ||||||||||||||
upgrade [options] <name> | Upgrade Kinetica to the latest version on the ring with the given name. This will perform a sequential in-place upgrade of each cluster within the ring.
|
Cluster
The form of the command to manage clusters is as follows:
|
|
Cluster Command | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
backup [options] <name> | Backup the data on the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
backup-configuration-files [options] <name> | Backup all configuration files on the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
backup-schedule <name> | List scheduled backups on the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bootstrap-kagent [options] <name> | Bootstrap the KAgent role to a different host in the cluster; further cluster management must happen through the KAgent on this different host.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
check-for-upgrades <name> | Check if upgrades are available on-line for the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clone [options] | Clone one cluster into another.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
control <name> <operation> <component> | Control the services of the cluster with the given name. Apply one of the following operations:
To one of the following components:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
gather-logs [options] <name> | Download the logs from the cluster with the given name to a destination on the KAgent host.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
get-conf-properties <name> | Show database configuration properties of the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
get-logger [options] <name> | Show logger and logging level for the cluster with the given name. To list the available loggers, run:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
init [options] <name> | Initialize a new cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inspect <name> | Inspect the details of the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
install [options] <name> | Install Kinetica on a new cluster. Note: specifying any offline installer will switch the install to offline mode.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list | List all managed clusters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list-backup-contents [options] <name> | List the contents of a backup on the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list-backups [options] <name> | List the available backups on the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list-cluster-contents <name> | List all of the tables on the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
preflight <name> | Detect/regenerate environment settings for running KAgent commands on the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
remove <name> | Remove the cluster with the given name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
restore [options] <name> | Restore the contents of a backup to the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
secure [options] <name> | Secure the cluster with the given name by enabling HTTPS and/or authentication via LDAP, Active Directory, or Kerberos. Note: All parameters relevant to the desired authentication mechanism must be specified upon each invocation of this command--no existing settings will be used as defaults.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set-conf-properties [options] <name> | Set database configuration properties for the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set-logger [options] <name> | Set logger and logging level for the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
uninstall <name> | Remove the cluster with the given name, including all components except this instance of KAgent. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
update [options] <name> | Modify select parameters of the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
verify [options] <name> | Verify connectivity and basic configuration of the cluster with the given name.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
write-inventory [options] <name> | Write out an inventory file for the cluster with the given name.
|
Node
The form of the command to manage nodes is as follows:
|
|
Node Command | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
discover-hostname [options] <name> | Attempt to auto-discover (and update) the hostname of the node with the given name. | ||||||||||||||||||||||||||||||||||||
gather-logs [options] <name> | Download the logs from the node with the given name to a destination on the KAgent host.
| ||||||||||||||||||||||||||||||||||||
init [options] <name> <addr> <cluster> | Initialize a new node with the given name and IP addr on the given cluster. The name must be unique across all nodes in the cluster.
| ||||||||||||||||||||||||||||||||||||
inspect <name> | Inspect the details of the node with the given name. | ||||||||||||||||||||||||||||||||||||
list | List all managed nodes. | ||||||||||||||||||||||||||||||||||||
remove [options] <name> | Remove the node with the given name.
| ||||||||||||||||||||||||||||||||||||
update [options] <name> | Modify select parameters of the node with the given name.
|
Log
The form of the command to manage KAgent logs is as follows:
|
|
Log Command | Description | ||||
---|---|---|---|---|---|
list [options] | Show a list of KAgent log events.
|
Check
This command is used to ensure that all the nodes of a cluster are up by checking for connectivity and then interjecting spare nodes, if available, to fill in any gaps.
The form of the command to perform this check is as follows:
|
|
Option | Description |
---|---|
--retry-count <number> | Specify the number of connectivity check retries before failing over nodes. |
--retry-delay <seconds> | Specify the seconds to wait between each connectivity check retry. |
etcd
The form of the command to manage etcd is as follows:
|
|
Operation | Description |
---|---|
start | Start all etcd services associated with this KAgent. |
stop | Stop all etcd services associated with this KAgent. |
restart | Restart all etcd services associated with this KAgent. |
Factory Reset
This command uninstalls all Kinetica packages and resets KAgent configurations to an out-of-the-box condition. No directories will be removed unless requested.
The form of the command to perform a factory reset is as follows:
|
|
Option | Description |
---|---|
--clear-data <yes|no> | Whether to remove (yes) or not remove (no) directories left by the installation. Default is to not remove directories. |
--proceed <yes|no> | Whether to automatically proceed (yes) or ask for confirmation (no) before performing a reset. |
Get etcd Credentials
This command shows kinetica-etcd credentials autogenerated during the installation of kinetica-etcd packages.
The form of the show etcd credentials is as follows:
|
|
Monitor
This command sets a monitor for checking cluster connectivity.
The form of the command is as follows:
|
|
Option | Description |
---|---|
--interval <schedule> | Specify how often the check command will be run, in crontab format. Default is */5 * * * *. |
--retry-count <number> | Specify the number of check retries before failing over a node. |
--retry-delay <seconds> | Specify the seconds to wait between each check retry. |
Refresh Config
This command forces a refresh of the cluster configuration and roles, given its current status.
The form of the command is as follows:
|
|
Update
This command updates global KAgent settings.
The form of the command is as follows:
|
|
Option | Description |
---|---|
--is-bootstrapped <yes|no> | Whether to mark this KAgent as bootstrapped (yes) or not (no). A bootstrapped KAgent is one that is deployed into a cloud-provisioned cluster during installation. This marking will determine which set of IPs this KAgent will use in connecting via SSH to the cluster nodes. |
--force-bootstrap-unlock <yes|no> | Whether to remove (yes) or not remove (no) the lock placed on this KAgent if it had been used to bootstrap an in-cluster KAgent. |