Xymon with Bacula
list Joseph de Nicolo
Xymon Users, I was wondering if anybody had experience with using xymon to monitor a bacula backup server. I am running a dedicated xymon server, and the bacula backup server is offsite for backup reasons. I have a xymon client only installation on the bacula server so I can receive cpu, disk, and the other system monitors. I came across this xymon extension script ( http://www.revpol.com/xymon_bacula_check_script ) and I installed in on the client side ( bacula backup server ). I followed the instructions (using method 2 bconsole access & modifying the script to fit my environment ) and the test of the xymon user ability to use bconsole works fine. I am not seeing a backup or bacula section on the xymon server webpage. My guess is that I have to add it somehow to the hosts.cfg file on the server side but this is my first custom script / xymon extension that I had to use so I'm not sure what the syntax should look like for the hosts.cfg. Should I specify the full script name like this ( 155.x.x.101 backup # ssh xymon_bacula_check.sh )? Perhaps there is something else im missing server side that needs to be done like put the custom script in server/ext ? Appreciate the help Thanks, * * *Joseph De Nicolo* *Systems & Network Admin**istrator* *Center for Complex Network Research <http://www.barabasilab.com>* *Northeastern University*
list Bill Arlofski
▸
On 01/10/13 13:30, Joseph De Nicolo wrote:
Xymon Users, I was wondering if anybody had experience with using xymon to monitor a bacula backup server. I am running a dedicated xymon server, and the bacula backup server is offsite for backup reasons. I have a xymon client only installation on the bacula server so I can receive cpu, disk, and the other system monitors. I came across this xymon extension script ( http://www.revpol.com/xymon_bacula_check_script ) and I installed in on the client side ( bacula backup server ). I followed the instructions (using method 2 bconsole access & modifying the script to fit my environment ) and the test of the xymon user ability to use bconsole works fine. I am not seeing a backup or bacula section on the xymon server webpage. My guess is that I have to add it somehow to the hosts.cfg file on the server side but this is my first custom script / xymon extension that I had to use so I'm not sure what the syntax should look like for the hosts.cfg. Should I specify the full script name like this ( 155.x.x.101 backup # ssh xymon_bacula_check.sh )? Perhaps there is something else im missing server side that needs to be done like put the custom script in server/ext ? Appreciate the help Thanks, *_ _* */Joseph De Nicolo/*
Hi Joseph, You can run that (or any external script) manually like so: # ~xymon/client/bin/xymoncmd ~xymon/client/ext/xymon_bacula_check.sh and the new column should automatically and immediately appear for your bacula server on your xymon interface. If that works, then I have a couple guesses as to what might be wrong: Is it possible that you cut and pasted that older information on that page into the ~xymon/client/etc/clientlaunch.cfg file on the bacula server? That page was written back when Xymon was in mid process of a complete system name change from hobbit to xymon. For a while, many files and variables had kept their "hobbit" name. So any mention of hobbit in there should probably now be "xymon" assuming your running a relatively recent version of Xymon. Also, the instructions on that page do not mention it, but I am pretty sure that you need to restart the xymon client on the bacula server for it to reread the clientlaunch.cfg file so it can start running that script every 5 mins. I'll verify and then I will update that page. ;) Hope this helps. -- Bill Arlofski Reverse Polarity, LLC
list Bill Arlofski
On 01/10/13 15:06, Joseph De Nicolo wrote:
the xymoncmd did the trick, I have to make sure that I don't have to do that manually every time though.
(bringing this response back to the list) Running it manually like that will run the script once. After (default) of 20 minutes that test will turn purple indicating that your Xymon server has not seen an update for that test in a while. If your bacula test turns purple, you will need to re-investigate your settings on the client. There should be a xymon_bacula_check.log log and a clientlaunch.log on the bacula server in ~xymon/client/logs Check to see if anything obvious shows up in those logs. -- Bill Arlofski Reverse Polarity, LLC
list Joseph de Nicolo
the xymon_bacula_check.sh script will run automatically now. The problem
was like you said, using $HOBBITCLIENTHOME instead of $XYMONCLIENTHOME when
you have to add those lines to the clientlaunch.cfg. I didn't catch it the
first time. I'm seeing the test perfectly fine on my xymon server website
now, even on server reboots.
Now I want to edit the actual bacula_check.sh script to show me more info.
I run multiple types of jobs so I want it to display Full, incremental,
differential, ect...
I believe I need to edit this line when it runs the list jobs command and
greps the data:
data=$(echo "list jobs" | $BCMD | $GREP "^|" | $TAIL -n$NUMJOBS | $SED -e
's/|\ /|/g' \
| $AWK -F"|" "{print \$2 \"\t\" \$3 \"\t\" \$4 \"\t\" \$7 \"\t\" \$8
\"\t\" \$9}" )
I'm just confused about those numbers, but I believe they represent the
column number of the catalog database correct? so to add job type and level
I just add columns 5 and 6 using the same format as you have here in the
script. And then I have to add those columns to the webpage by editing the
JOBHEADER line. This would be the correct way to go about this correct?
▸
On Thu, Jan 10, 2013 at 3:23 PM, Bill Arlofski <user-0b8af203a56e@xymon.invalid>wrote:
On 01/10/13 15:06, Joseph De Nicolo wrote:the xymoncmd did the trick, I have to make sure that I don't have to do that manually every time though.(bringing this response back to the list) Running it manually like that will run the script once. After (default) of 20 minutes that test will turn purple indicating that your Xymon server has not seen an update for that test in a while. If your bacula test turns purple, you will need to re-investigate your settings on the client. There should be a xymon_bacula_check.log log and a clientlaunch.log on the bacula server in ~xymon/client/logs Check to see if anything obvious shows up in those logs. -- Bill Arlofski Reverse Polarity, LLC
-- * *
*Joseph De Nicolo* *Secure Database Administrator • *Center for Complex Network Research <http://www.barabasilab.com>* *Northeastern University*
list Bill Arlofski
▸
On 01/10/13 15:43, Joseph De Nicolo wrote:
the xymon_bacula_check.sh script will run automatically now. The problem was like you said, using $HOBBITCLIENTHOME instead of $XYMONCLIENTHOME when you have to add those lines to the clientlaunch.cfg. I didn't catch it the first time. I'm seeing the test perfectly fine on my xymon server website now, even on server reboots.
Ok, good to know. That was my first thought. Going to have to make an update to that page to identify that issue.
▸
Now I want to edit the actual bacula_check.sh script to show me more info. I run multiple types of jobs so I want it to display Full, incremental, differential, ect...
I had already added the "Level" column a long time ago, but never updated that script on the website. I just uploaded a new one now that includes some minor changes to the one that was there.
▸
I'm just confused about those numbers, but I believe they represent the column number of the catalog database correct? so to add job type and level I just add columns 5 and 6 using the same format as you have here in the script. And then I have to add those columns to the webpage by editing the JOBHEADER line. This would be the correct way to go about this correct?
Yes, that will work. If you d/l the new script, you will see that I added a "Level" column to the JOBHEADER var and column #6 to the data var. I have this script running on 8 Bacula servers and I never bothered adding the Job type (column 5 I think) since 99.99% of the jobs I see are "backup" jobs and didn't think it was important. :) Adding it to your status page should take you 20 seconds now that you have it working. Good luck! -- Bill Arlofski Reverse Polarity, LLC