Back to Opsview FAQ

Hard restart all components on an Opsview host

If an Opsview host shuts down before all its Opsview components stop, old .pid and .lock files might prevent the components starting properly. Follow these steps to cleanly restart all Opsview components on an Opsview host, including tidying up left-over .pid and .lock files.

Prerequisites Copied

Monitoring outage likely Copied

Restarting the Opsview components on an Opsview host will likely cause a monitoring outage. The severity and extent of such an outage will vary depending on the host and its role in your Opsview environment.

Process Copied

  1. Log in to the Opsview host as root.
  2. Stop the Opsview components using opsview-monit:
/opt/opsview/watchdog/bin/opsview-monit stop all

Wait for all the components to stop. All components should be Not monitored when you check the opsview-monit summary:

/opt/opsview/watchdog/bin/opsview-monit summary -B

Depending on the speed of your system, stopping all the components may take a few minutes.

  1. Stop the opsview-agent / infrastructure-agent and opsview-watchdog services using systemctl:
systemctl stop [opsview-agent or infrastructure-agent] opsview-watchdog
  1. Kill any remaining opsview user processes using pkill:
pkill -u opsview
  1. Check that there are no remaining processes running under the opsview user:
ps -fu opsview

If there are any such processes, kill them with kill:

kill -9 <pid>
  1. Delete any Opsview .pid and .lock files using find:
find /opt/opsview -name *.pid -delete
find /opt/opsview -name *.lock -delete
  1. Start the opsview-agent / infrastructure-agent and opsview-watchdog services using systemctl:
systemctl start [opsview-agent or infrastructure-agent]  opsview-watchdog
  1. Start the Opsview components using opsview-monit- the initial opsview-monit command is necessary to initialise opsview-monit first
/opt/opsview/watchdog/bin/opsview-monit
/opt/opsview/watchdog/bin/opsview-monit start all

Depending on the speed of your system, starting all the components may take a few minutes.

Monitor with:

`watch /opt/opsview/watchdog/bin/opsview-monit summary -B

["Geneos"] ["FAQ"]

Was this topic helpful?