Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_systemd_service

Rating
0 votes
Favoured:
0
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
License
BSD
Hits
7777
Files:
FileDescription
check_systemd_servicecheck_systemd_service
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This one is embarrassingly simple, but I needed to ensure that a local service was running on a systemd box. So this is it.
Synopsis:

$ ./check_systemd_service
Use:
./check_systemd_service $unit
Will check if the specified unit is active, and alert if not

$ ./check_systemd_service mimedefang
OK: active

$ ./check_systemd_service ssh
Problem: unknown

$ ./check_systemd_service sshd
OK: active