Use Cases

The following are some use-case examples:

Example 1 – Provision Agent

The following example shows how to provision Qualys Cloud Agent. Please note that this method of activation assumes that the Cloud Agent uses the root user.

$ /usr/local/qualys/cloud-agent/bin/qualys-cloud-agent.sh
ActivationId="022224c8-31c7-11e5-b4f7-0021ccba987e"
CustomerId="146556fa-31c7-11e5-87b6-0021ccba987e"

Example 2 – Use non-root account

The following example shows how to configure Qualys Cloud Agent to use a non-root account for running data collection commands.

$ /usr/local/qualys/cloud-agent/bin/qualys-cloud-agent.sh
ActivationId="022224c8-31c7-11e5-b4f7-0021ccba987e"
CustomerId="146556fa-31c7-11e5-87b6-0021ccba987e"
UseSudo=1 User=scanuser
Group=wheel

When the configuration command runs, a new group needs to exist. The non-root user is expected to be added to the specified group to allow it to access binary and temporary files that comprise Qualys Cloud Agent. In order to perform unattended data collection, the non-root user needs to have sudo privileges without a password.

Example 3 – Raise the logging level

It is also possible to instruct Qualys Cloud Agent to log events at a higher logging level using the following command:

$ /usr/local/qualys/cloud-agent/bin/qualys-cloud-agent.sh LogLevel=4

The above command omitted the ActivationID and CustomerID parameters to illustrate the configuration tool can be used to adjust the log level after provisioning.

Example 4 – Change platform

The following example shows how to configure Qualys Cloud Agent to re-provision to a new platform:

qualys-cloud-agent.sh ActivationId="022224c8-31c7-11e5-b4f7-0021ccba987e" CustomerId="146556fa-31c7-11e5-87b6-0021ccba987e"
ServerUri="https://qagpublic.qg2.apps.qualys.com/CloudAgent"