How to monitor a linux file opened & closedstatus using Nagios
Selvakumar A
selvakumar.a at europlex.in
Mon Oct 5 06:36:40 CEST 2009
Hi,
Thanks a lot.I checked with the "lsof" command.It gives the number of opened files via shell,VI editor.But when I open a file through GNOME text editor the "lsof" command does not give the status of the file opened by GNOME text Editor.
It would be fine if a command gives the status of the file opened by gnome text editor.
Regards
A.Selvakumar
Siemens Building Technologies Pvt Ltd
Industry Sector, Building Technologies Division,
I BT IN SES SYS
Robert V Chandran Tower, Fourth Floor, West Wing.
#149, Velachery Tambaram Main Road,
Pallikaranai, Chennai 600 100
Tel: +91(0)4442954312
-----Original Message-----
From: Marc Powell [mailto:marc at ena.com]
Sent: Thu 10/1/2009 6:31 PM
To: Nagios-Users Mailinglist
Subject: Re: [Nagios-users] How to monitor a linux file opened & closedstatus using Nagios
On Oct 1, 2009, at 6:48 AM, Selvakumar A wrote:
> Hi,
> Thanks for your guidance.I followed your instructions.I installed
> net_nc in windows-XP and I could only get the file's modified time.
> I am also interested to know about how to monitor a linux file's
> status whether it is opened or closed and modified etc.I used
> chech_file_age plugin which gives only the age of the file.Is there
> any way please help me.
I'm not aware of any plugins that check these. If you decide to write
your own plugin, lsof (when run using sudo) will be your friend.
'is opened' - specified file appears in the output of lsof
'is closed' - specified file does not appear in the output of lsof
'is modified' - depends on what you mean by modified. File age may be
sufficient but if you want to see if actual changes were made you'll
need to create a copy at each run and compare the current with the
previous (using cmp or diff, for example).
A quick google for 'nagios check lsof' doesn't yield any interesting
initial results but you might have luck further in the search results.
--
Marc
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
This message (including attachments) is confidential and may be privileged. If you have
received it by mistake please notify the sender by return e-mail and delete this message
from your system. You may not copy, disclose or use the contents in any way. SBTPL
does not guarantee integrity of this communication nor is that this communication free of
issues, interceptions or interference. This communication does not create or modify any
contract, and unless otherwise stated, is not intended to be contractually binding. Views
or opinions expressed in this e-mail message are those of the author only.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091005/2e02779c/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list