Monitoring Linux services pre-systemd?

I’d like to monitor all of my Linux servers to ensure a specific service is running. The problem is, we still have some RHEL6 that we’re stuck with for a couple more months… so there’s no systemd. I found this manual rule which works great for systemd (RHEL/CentOS 7 and newer), but just stays stuck pending for anything older.

Does anyone know if there’s an equivalent rule for init.d services? Or a generic rule to monitor either? I haven’t been able to find one.

You could resort to monitoring processes instead of services. For the usual daemons etc., this should cover much of what one usually needs (make sure service foo is up).

1 Like

Yes, I should’ve mentioned I’ve done this elsewhere… would just be nice to be able to monitor the service itself.

What is a “service” on Linux? It is a running process.

The old SysV init.d system does not have monitoring capabilities.

A lot of the better init.d scripts would provide a status when called with ‘status’. I’ll just monitor the process.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.