Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
mowgli opened this issue Sep 23, 2024 · 5 comments
Open
1 task done

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

mowgli opened this issue Sep 23, 2024 · 5 comments
Assignees
Labels
Milestone

Comments

@mowgli
Copy link

mowgli commented Sep 23, 2024

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

  • Yes, I've searched similar issues on GitHub and didn't find any.

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

@mowgli mowgli added bug needs-triage Needs to be triaged labels Sep 23, 2024
@martialblog
Copy link
Member

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.

@martialblog martialblog self-assigned this Sep 23, 2024
@martialblog martialblog removed the needs-triage Needs to be triaged label Sep 23, 2024
@mowgli
Copy link
Author

mowgli commented Sep 23, 2024

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

@martialblog
Copy link
Member

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

@martialblog
Copy link
Member

Ok upon closer look the query looks alright and seems to work with Bareos 23.0.4.

I extended the output of the plugin so that it is clearer what is happening. As mentioned in the issue, I think the the -st parameter is what you need.

@martialblog martialblog added question and removed bug labels Oct 10, 2024
@martialblog
Copy link
Member

PR #41 has improved the output and should make things clearer in the future.

Waiting for user feedback. Otherwise we close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants