Page 1 of 1

[Nagios-devel] Plugin to check SMB shares

Posted: Thu Jan 09, 2003 5:57 am
by Guest
Hi,

I have written a nagios plugin in Perl that checks for
the availability of shares and printers an Windows
(or Samba) Servers using smbclient.

# this script checks for smb shares on a windows server
# the shares to check for are given with parameter "check"
# and can be Disks or Printers, depending on Parameter "type"
# type maybe "Disk" or "Printer"
# Return codes:
# "OK" if all tested shares are there
# "WARNING" if there are smbclient errors
# "CRITICAL" if at least one share is not listed at the queried server
# "UNKNOWN" if it doesn't get a response from the server within timeout

# example:
# check_smbshares.pl -H server -D Domain -U user -P Password -T type -C share1,share2

There is a check_disk_smb, which also checks smb shares, but it is aimed at checking
the free space on one share, whereas my check tests the existence of multiple shares/printers
in one call.

If there is an interest in including this plugin into the main plugin distribution, I could send it.
License is same as Perl.

Andreas Baetz






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]