Zabbix can monitor samba deamon but cant say for sure, if samba is available from network. You can monitor if samba alive with such a script. So in /etc/zabbix/external directory must be file samba_big.sh with content below.
host=1.2.3.4
rez=`nmap --host-timeout 15000 -p 445 $host | grep 445/tcp | cut -f 2 -d ' '`
if [ "$rez" != "open" ]; then
echo "0"
else
echo "1"
fi
Where 1.2.3.4 is ip address of your samba server
As you maybe know all external scripts must be placed in
/etc/zabbix/external/
or whatewer you defined in zabbix-server.conf file see below
zabbix:/etc/zabbix # cat zabbix-server.conf | grep external
# Specifies how long we wait for agent, SNMP device or external check (in seconds).
# Full path to location of external scripts.
# ExternalScripts=${datadir}/zabbix/externalscripts
ExternalScripts=/etc/zabbix/external
Further add it as simple zabbix item, the usage of boolean is in doubt, you can experiment with that but my solution work for me.
Unit above is just imaginary units we aggreed with colleagues when we dont know units we just write ppg to look scientific in reports. And add trigger
Nav komentāru:
Ierakstīt komentāru