appsinet / bareos-zabbix

Script and template to monitor backup jobs from Bareos in Zabbix.
Other
7 stars 8 forks source link

The same mistake #2

Closed sirdrug closed 4 years ago

sirdrug commented 6 years ago

Message delivery ERROR: Mail program terminated in error. CMD=/var/spool/bareos/bareos-zabbix.bash 3473 ERR=Child exited with code 63

rubenszolt commented 6 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

cmmata commented 6 years ago

@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?

ragumix commented 6 years ago

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...

cmmata commented 6 years ago

@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
ragumix commented 6 years ago

@cmmata Nothing: default

In output of the command "systemctl status bareos-dir" are error messages after night backups: image

cmmata commented 6 years ago

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.

ragumix commented 6 years ago

Output of the "echo $?" is 56 image

ragumix commented 6 years ago

It seems that this 3 blocks aren't performed: image

However if run zabbix_sender manually, all are sent to zabbix. Please help me...

cmmata commented 6 years ago

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:

ragumix commented 6 years ago

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: image 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: image

In log file also all messages are coming into Zabbix. image

ragumix commented 6 years ago

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"

cmmata commented 6 years ago

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.

ragumix commented 6 years ago

Thanks, it works. But error still remains: image Other errors go away.

ragumix commented 6 years ago

After night backup amounts of errors was increased: image At the end of each lines is name of the client.

ragumix commented 6 years ago

@cmmata What do you think about problem, which i described above?

cmmata commented 6 years ago

@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.

ragumix commented 6 years ago

@cmmata The problem is still remains: image