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
- None
Monitoring outage likely
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
- Log in to the Opsview host as
root. - 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.
- Stop the
opsview-agent/infrastructure-agentandopsview-watchdogservices usingsystemctl:
systemctl stop [opsview-agent or infrastructure-agent] opsview-watchdog
- Kill any remaining
opsviewuser processes usingpkill:
pkill -u opsview
- Check that there are no remaining processes running under the
opsviewuser:
ps -fu opsview
If there are any such processes, kill them with kill:
- a common process not to stop, which needs to be killed is the epmd -daemon
kill -9 <pid>
- Delete any Opsview
.pidand.lockfiles usingfind:
find /opt/opsview -name *.pid -delete
find /opt/opsview -name *.lock -delete
- Start the
opsview-agent/infrastructure-agentandopsview-watchdogservices usingsystemctl:
systemctl start [opsview-agent or infrastructure-agent] opsview-watchdog
- 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
- exit the commandwith CTRL+C
Comments
0 comments
Please sign in to leave a comment.