Question
How to re-register a Plesk server in 360 Monitoring?
Answer
-
Connect to the server via SSH
-
Generate a new serverID:
# hello360 $(grep user /etc/agent360-token.ini | cut -f2 -d '=' | tr -d ' ') /etc/agent360-token.ini
-
Replace the corresponding field in the database:
-
Debian/Ubuntu:
# cp -a /opt/psa/var/modules/monitoring/monitoring.sqlite3{,.bak} && sqlite3 /opt/psa/var/modules/monitoring/monitoring.sqlite3 "UPDATE params SET value = '$(grep server /etc/agent360-token.ini | cut -f2 -d '=' | tr -d ' ')' WHERE name = 'cloud_server_key';"
-
RHEL-based:
# cp -a /usr/local/psa/var/modules/monitoring/monitoring.sqlite3{,.bak} && sqlite3 /usr/local/psa/var/modules/monitoring/monitoring.sqlite3 "UPDATE params SET value = '$(grep server /etc/agent360-token.ini | cut -f2 -d '=' | tr -d ' ')' WHERE name = 'cloud_server_key';"
-
-
Restart the service:
# systemctl restart agent360