Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000885bareos-core[All Projects] directorpublic2017-12-22 13:192017-12-22 13:19
Assigned To 
PlatformLinuxOSDebianOS Version8
Product Version17.2.4 
Target VersionFixed in Version 
Summary0000885: Job status value for completed backup job is different in mail command variable "%e" and in catalog database
DescriptionJob status value for zabbix monitoring script (%e) and job status value in database are different for completed single backup job.
Steps To Reproduce1) Run backup job (for example JobId = 1111)
2) In bareos console: backup job completed with termination status OK
3) Job status value in catalog database is still R (Running) or C (created) for JobId 1111
4) script sends alert to zabbix server with status code 2 (status is not T or W)
5) After a couple of seconds job status in catalog database changed to T terminated) for JobId 1111
Additional Information1) definition of zabbix monitoring script for Bareos jobs

Messages {
  Name = Standard
  Mail Command = "/etc/bareos/zabbix/ %i %t %e %c %l"
  Mail = = all, !skipped
  Console = all, !skipped, !saved
  Append = "/var/log/bareos/bareos.log" = all, !skipped, !fatal, !error
  Append = "/var/log/bareos/bareos_err.log" = fatal, error

2) Catalog definition for bareos director
Catalog {
  Name = MyCatalog
  Reconnect = yes
  dbdriver = mysql
  dbname = bareos
  dbaddress =
  dbport = 3306
  dbuser = bareos
  dbpassword = "****"

3) Code block from script to check bareos job status


sql="/usr/bin/mysql --defaults-file=$bareosDbPass -h$bareosDbAddr -P$bareosDbPort -u$bareosDbUser -D$bareosDbName -NB -e" ;;

# Get Job exit status from database
bareosJobStatus=$($sql "select JobStatus from Job where JobId=$bareosJobId;" 2>/dev/null)

case $bareosJobStatus in
        "T") status=0 ;;
        "W") status=1 ;;
        *) status=2 ;;
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-12-22 13:19 Shodan New Issue

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker