I'm running bacula to backup some clients to a disk pool, and that pool
was running out of space. So, what client took up all that space?
Here's the very simple script importing the data into ganglia:
---------------------------------------------------------------
#!/bin/sh
sqlite3 -noheader -separator ' ' /var/lib/bacula/bacula.db \
"select Client.Name, round(sum(JobBytes)/(1024*1024*1024.0),2)
from Client join Job
where Client.ClientId = Job.ClientId group by Client.ClientId;"
|
while read client jobbytes; do
gmetric --group=bacula --name="bacula-client-$client" --value=$jobbytes \
--units=GB --desc="saved data for $client" --type=float \
--title="saved data for $client"
done
exit
---------------------------------------------------------------
I'm using sqlite as my bacula database, but that should be simple to
change to another database. May the script be useful to someone else.
Comments are welcome.
Jochen
--
The only problem with troubleshooting is that the trouble shoots back.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers