This is the most common requested ‘action’ to fix something. I created a similar DataSource for Windows in 2016. This one uses SSH to restart a service. So far, I made it compatible with CentOS version 7 and 6 (also with Red Hat Enterprise Linux) and Ubuntu 16 and 18 (also Debian 8 and newer). If a specified service is not running, it tries to restart it twice. I purposely designed it so it shows a yellow alert (warning) if the first restart worked. It alerts with orange (error) if the second restart worked. It alerts red (critical) if it failed to run after two restarts.  Each service you specify shows up as an instance in LogicMonitor. A STATUS = 0 is ok. If your version of Linux doesn’t support the ‘systemctl’ or ‘chkconfig’ command, it will show an instance named ‘error: no compatible command (systemctl or chkconfig)’


Demo video:


  1. Download this DataSource file and import it into your account
  2. Set ssh.user, ssh.pass, and services_to_monitor. For example (crond|snmpd) or use RegEx like (cron.*|snmp.*)
    note: .*   the dot means any character and star means zero or more of this character
  3. Use the “Raw Data” tab to see the status. For a thorough test, stop a service and verify the restart worked.

DISCLAIMER: Official tech support is not provided by LogicMonitor but I will try to help as my time permits.