Beginner: Pass host specific parameter to disk_check_smb?
Posted: Fri Jul 31, 2015 4:14 pm
Hi,
just started to look inside Nagios, so this might be an easy one.. Would be very happy if you can point me the right direction..
I'd like to achieve:
- define HOSTGROUP samba including x hosts
- define generic service check
- provide per host variables (share name, user name, pwd)
I've managed #1 + #2 - but so far I cannot use a host variable in service.cfg or /etc/nagios-plugins/config/disk-smb.cfg directly..
I've tried different format, e.g. <user>, $user$ - no avail so far..
Thanks!
just started to look inside Nagios, so this might be an easy one.. Would be very happy if you can point me the right direction..
I'd like to achieve:
- define HOSTGROUP samba including x hosts
- define generic service check
- provide per host variables (share name, user name, pwd)
I've managed #1 + #2 - but so far I cannot use a host variable in service.cfg or /etc/nagios-plugins/config/disk-smb.cfg directly..
I've tried different format, e.g. <user>, $user$ - no avail so far..
Thanks!
Code: Select all
define hostgroup {
hostgroup_name samba-servers
alias SAMBA servers
members banana,power,office
}Code: Select all
define service {
hostgroup_name samba-servers
service_description SAMBA
check_command check_disk_smb!share!user!password
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
process_perf_data 1
use generic-service
notification_interval 0
}Code: Select all
define host{
use generic-host
host_name banana
alias banana
address 192.168.177.70
_smb_share share
_smb_user user
_smb_pwd password
}