1

Is it possible to obtain the status of Bacula Director in some parseable format? It looks like the human-readable representation (one you can see when using bacula-console) is formed on the director side during the TCP control connection.

2
  • What exactly are you looking for in this? I get quite a lot of different things from the status command for director: runtime, memory usage, # jobs run, and lists of scheduled, running, and terminated jobs.
    – DerfK
    Apr 5, 2011 at 17:14
  • @DerfK I want to obtain everything 'status director' returns and format a nice webpage from it. Apr 7, 2011 at 5:13

1 Answer 1

1

I've just written a bash scripty thing to poll the bacula client status, and write the tape write speed (in GB/hr) to a logfile, along with a datestamp:

Here's how.

while `/bin/true`; 
do 
  echo -n `date +%s` >> /var/log/backupspeed.log; 
  echo -n " " >> /var/log/backupspeed.log; 
  BPS=$(echo "status client"|bconsole|awk '/Bytes\/sec/ {print $3}'|cut -d'=' -f2|sed 's/,//g'); 
  echo "scale=10;($BPS/(1024^3))*(60^2)"|bc >> /var/log/backupspeed.log; 
  sleep 10; 
  echo `date +%s`; 
done

This is just what I threw together, to scratch my own itch, but it's pretty versatile.. You can pretty much just squirt stuff at bconsole, and parse the output.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .