Changing IP addresses

Changing IP addresses#

Follow the procedure below to change the assigned IP address of a Scrutinizer server. These steps work for standalone deployments and reporters/collectors in distributed clusters.

Important

When changing the IP addresses of multiple Scrutinizer servers, follow the procedure to completion for each server.

  1. SSH to the Scrutinizer server as the plixer user and set the new IP address:

    scrut_util --set myaddress --ip <NEW_IP> --netmask <NETMASK> --gateway <GATEWAY>
    

    This configures the server’s IP address and updates the corresponding entry in the plixer.distributed_servers_config table on the primary reporter. The change is also picked up by every node in the distributed cluster (via the monitor service) and written to pg_hba.conf.

  2. SSH to the primary reporter as the plixer user and verify plixer.distributed_servers_config has the correct entry for the node, the other contents of the table are as expected, and server_id matches the new IP address:

    psql -c "SELECT inet_b2a(server_id) FROM plixer.distributed_servers_config;"
    

    Correct the table before continuing if the above does not return the correct IP address(es).

    Note

    Use the following query to correct the entry for the node if necessary (replace $NEWIPADDRESS and $OLDIPADDRESS with the node’s new and old IP addresses):

    UPDATE plixer.distributed_servers_config
    SET server_id = inet_a2b('$NEWIPADDRESS')
    WHERE server_id = inet_a2b('$OLDIPADDRESS');
    
  3. Regenerate the SSH node list (~plixer/.ssh/config) on the primary reporter:

    psql -Atc "SELECT * FROM plixer.ssh" > ~plixer/.ssh/config
    
  4. Regenerate all certificates for inter-node (including any configured ML Engines) database connections on the primary reporter:

    scrut_util --rotatecerts
    

    This distributes new TLS certificates with the updated IP address for pgbouncer and postgres servers and clients across the cluster.