Deploy the Agent Client Collector on a virtual machine during mass deployment using the machine's base image. Mass deployment uses silent installation, which hides installation status.
手順
-
Navigate to .
-
Download the installation file of the relevant OS.
-
Install the agent according to the relevant OS instructions.
-
Run the following command to stop the agent service:
- In a Windows environment: Run the command
sc stop AgentClientCollector
- In a Linux environment: Run the command
sudo systemctl stop acc
-
Ensure that the acc.yml file doesn’t include an encrypted API
key.
For example: api-key: "<insert plain text API key here>"
-
Delete the contents of the agent's cache directory, keeping the directory structure intact:
- In a Windows environment: C:\ProgramData\ServiceNow\agent-client-collector\cache
- In a Linux environment: /var/cache/servicenow/agent-client-collector
-
When installing on a Windows machine, ensure that the installation was successful by doing one of the following:
- Enable logging in silent installation and verify that the log file ends with the string, Windows Installer installed the product.
- Ensure that the AgentClientCollector service has the status Running.
-
When installing on a Linux machine, access the machine where the agent is installed and modify the /usr/share/servicenow/agent-client-collector/serial_number.txt file in one of the following ways:
- Change its content with the host's serial number, by running the following command:
sudo -n dmidecode -s system-serial-number
- Assign sudo permissions to the ServiceNow user to enable running the following
osqueryi command: sudo -E env "PATH=$PATH" osqueryi --logger_min_status=3 --line "select hardware_serial from
system_info"
注: You must change the virtual machine's host name after deployment to a unique value, to avoid damaging the host's CI.
-
As a post-deployment step, restart the agent service.
- In a Windows environment: Run the command
sc start AgentClientCollector
- In a Linux environment: Run the command
sudo systemctl start acc