Build precise queries to find exactly what you need
Press ESC to close
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
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:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!