Closed sirdrug closed 4 years ago
I have the same issue:
Message delivery ERROR: Mail program terminated in error.#012 CMD=/var/spool/bareos/bareos-zabbix.bash 5#012 ERR=Child exited with code 63
@sirdrug Sorry for the delay, I didn't see this issue. I'll check this tomorrow in the office, I haven't it installed at home. I assume you and @rubenszolt have zabbix_sender installed and bareos-zabbix.conf correctly modified with your path and credentials.
Did you try to execute that script manually with a valid jobId parameter? If done, what's the return message?
I have also this problem: Returned message with a valid jobId parameter:
Message delivery ERROR: Mail program terminated in error. CMD=/var/spool/bareos/bareos-zabbix.bash 5094 ERR=Child exited with code 56...
Can you help me, please? Client's name in bareos and zabbix is same. Sorry for my bad english...
@ragumix What's the output of the command if you execute it directly? (5094 is a valid JOBID in your bareos instance)
$> /var/spool/bareos/bareos-zabbix.bash 5094
@cmmata Nothing:
In output of the command "systemctl status bareos-dir" are error messages after night backups:
Sorry, I forgot to add the command to view the exit code. It should be
$> /var/spool/bareos/bareos-zabbix.bash 5094
$> echo $?
If you look at the script, you'll see some exit X
lines. Maybe that way we can see what's breaking the script.
Output of the "echo $?" is 56
It seems that this 3 blocks aren't performed:
However if run zabbix_sender manually, all are sent to zabbix. Please help me...
Have you configured the /etc/bareos/bareos-zabbix.conf
file with your Zabbix IP and database settings? When you run zabbix_sender manually, you do with that file's values? If you do, I would make a couple changes in the script to check for the error:
$bareosClientName
. You could add a echo $bareosClientName
below to check if it's the correct client name.> /dev/null 2>&1
output redirection. You could change that to a log file so you can see the output and the error message. For example:
$zabbixSender -z $zabbixSrvAddr -p $zabbixSrvPort -s $bareosClientName -k "bareos.$level.job.status" -o $status >/tmp/bareosZabbix.log 2>/tmp/bareosZabbix.log
Take a look at that log files, post here the output and we'll try to find out the problem.
Yes, in this file are my configuration settings.
Have you configured the /etc/bareos/bareos-zabbix.conf file with your Zabbix IP and database settings?
Yes, i run zabbix_sender manually with that file's values.
When you run zabbix_sender manually, you do with that file's values?
I made couple changes, which you said above.
If run zabbix_sender manually: Messages are coming into Zabbix.
If run job throw the bareos, after that backup will end, in output of the command "systemctl status bareos-dir" is error:
In log file also all messages are coming into Zabbix.
Generally the problem with delivering messages to the Zabbix initially was apsent. But always were and are errors in output of the command "systemctl status bareos-dir"
So your Zabbix instance is receiving Bareos job's status correctly? I thought it wasn't receiving it and that was the problem, sorry! If the only error is exit status, open the script file, comment the last line, and run a backup.
# exit $return
I forked this repository to make it compatible with Bareos, so I didn't create it from zero. I have been taking a look at the script and I don't see the reason of that exit status. If you tell me that everything is running well without the exit line, I'll change the script to save the return variable to a log file for debug purposes only.
Thanks, it works. But error still remains: Other errors go away.
After night backup amounts of errors was increased: At the end of each lines is name of the client.
@cmmata What do you think about problem, which i described above?
@ragumix excuse me, I had a lot of work at the office and couldn't attend you. So your Zabbix server is receiving correctly backup data, but there's an error after each backup. If this is the situation, please add a exit 0
at the end of the script (or uncomment the exit $return
and replace the $return
).
If it goes well with this change, I'll modify the script to return 0 if everything is fine, and >0 if there's any error.
@cmmata The problem is still remains:
Message delivery ERROR: Mail program terminated in error. CMD=/var/spool/bareos/bareos-zabbix.bash 3473 ERR=Child exited with code 63