Usually a process will have a limit for how many fd it can open. If the fd count is too many and abnormal, usually it indicates resource leak in code level or a burst of request.
Hence put effective monitoring for fd count of critical processes are important.
Below linux command can find the fd count of a given process use
lsof -p $pid | wc -l
Here comes the plugin in GitHub.GitHub
More Reading:
- Nagios Plugin: Monitor Service CPU
- Nagios Plugin: Monitor Process FD
- Nagios Plugin: Monitor Service Memory
- Nagios Plugin: Monitor Process Threadcount
Blog URL: https://www.dennyzhang.com/nagois_monitor_process_fd
[…] Nagios Plugin: Monitor Process FD […]