Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_smb_usedspace
0.03
2014-04-04
- Nagios 3.x
- Nagios 4.x
- Nagios XI
23636
File | Description |
---|---|
check_smb_usedspace | Plugin for GNU/Linux 32-bit server |
check_smb_usedspace_x64 | Plugin for GNU/Linux 64-bit server |
main.cpp | Main source file (C++) |
gengetopt.ggo | Gengetopt source file |
cmdline.c | Gengetopt generated file |
cmdline.h | Gengetopt generated file |
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!
This is the very very very first draft of a function which I didn't find on Nagios Exchange. I publish it with the GPL v3 license. You are very encouraged to help me to improve this plugin.
Doc for user :
You need first :
- package to mount cifs/smb share (on Debian, this is cifs-utils)
- Install sudo and config sudoers conf file to give to nagios user the right to mount a cifs/smb share, umount a share, and to change PASSWD variable.
My /etc/sudoers file :
----------
Defaults env_reset
Defaults env_keep += "PASSWD"
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local bin:/usr/sbin:/usr/bin:/sbin:/bin"
Cmnd_Alias MOUNTCIFS = /sbin/mount.cifs, /bin/umount
root ALL=(ALL:ALL) ALL
nagios ALL = NOPASSWD: MOUNTCIFS
%sudo ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d
----------
- Use check_smb_usedspace --help to obtain the command syntax. Don't forget to multiply by 4 backslash characters.
Developpers doc :
To just modify the main.cpp source file :
- Place main.cpp, cmdline.c and cmdline.h in a directory.
- Edit what you want in the file.
- My simple command to compile is #g++ main.cpp cmdline.c cmdline.h -o check_smb_usedspace
You juste need Gcc/G++ compiler and C/C++ standard libraries.
To modify the --help interface, or options to put in the command line :
- Place main.cpp and gengetopt.ggo in a directory.
- Edit the gengetopt file (doc : https://www.gnu.org/software/gengetopt/ )
- Install Gengetopt and use this command : "gengetopt < gengetopt.ggo"
- My simple command to compile is "g++ main.cpp cmdline.c cmdline.h -o check_smb_usedspace"
You juste need Gcc/G++ compiler and C/C++ standard libraries.
I will very happy if you report me bugs, patchs, suggestions, or if you give me your opinion.
Doc for user :
You need first :
- package to mount cifs/smb share (on Debian, this is cifs-utils)
- Install sudo and config sudoers conf file to give to nagios user the right to mount a cifs/smb share, umount a share, and to change PASSWD variable.
My /etc/sudoers file :
----------
Defaults env_reset
Defaults env_keep += "PASSWD"
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local bin:/usr/sbin:/usr/bin:/sbin:/bin"
Cmnd_Alias MOUNTCIFS = /sbin/mount.cifs, /bin/umount
root ALL=(ALL:ALL) ALL
nagios ALL = NOPASSWD: MOUNTCIFS
%sudo ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d
----------
- Use check_smb_usedspace --help to obtain the command syntax. Don't forget to multiply by 4 backslash characters.
Developpers doc :
To just modify the main.cpp source file :
- Place main.cpp, cmdline.c and cmdline.h in a directory.
- Edit what you want in the file.
- My simple command to compile is #g++ main.cpp cmdline.c cmdline.h -o check_smb_usedspace
You juste need Gcc/G++ compiler and C/C++ standard libraries.
To modify the --help interface, or options to put in the command line :
- Place main.cpp and gengetopt.ggo in a directory.
- Edit the gengetopt file (doc : https://www.gnu.org/software/gengetopt/ )
- Install Gengetopt and use this command : "gengetopt < gengetopt.ggo"
- My simple command to compile is "g++ main.cpp cmdline.c cmdline.h -o check_smb_usedspace"
You juste need Gcc/G++ compiler and C/C++ standard libraries.
I will very happy if you report me bugs, patchs, suggestions, or if you give me your opinion.
Reviews (0)
Be the first to review this listing!