×
Back to Opsview FAQ
Solution: Restart
Solution: Event handler to restart
BSM - Message Queue Count - METRIC CRITICAL - Message Count is ...msgs
Symptoms Copied
Opsview - BSM - Message Queue Countservice check is critical with status infoMessage Count is ...msgs
Cause: Loss of database connection Copied
Known issue OP-48285
Losing network connectivity to the database can cause the bsm-queue message queue to back up and not clear down—even after the network connection is restored.
Solution: Restart opsview-bsm
Copied
Typically, restarting the opsview-bsm component should resolve this issue.
-
Log in to your BSM server as
root(this is usually your orchestrator). -
Restart the
opsview-bsmcomponent usingopsview-monit:
/opt/opsview/watchdog/bin/opsview-monit restart opsview-bsm
Solution: Event handler to restart opsview-bsm
Copied
If you encounter this issue often, it may be best to create an event handler for when this service check goes critical that restarts the opsview-bsm component.
Refer to our event handler documentation for more information about how to do this. Here is an example script you could use to restart the opsview-bsm component:
#!/bin/bash
## If Service State is CRITICAL (options are OK, WARNING, CRITICAL and UNKNOWN)
## and Service State Type is HARD (options are HARD and SOFT)
## then execute Event Handler action
set -e
if [[ "$NAGIOS_SERVICESTATE" = "CRITICAL" && "$NAGIOS_SERVICESTATETYPE" = "HARD" ]]; then
echo "restarting opsview-bsm"
/opt/opsview/coreutils/bin/opsview_watchdog opsview-bsm restart >/dev/null 2>&1
# record event to syslog
logger "opsview-bsm restarted by Opsview $NAGIOS_HOSTADDRESS"
fi
["Geneos"]
["FAQ"]