Installing and Managing Agents with ConfigWizardCmd
ConfigWizardCmd is the command-line tool used to install and manage QMonitor agents.
On Linux, it is the only available configuration method.
On Windows, it is an alternative to the graphical ConfigWizard tool and is suitable for automation, scripting, and DevOps pipelines.
This page documents all commands supported by ConfigWizardCmd, their parameters, and typical usage patterns.
Overview
ConfigWizardCmd is shipped together with the QMonitor agent kit and exposes several commands (verbs):
| Command | Description |
|---|---|
set-key | Registers or updates the organization key. |
install | Installs and starts an agent service. |
uninstall | Removes an agent service. |
start | Starts an installed agent. |
stop | Stops a running agent. |
set-serviceaccount | Updates the service account used by the agent service. |
network-check | Tests DNS, TCP, and TLS connectivity to QMonitor endpoints. |
help | Prints built-in help text. |
General syntax:
ConfigWizardCmd <command> [options]
1. Setting the organization key
Before installing agents, register the organization’s key:
ConfigWizardCmd set-key --org MyOrg --key your_organization_key
This command will:
- Load or create the local configuration file.
- Save the organization key into the system credential store:
- Windows: Windows Credential Manager
- Linux:
XECredentials/cred.json
- Contact QMonitor APIs to retrieve the list of agents associated with the organization.
- Validate the key and update any installed agents.
If the key is invalid, the command exits with an error.
2. Installing an agent
To install an agent named Default:
ConfigWizardCmd install --org MyOrg --agent Default --key your_organization_key
During installation, ConfigWizardCmd performs:
- Loading or initializing the organization configuration.
- License validation via QMonitor APIs.
- Credential selection:
- If
--userand--passwordare provided (Windows only), that account is used. - Otherwise the agent runs as NT AUTHORITY\NetworkService on Windows.
- Linux always uses credentials stored in
XECredentials/cred.json.
- If
- Registering and starting the agent’s operating system service.
Optional parameters
| Option | Description |
|---|---|
--user <name> | Windows service account username |
--password <pwd> | Password for the service account (hidden in CLI) |
Example with a custom account:
ConfigWizardCmd install --org MyOrg --agent Default --key your_key --user DOMAIN/User --password P@ss123
3. Starting and stopping agents
Start a service:
ConfigWizardCmd start --org MyOrg --agent Default
Stop a service:
ConfigWizardCmd stop --org MyOrg --agent Default
These commands interact directly with the OS service manager and do not require a key.
4. Uninstalling an agent
Remove an agent completely:
ConfigWizardCmd uninstall --org MyOrg --agent Default
This will:
- Stop the service
- Remove the service definition
- Update local configuration
5. Updating the service account
You can change the credential under which an agent runs:
ConfigWizardCmd set-serviceaccount --org MyOrg --agent Default --key your_organization_key
Windows behavior
A secure credential prompt appears:
- Leave username/password empty → service runs as Network Service
- Provide domain or local credentials → service runs under that identity
Linux behavior
The CLI prompts for:
Username:
Password:
Credentials are stored in:
XECredentials/cred.json
After updating credentials, the service is automatically restarted.
6. Network connectivity check
Validate that the agent can connect to QMonitor servers:
ConfigWizardCmd network-check
This tool performs:
- DNS resolution
- TCP connection to port 443
- TLS handshake (TLS 1.2/1.3)
Example output:
[INFO] api.qmonitorapp.com -> 2606:4700:...
[ OK ] api.qmonitorapp.com:443 - TLS established (Tls13)
Useful for troubleshooting firewalls, proxies, and outbound restrictions.