Installing and Managing Agents with ConfigWizardCmd

Command-line installation, configuration, and management of QMonitor Agents on Windows and Linux

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):

CommandDescription
set-keyRegisters or updates the organization key.
installInstalls and starts an agent service.
uninstallRemoves an agent service.
startStarts an installed agent.
stopStops a running agent.
set-serviceaccountUpdates the service account used by the agent service.
network-checkTests DNS, TCP, and TLS connectivity to QMonitor endpoints.
helpPrints 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:

  1. Load or create the local configuration file.
  2. Save the organization key into the system credential store:
    • Windows: Windows Credential Manager
    • Linux: XECredentials/cred.json
  3. Contact QMonitor APIs to retrieve the list of agents associated with the organization.
  4. 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:

  1. Loading or initializing the organization configuration.
  2. License validation via QMonitor APIs.
  3. Credential selection:
    • If --user and --password are 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.
  4. Registering and starting the agent’s operating system service.

Optional parameters

OptionDescription
--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:

  1. DNS resolution
  2. TCP connection to port 443
  3. 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.