MySQL Enterprise Monitor 4.0.13 Manual
The SSH Host key is used to distinguish monitored hosts, there should not be duplicate SSH keys. A key can be duplicated if a server is cloned. This section describes how to change the SSH host key for a particular host, eliminating the events and alarms generated when duplicate hosts are detected.
The following steps must be performed:
Generate a new SSH key for the monitored host.
Edit the monitoring agent's configuration.
Edit the hostid
in the MySQL Enterprise Service Manager
repository.
On UNIX, Linux and Mac OS platforms, use the
ssh-keygen
utility. On Microsoft Windows
platforms, there are several tools, but this example uses
puttygen
.
To generate a new SSH key for the monitored host, do the following:
On the monitored host, generate an SSH key. For example:
shell> ssh-keygen -t rsa -N ''' -f /etc/ssh/ssh_host_key
If using puttygen
, click
Generate and follow the instructions
on-screen.
The key can be generated using RSA (SSH1 or SSH2), DSA, or ECDSA. All are supported by MySQL Enterprise Monitor.
Retrieve the key fingerprint.
The fingerprint is an alphanumeric string similar to the following:
5a:86:16:fb:2e:16:e8:21:ef:07:ee:6c:fc:4f:84:e5
On UNIX-based platforms, retrieve this value with the following command:
shell> ssh-keygen -l -f /path/to/key/filename.pub
On Windows platforms, using puttygen
, this
value is in the Key Fingerprint field.
Stop the monitoring agent.
Open the monitoring agent's
bootstrap.properties
configuration file,
and add, or edit, the following value:
agent-host-id=ssh:{New SSH Fingerprint}
For example, using the fingerprint listed above:
agent-host-id=ssh:{5a:86:16:fb:2e:16:e8:21:ef:07:ee:6c:fc:4f:84:e5}
On the MySQL Enterprise Service Manager machine, edit the
hostid
value in the repository:
mysql> UPDATE mysql.inventory SET VALUE = 'ssh:{New SSH Fingerprint}' WHERE name = 'hostId';
Restart the monitoring agent.