Procedure to change the name of a Cyberwatch node

By default, the node’s name displayed in the web interface is based on the Cyberwatch server hostname.

This page provides required steps to change the name of a Cyberwatch node while keeping communication with agents and agentless connections functional.

Changing this name can be done in two different ways:

  • through a setting in the base configuration of the orchestrator;
  • by changing the hostname of the Cyberwatch server.

Both methods are explained below.

Steps to follow for the first method depend on your installation type: Docker Swarm or Kubernetes.

Changing the node name through configuring the base of the orchestrator

With Docker Swarm

  1. Configure the variable CBW_NODE_NAME in the file /etc/cyberwatch/containers.env.

  2. Restart Cyberwatch:

     sudo cyberwatch restart
    

With Kubernetes

  1. Uncomment the node.name field in the helm chart and modify its value, the initial file is similar to the example below:

     node:
         # name: cyberwatch-node
         ip:
         type: single
    
     ...
    

With MicroK8s (deprecated)

  1. Configure the node.name field in the file /etc/cyberwatch/containers.yml, the file should follow the format below:

     node:
     name: [NEW_NODENAME]
     ip:
     type: single
    
     ...
    
  2. Restart Cyberwatch:

     sudo cyberwatch restart
    

Changing the node name by changing the hostname of a Cyberwatch server

  1. Changing the hostname of a Cyberwatch server at Linux level can be done as follows:

     sudo hostnamectl set-hostname <new_hostname>
    
  2. Restart Cyberwatch:

     sudo cyberwatch restart
    

Configuring in the software

On the Cyberwatch web interface, once the name of a Cyberwatch server has been changed no matter the selected method, you should be automatically redirected to the node management interface.

On this page, a new node has been created. This node has no URL yet configured.

Configure the node’s URL in the application, by giving it the new IP of the Cyberwatch server. If the IP address (or DNS alias) has not been modified, use the same IP/DNS as the former node.

Forwarding objects to the new node

In Cyberwatch, assets (agents, agentless, hosts…) are affected to a node. Therefore, these objects must be forwarded from the old node that is to be deleted to the new node.

This can be done directly from the node management interface in Cyberwatch:

  • identify the former node to be removed;
  • at the end of the line of this node, click on the delete button;
  • in the displayed modal, select the node to which assets will be assigned.

Configuration of already deployed agents

If the Cyberwatch web interface URL has been modified, the base_url of already installed agents has to be updated.

Example of a PowerShell command for Windows agents (can be run using a GPO):

& 'C:\Program Files\CYBERWATCH SAS\CyberwatchAgent\cyberwatch-agent.exe' set_config --api-url 'https://[NEW_URL]/api/v2/'

For Linux agents:

sudo -u cyberwatch-agent cyberwatch-agent set_config --api-url 'https://[NEW_URL]/api/v2/'

Case of multiple nodes instance

In the case of a Cyberwatch instance with multiple nodes, the procedure is the same as for a single node instance.

However, particular attention must be paid to the choice of the node to be deleted and the one to which to assign the objects.


Back to top