Bash Script – Test Veeam Linux Agent Socket and Restart Service if Needed

I recently started using the full version of Veeam Backup & Replication (Build 11.01.1261) in a corporate production environment and was kind of shocked to find that the Veeam Agent for Linux (Agent version: 5.0.1.4493) fails so regularly with the following warning and error messages:

Processing ServerName Error: Failed to execute agent management command print. Connection refused Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon.

and

Task failed. Error: Failed to execute agent management command print. Connection refused Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon.

Apparently, Veeam offers no error checking or resolution process for automatically restarting the service, so I had to write a quick script to resolve this ongoing issue.
Continue reading “Bash Script – Test Veeam Linux Agent Socket and Restart Service if Needed”

Bash Script – OpenMCU-ru Service Monitor -OR- Monitor and Automatically Restart a Service Upon Failure

I threw this service monitoring script together because occasionally the OpenMCU-ru process in the developmental versions can crash out on my Ubuntu Server from time to time, so I wanted it to auto-restart. The script could easily be modified and used for any other service you like, but it was written specifically for OpenMCU-ru and Debian based operating systems.

There are two pieces to this puzzle (which makes for an awfully pathetic and simplistic puzzle), the “/etc/init.d/mcu-monitor” startup script to run the monitoring script as a daemon and the “/usr/local/bin/mcu-monitor.sh” monitoring script itself, both are fairly simple and straight forward. Continue reading “Bash Script – OpenMCU-ru Service Monitor -OR- Monitor and Automatically Restart a Service Upon Failure”