Thanks. The SQL is what I needed, I already have scripts which are querying the database for other info.
JBB On 6/11/2013 5:26 PM, Marcin Haba wrote: > Dnia 2013-06-11, wto o godzinie 16:27 -0400, Jonathan Bayer pisze: >> I would like to be able to monitor the number of running jobs with our >> monitoring system (Zabbix). To do this I need a script which will >> return the number without any additional text. >> >> Is this available anywhere? I don't see an easy way to do this. > Hi, > > >From what level want you get information about running jobs? (bconsole, > database). > > I think that there is easy way to do this from database level. You may > run below SQL query: > > SELECT COUNT(job.name) FROM job WHERE job.jobstatus IN ('C','R'); > > Above SQL query may be called from bconsole level as well. For example > by using "sql" bconsole command. It allows to call SQL queries from > bconsole level but then you will need to use additional tools for > strings operations (sed, awk, etc.). > > For writing script purpose here you are examples usage bconsole requests > in shell scripts: > > http://bacula.org/5.2.x-manuals/en/console/console/Bacula_Console.html#SECTION00280000000000000000 > > Regards. > Marcin Haba (gani) > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users