Monitor Fileserver

Josh josh2780 at yahoo.com
Mon Feb 27 20:29:49 CET 2006


Hans / Ryan,

Thanks for your input...

I thought the question might arise about "why don't I
monitor the server housing the shares"... well, the
problem there is the machine is a NetApp device (not
running windows and won't allow me to install anything
on it of course... it's an appliance).

I've tried touching the /root/.smb/smb.conf...  the
problem is most likely related to the nagios user
can't even see inside /root.

I like your idea of mapping the drives under the
nagios user and then running the service as the nagios
user... I'll give that a shot.

On a side note, I did try getting the nrpe checks to
work on the windows server but am getting the
following error:

"CScript Error: Execution of the Windows Script Host
failed. (Catastrophic failure)"

A little research shows it is most likely related to a
software security policy in place.  Anyone on this
list know what I need to change?

Thanks again for all your help.

Josh

--- Hans Engelen <engelenh at gmail.com> wrote:

> Dangit replied privately and not to the list, anyway
> heres a forward.
> 
> Also just checked the /root/.smb/smb.conf reference
> is actually a workaround
> for a problem with samba's libsmbclient in the perl
> module
> Filesys::SmbClient (used by check_smb_shares.pl).
> Aparantly libsmbclient
> segfaults if it does not exist. Therefor if it does
> not exist the perl
> module Filesys::SmbClient tries to make one (an
> empty one) but has no
> permission to do so from what you wrote. I supose
> you could make it yourself
> (touch /root/.smb/smb.conf; chmod og+r
> /root/.smb/smb.conf). Maybe that will
> solve your issues with that particular check
> allowing you to use it to
> monitor the remote shares you spoke of
> 
> Cheers,
> Hans
> 
> 
> On 2/27/06, Hans Engelen <engelenh at gmail.com> wrote:
> >
> > For mapped drives that is quite normal since
> mapped drives are, barring a
> > small number of special cases, only accessible for
> the user that did the
> > actual mapping. It's the same problem you get for
> other NT services trying
> > to access a drive mapping made from another user.
> Also most likely your
> > pNSClient (or NC_Net or NSClient++) or whatever
> agent you have running on
> > the Windows box is running under the System
> security setting. This security
> > context is only valid for that windows box
> internally and as such has no
> > credentials to access anything beyond that
> machine. This includes (but is
> > not limited to) shares.
> >
> > Theoretically you could of course run your Nagios
> Agent under an actual
> > user account, log in interactively on that same
> account and create a
> > persistent mapping (net use * \\server\share
> /persist:yes, if memory serves)
> > to the shares in question. Since the service will
> use the same profile when
> > logging in that should solve the issue. But why
> even monitor a remote disk
> > in this way. Just install the Nagios Agent on the
> server that houses the
> > share and monitor it directly instead of
> indirectly (with all the quirks and
> > pitfalls that come with it).
> >
> > Of course in this case the check_smb_shares is a
> solution too. As to why
> > it insists on writing to /root/.smb/smb.conf is a
> bit strange. Possibly this
> > was defined somewhere in the check_smb_shares.pl
> file. Open it up in a text
> > editor and see.
> >
> > Cheers,
> > Hans
> > Cheers,
> > Hans
> >
> > On 2/27/06, Ryan Wilcox <rwilcox at mobitrac.com>
> wrote:
> > >
> > > yeah... i got the same error as you did with a
> mapped drive. we aren't
> > > monitoring any mapped drives right now, hence
> the confusion.
> > >
> > > not sure about the mapped drives... anyone else
> have an idea for josh?
> > >
> > > >> -----Original Message-----
> > > >> From: Josh [mailto:josh2780 at yahoo.com]
> > > >> Sent: Monday, February 27, 2006 11:38 AM
> > > >> To: Ryan Wilcox;
> nagios-users at lists.sourceforge.net
> > > >> Subject: RE: [Nagios-users] Monitor
> Fileserver
> > > >>
> > > >> Hmm...  Got it working for local drives on
> the windows
> > > >> box but I get an "Invalid drive" error from
> the
> > > >> check_nt script when I check a drive that is
> mapped.
> > > >> Any way to check networked drives on that
> windows box?
> > > >>  Or will I have to go with nrpe checks for
> that?
> > > >>
> > > >> --- Ryan Wilcox <rwilcox at mobitrac.com> wrote:
> > > >>
> > > >> > actually i am using check_nt right from the
> nagios
> > > >> > (fedora core 4) box.
> > > >> >
> > > >> > ./check_nt -H 10.0.0.32 -v USEDDISKSPACE
> -lc -w 75
> > > >> > -c 90
> > > >> >
> > > >> > output looks like:
> > > >> >
> > > >> > c:\ - total: 74.52 Gb - used: 52.98 Gb
> (71%) - free
> > > >> > 21.54 Gb (29%) |
> > > >> > 'c:\ Used
> Space'=52.98Gb;55.89;67.07;0.00;74.52
> > > >> >
> > > >> >
> > > >> >
> > > >> > >> -----Original Message-----
> > > >> > >> From: Josh [mailto:josh2780 at yahoo.com]
> > > >> > >> Sent: Monday, February 27, 2006 10:57 AM
> > > >> > >> To: Ryan Wilcox;
> > > >> > nagios-users at lists.sourceforge.net
> > > >> > >> Subject: RE: [Nagios-users] Monitor
> Fileserver
> > > >> > >>
> > > >> > >> I'm assuming you are using NRPE and
> executing the
> > > >> > >> check_nt_disk from a windows machine... 
> I might
> > > >> > end
> > > >> > >> up doing that.
> > > >> > >>
> > > >> > >> I was attempting to use smb checks
> directly from
> > > >> > the
> > > >> > >> linux box running Nagios.
> > > >> > >>
> > > >> > >>
> > > >> > >>
> > > >> > >> --- Ryan Wilcox < rwilcox at mobitrac.com>
> wrote:
> > > >> > >>
> > > >> > >> >
> > > >> > >> >
> > > >> > >> > >> -----Original Message-----
> > > >> > >> > >> From:
> > > >> > nagios-users-admin at lists.sourceforge.net
> > > >> > >> > [mailto:nagios-users-
> > > >> > >> > >> admin at lists.sourceforge.net] On
> Behalf Of
> > > >> > Josh
> > > >> > >> > >> Sent: Monday, February 27, 2006
> 10:19 AM
> > > >> > >> > >> To:
> nagios-users at lists.sourceforge.net
> > > >> > >> > >> Subject: [Nagios-users] Monitor
> Fileserver
> > > >> > >> > >>
> > > >> > >> > >> Does anyone have any suggestions as
> to how
> > > >> > to
> > > >> > >> > monitor
> > > >> > >> > >> network drive (fileserver) status
> from
> > > >> > Nagios?
> > > >> > >> > I'm
> > > >> > >> > >> trying to get the
> check_smb_shares.pl (from
> > > >> > >> > >> nagiosexchange.org) but keep
> getting the
> > > >> > >> > following
> > > >> > >> > >> error when Nagios executes the
> check:
> > > >> > >> > >>
> > > >> > >> > >> **ePN 'check_smb_shares.pl' Can't
> create
> > > >> > >> > >> /root/.smb/smb.conf : Permission
> denied
> > > >> > >> > >>
> > > >> > >> > >> Not sure why when the Nagios binary
> executes
> > > >> > the
> > > >> > >> > >> script it wants to use /root/
> (Nagios runs
> > > >> > as the
> > > >> > >> > user
> > > >> > >> > >> nagios).
> > > >> > >> > >>
> > > >> > >> > >> Any other suggestions on monitoring
> network
> > > >> > >> > drives?
> > > >> > >> > >>
> > > >> > >> >
> > > >> > >> >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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