Our first Nagios plugin

It's time now to start working to our first Nagios plugin, and it does not really matter what we are going check here, since what we are interested in is how to deal with the exchange between Nagios and the plugin, more than how and what we are going to monitor. Once we are done with the script, we will be able to reuse its framework to create whatever script we want, so let's start.

Our project involves checking the status of the local disk using the Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T.), which we can think of as a system embedded in most hard disks and solid state disks, whose task is to anticipate and prevent issues and failures. So, a plugin able to query the S.M.A.R.T. system can be ...

Get Mastering Bash now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.