Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check number of files in directory via telnet
1
2009-09-08
- Nagios 2.x
- Nagios 3.x
100169
File | Description |
---|---|
check_num_files_telnet.exp | check_num_files_telnet.exp |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Not just for Linux but should work for most UNIXs. It was cobbled together to check the number of incoming files on an old SCO server.
I hope that this script can also be used as an example of how expect can be used to automate collection of metrics through interactive applications such as telnet. One of the strengths of using expect (or a implementation of expect in another language such as perl or ruby) is the level of error checking that is possible. As this script was needed for a quick fix I did not have the time to implement full error checking.
Performance data is returned.
You may need to edit the shell prompt variable within the script. I kept this variable internal and not as a commandline option as # and > are potentially awkward to quote.
You will be gratified to hear that I ran 'shutdown -y' for the last time on the SCO server today. This does mean that I am unlikely to update this script.
I hope that this script can also be used as an example of how expect can be used to automate collection of metrics through interactive applications such as telnet. One of the strengths of using expect (or a implementation of expect in another language such as perl or ruby) is the level of error checking that is possible. As this script was needed for a quick fix I did not have the time to implement full error checking.
Performance data is returned.
You may need to edit the shell prompt variable within the script. I kept this variable internal and not as a commandline option as # and > are potentially awkward to quote.
You will be gratified to hear that I ran 'shutdown -y' for the last time on the SCO server today. This does mean that I am unlikely to update this script.
Reviews (0)
Be the first to review this listing!