Monitor Fileserver

Hans Engelen engelenh at gmail.com
Mon Feb 27 20:09:57 CET 2006


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?
> > >> > >> > >>
> > >> > >> >
> > >> > >> >
> > >> > >> > we use something like this to check disks on
> > >> > Windows
> > >> > >> > machines:
> > >> > >> >
> > >> > >> > check_nt_disk!M!70!90
> > >> > >> >
> > >> > >> > where M is the drive we are checking and 70/90
> > >> > are
> > >> > >> > our limits. there are
> > >> > >> > other nt commands that can be used like:
> > >> > >> >
> > >> > >> > check_nt_cpuload
> > >> > >> > check_nt_procstate
> > >> > >> >
> > >> > >> > and so on...
> > >> > >> >
> > >> > >> > not sure this answers your question, would need
> > >> > to
> > >> > >> > know exactly what you
> > >> > >> > want to monitor.
> > >> > >> >
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > __________________________________________________
> > >> > >> 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&kid0944&bid$1720&dat1642<http://sel.as-us.falkag.net/sel?cmd=lnk&kid%110944&bid$1720&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
> > >> >
> > >>
> > >>
> > >> __________________________________________________
> > >> 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?cmdlnk&kid0944&bid$1720&dat1642
> > <http://sel.as-us.falkag.net/sel?cmdlnk&kid%110944&bid$1720&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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060227/42c880f0/attachment.html>


More information about the Users mailing list