Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_diskwrite3

Rating
0 votes
Favoured:
0
Last Release Date
2013-03-24
Compatible With
  • Nagios 3.x
Owner
License
GPL
Hits
40845
Files:
FileDescription
check_diskwritecheck_diskwrite
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Extended and fixed version of check_diskwrite2.
This version allows to check availability of either smb or windows shares, by writing and reading a file to/from a subdirectory under the share.
The subdirectory MUST exist.
Simple Shell Script, which writes a textfile with smbclient to a subdirectory under an SMB-Mount, then checks if the file is readable, and deletes the file. Installation hints: - Needs smbclient installed - you'll need a file /etc/nagios2/conf.d/share1.pw in which you enter the smb-mount credentials like this (in this example with user: nagios and password: nagiosexec): username = nagios password = nagiosexec this User must have read/write access to the share! commands.cfg entry looks like this:

define command{
command_name=check-diskwrite
command_line=$USER1$/check_diskwrite $ARG1$ $ARG2$ $ARG3$ $ARG4$
}

ARG1 : hostname
ARG2 : share
ARG4 : Subdirectory
ARG3 : Domain or Workgroup

corresponding service definition:

define service{
use generic-service
hostname HOSTNAME
description
check_command check-diskwrite!HOSTNAME!"SHARENAME"!SUBDIR!WORKGROUP/DOMAIN NAME
}

share1.pw should look like standard smbclient configuration file,
see man smbclient, -A option.