Monitoring SMB shares?
Stanley Hopcroft
Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Oct 5 06:41:24 CEST 2004
Dear Sir,
I am writing to thank you for your letter and say,
On Mon, Oct 04, 2004 at 08:46:05PM -0700, nagios-users-request at lists.sourceforge.net wrote:
>
> Message: 1
> Date: Tue, 5 Oct 2004 10:57:52 +0800
> From: nagios at mm.quex.org
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Monitoring SMB shares?
>
> On Mon, Oct 04, 2004 at 10:24:45AM +0200, Xavier wrote:
>
> > After a undetected incident this weekend, our management asked to
> > monitor something special:
> >
> > A windows client copies files to a SMB share (W2K server).
> > Once processed by another application, files are removed.
> > The client is a "blackbox" for us, so we would like to be notified
> > when no new files are stored on the share.
> >
> > Question: how? Possible?
>
.. snip ...
Yes this is possible and even easy with the caveats noted below.
Prob the way to go is via a language that supports access to
libsmbclient (such as Perl via a CPAN module whose name escapes me;
other languages such as Python prob have bindings too). This lets you
perform the SMB equivalent of a stat() (it may even be called that in
the Perl module) on an exported file or directory.
That said, I am not sure if there is a libsmbclient shared object that
handles the extra requirements of 2kn or XP.
> bit of scripting. The only issue I think you're likely to run
> into is if the server requires encrypted connections. Our 2k3
> domain controllers require this so I can't connect to them from
> the Linux machines, but the 2k3 workstations are fine. I did
> read somewhere about the CIFS driver supporting this stuff.
>
You need support for kerberos authentication in your client for this to
work (plus you need all the parephenalia [machine accounts] set up).
smbclient from Samba 3.0 has this, but I haven't got it going. There is
quite a bit of Kerb stuff to get ones head around.
> You could also mount the share using smbfs or cifs, and then
> just check the files with ls or expand a shell glob.
>
>
Provided these file systems support 2k3 etc.
>
> --__--__--
>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>
> End of Nagios-users Digest
Yours sincerely.
--
Stanley Hopcroft
NEIGHBORHOOD BULLY
(Words and Music by Bob Dylan)
Well, the neighborhood bully, he's just one man,
His enemies say he's on their land.
They got him outnumbered about a million to one,
He got no place to escape to, no place to run.
He's the neighborhood bully.
The neighborhood bully just lives to survive,
He's criticized and condemned for being alive.
He's not supposed to fight back, he's supposed to have thick skin,
He's supposed to lay down and die when his door is kicked in.
He's the neighborhood bully.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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