Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
This is a restart script for systemd services that hard fail up checks.
Current Version
1.0
Last Release Date
2026-01-05
Owner
Chad Columbus
Download URL
https://exchange.nagios.org/wp-content/uploads/images/2026/01/systemd_restart_script.zip
License
GPL
Compatible With
systemd_restart_script.pl
# Add this to your objects/commands.cfg file: define command { command_name restart_script command_line $USER1$/systemd_restart_script.pl $HOSTALIAS$ $CONTACTEMAIL$ $ARG1$ $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $LOGFILE$ }
# Add this to any nagios service definition: event_handler restart_script!(service_to_restart) # (service_to_restart) could be any systemd service like httpd, apache2, sshd, postfix, etc.
# Here is a sample service definition: define service { use local-service host_name (Host Name) service_description Postfix check_command check_systemd_status!postfix event_handler restart_script!postfix }
# Note you will also need to add a sudo config like: nagios ALL=(root) NOPASSWD: /bin/systemctl restart $service_to_restart
You must be logged in to submit a review.
To:
From: