[PLUG] time based grep

Rich Shepard rshepard at appl-ecosys.com
Wed Oct 12 18:06:33 UTC 2005


On Wed, 12 Oct 2005, Kris wrote:

> My goal is to write a nagios plugin which grep's the last 30 minutes of
> /var/log/dhcp.log for "no free leases".

Kris,

   I've no idea what nagios are (a generic Nachos?), but the first thought
that comes to mind is a shell script that runs every 30 minutes via cron.
You could pipe the output through awk to extract the appropriate time period,
then pipe that to grep. Will that not work?

Rich

-- 
Dr. Richard B. Shepard, President     |   Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) |  Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com>     Voice: 503-667-4517         Fax: 503-667-8863



More information about the PLUG mailing list