I would like to ask you for any hint regarding following issue.
I'm using external scripts for checks in Zabbix 2.2. I try to develop some script which will get timestamp of certain file on remote storage. The script is working fine in CLI of the Zabbix server, but in Zabbix I see 0 (zero) value only.
I identified that the main issue is in the line with ssh command where I try to connect to remote storage and get the information.
The scripts look like:
TIMESTAMP_REMOTE_FILE=$(ssh -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -i $KEY_FILE "$REMOTE_USER"@"$HOSTNAME" "stat --format='%Y' $FILE ") echo TIMESTAMP_REMOTE_FILE The output in linux console looks like:
[user1@hostname1 externalscripts]$ sudo -u zabbixsrv ./days_since_last_backup.sh 1436745682 [user1@hostname1 externalscripts]$ But in Zabbix (Latest values) it looks like:
Timestamp Value 2015.Jul.13 15:04:25 0 When I change the value TIMESTAMP_REMOTE_FILE for some certain value (example 100000), the value is visible in Zabbix as well.
Timestamp Value 2015.Jul.13 16:04:25 100000 Have somebody been facing the same issue like me? Has got somebody any hint how to solve it?