NETWAYS / check_bareos

Icinga Plugin to check Bareos Backup Director databases
https://www.netways.de/
GNU General Public License v3.0
8 stars 7 forks source link

[Bug]: runtimejobs does not detect long running jobs #40

Open mowgli opened 2 weeks ago

mowgli commented 2 weeks ago

Please try to fill out as much of the information below as you can. Thank you!

Which version contains the bug?

2.1.0

Describe the bug

> /usr/local/lib/nagios/plugins/check_bareos -U bareos --password-file /etc/bareos/db-password job --runTimeJobs -t 2 -w 1 -c 3
[OK] - 0.0 Jobs are running longer than 2 days|bareos.job.count=0.0;1;3;;

However, I currently have one job that is running for more than 3 days. (Started 20.9. 9:41)

How to recreate the bug?

No response

martialblog commented 2 weeks ago

Hi,

just to clarify, the default jobs that are checked are 'C': 'Job created but not yet running'. Maybe the jobs are in a different state? You can set the state with the -st parameter

Maybe we should add the states to the output to avoid confusion.

mowgli commented 2 weeks ago

Yes, that would be helpful. "running" means, well, running for me and not waiting.

martialblog commented 2 weeks ago

I'll try to improve the output.

But I think you also came across a bug. Just had a look at the code and there could be an issue with the SQL query.

Thanks for reporting the issue