Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
A script that checks if processes and TCP ports are up. Tested on Redhat Enterprise Linux 3,4, Fedora 4,5,6, Solaris 6,7,8,9 and HP-UX 11.11,11.23
Current Version
Last Release Date
June 16, 2009
Owner
Nagios Exchange
Check Processes and Ports. Version 1.01
Heavily based on check_linux_procs.
A script that checks if processes and TCP ports are up. Tested on Redhat Enterprise Linux 3/4, Fedora 4, Solaris 6,7,8,9 and HP-UX 11.11, 11.23
Process checks are divided into two different levels, warning and critical. This way you may monitor less important processes and critical processes at the same time. The part that checks if ports are up uses netstat. It will mostly detect if an server application does not start up correctly, and thereby does not open up it's port.
If you want to be sure ports are up and that the application is listening on it, use more specialized socket check scripts or check_tcp.
Usage: Edit the check_system_pp script and add whatever processes and ports that you want to monitor. For example:
---snipp---- PROCLIST_RED="sshd crond klogd" PROCLIST_YELLOW="less_critical_process other_stuffd" PORTLIST="22 25" ---snipp----
Command line example for nrpe.cfg: commandcheck_system=/path/to/nrpe/libexec/check_system_pp
FAQ: Q: I do not have Bash installed. What to do? A: Just use regular bourne shell (sh). Edit the first line in the script to the path of sh. For example: #!/usr/bin/sh
let's simple check for ssh-port 22 this is the part of code used - then it looks if there is at least ONE line netstat -an | grep LISTEN | grep 22 result: *.22 *.* 0 0 49152 0 LISTEN *.22 *.* 0 0 49152 0 LISTEN *.11221 *.* 0 0 49152 0 LISTEN *.11222 *.* 0 0 49152 0 LISTEN *.22 *.* 0 0 49152 0 LISTEN (you get any line containing "22" not only where the PORT is 22!!
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!