This is the script:
Code: Select all
#!/bin/bash
z=`ls /share/CACHEDEV1_DATA/Public/messages -l | awk -F'administrators' '{print $2}' | awk '{print $3}' | cut -c 1-4`
y=`date | awk '{print $4}' | cut -c 1-4`
if [ "$z" = "$y" ]
then
echo "Ricezione Syslog Funzionante (z=$z y=$y)"
exit 0
else
echo "Attenzione, controllare funzionamento Syslog. (z=$z y=$y)"
exit 1
fi
Code: Select all
Ricezione Syslog Funzionante (z=11:0 y=11:0)Code: Select all
/usr/local/nagios/libexec/check_by_ssh -H xx.xx.xx.18 -C "/nagios/check_syslog.sh" -p 9022 --logname=adminCode: Select all
Attenzione, controllare funzionamento Syslog. (z=18 y=11:0)maybe the ip but i don't undestand
any idea?