Is JS_Warnings job status implemented?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is JS_Warnings job status implemented?

jhankins
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Marcin Haba
Hello,

I would like to share with you my opinion about the jobstatus.

For me the job status 'T' both for jobs completed OK and for jobs
completed OK with warnings is quite OK. Everything depends on question
on which the jobstatus 'T' has to give an answer. I think that the
question here is: "Did all required data is backed up?" Answer: Yes
('T') or No ('E', 'e', 'f'...).

It is the same story as a story about a guy that needed to travel from
city A to city B. The goal in this travel is to come from city A to
city B. Let's imagine that the guy started travel and he had some
problems during travel but at the end he came to city B. Does the guy
achieve what he needed?

The same can be with the job. It doesn't matter how many times
something goes wrong. The important for me is that data is consistent
and everything what I needed is backed up.

In my opinion, adding new 'W' jobstatus will introduce many problems
in applications related to Bacula, like monitor software plugins
(Nagios...), web interfaces (including mine Baculum), scripts written
internally by admins, close source software that uses Bacula, ...etc.

What do you think about it?

Best regards.
Marcin Haba (gani)

On 30 September 2016 at 21:19, Hankins, Jonathan
<[hidden email]> wrote:

> My jobs that complete "OK -- with warnings" with JobErrors > 0 always have
> JobStatus 'T'.
>
> I posted about this in 2012:
> https://www.mail-archive.com/bacula-devel@.../msg07612.html
>
> No replies to that post. It looks like there was a commit in 2013:
> http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e
> that disabled this functionality, because there was code that needed to be
> updated to say (JS_Terminated || JS_Warning). Not sure if this was ever
> done? It looks like the DB gets 'T' stored as well, even though there are
> changelog comments indicating that the DB code has been updated to say
> "JobStatus IN ('T', 'W') where necessary.
>
> The committed code/comment above doesn't seem to be in bacula anymore, and I
> am wondering if JobStatus = 'W' is supposed to be implemented yet?
>
> It would be nice to be able to easily tell from the status command that a
> job had warnings, instead of having to look through the job logs.
>
> Is this something that could be implemented if I was able/willing to track
> down the necessary changes and make a patch?
>
> Thanks,
>
> -Jonathan Hankins
>
>
>
> This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Bacula-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>



--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

jhankins

So, I guess I'm curious about what causes ok with warnings vs. an error status? If I have checkfilechanges = yes, and I get an error that a file changed during backup, that is an ok with warnings status. Did the file actually get backed up, or is it skipped?

If a file gets an err access denied, does that still count as a warning, or is that an error status?

It seems to me that it'd be instructive to know in the console at a glance if there were any warnings. Maybe the output of terminated jobs list could include the JobErrors count? Or an asterisk next to the 'T' indicating warnings, leaving the JobStatus set to 'T' for purposes of custom queries, Nagios integration,  etc.

Speaking of Nagios, that's why I'd asked about it back in 2012. I wanted my Nagios plug-in to return OK when JobStatus = T, WARNING when JobStatus = W, and CRITICAL otherwise. That lead me to discover that JobStatus is never W. I'm not at my office now, but I wonder if JobErrors is exposed in a %variable, and if not, could it be? This would let us detect warnings in Nagios plug-ins, etc. without changing JobStatus.

I need to check if the docs still indicate that W is a possibile JobStatus. If it is gone from the code, the docs need to match.

Thanks,

-Jonathan Hankins


On Fri, Sep 30, 2016, 3:16 PM Marcin Haba <[hidden email]> wrote:
Hello,

I would like to share with you my opinion about the jobstatus.

For me the job status 'T' both for jobs completed OK and for jobs
completed OK with warnings is quite OK. Everything depends on question
on which the jobstatus 'T' has to give an answer. I think that the
question here is: "Did all required data is backed up?" Answer: Yes
('T') or No ('E', 'e', 'f'...).

It is the same story as a story about a guy that needed to travel from
city A to city B. The goal in this travel is to come from city A to
city B. Let's imagine that the guy started travel and he had some
problems during travel but at the end he came to city B. Does the guy
achieve what he needed?

The same can be with the job. It doesn't matter how many times
something goes wrong. The important for me is that data is consistent
and everything what I needed is backed up.

In my opinion, adding new 'W' jobstatus will introduce many problems
in applications related to Bacula, like monitor software plugins
(Nagios...), web interfaces (including mine Baculum), scripts written
internally by admins, close source software that uses Bacula, ...etc.

What do you think about it?

Best regards.
Marcin Haba (gani)

On 30 September 2016 at 21:19, Hankins, Jonathan
<[hidden email]> wrote:
> My jobs that complete "OK -- with warnings" with JobErrors > 0 always have
> JobStatus 'T'.
>
> I posted about this in 2012:
> https://www.mail-archive.com/bacula-devel@.../msg07612.html
>
> No replies to that post. It looks like there was a commit in 2013:
> http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e
> that disabled this functionality, because there was code that needed to be
> updated to say (JS_Terminated || JS_Warning). Not sure if this was ever
> done? It looks like the DB gets 'T' stored as well, even though there are
> changelog comments indicating that the DB code has been updated to say
> "JobStatus IN ('T', 'W') where necessary.
>
> The committed code/comment above doesn't seem to be in bacula anymore, and I
> am wondering if JobStatus = 'W' is supposed to be implemented yet?
>
> It would be nice to be able to easily tell from the status command that a
> job had warnings, instead of having to look through the job logs.
>
> Is this something that could be implemented if I was able/willing to track
> down the necessary changes and make a patch?
>
> Thanks,
>
> -Jonathan Hankins
>
>
>
> This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Bacula-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
>



--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Marcin Haba
Hello Jonathan,

When you add checkfilechanges = yes then you change your question
about jobstatus to question:

Did all required data is backed up AND no file changed during backup?

The "Access denied" means that something is currently impossible to
backup and I think that it is something like "non-backup data". Bacula
informs in job report when some data is impossible to backup.

I understand your problem about Nagios. I tried Nagios long time ago
and I remember that there are three states (info, warning, error). So,
you have 'info' and 'error' but you don't have 'warning'.

In web interfaces that I develop, I solve it by checking joberrors
value from Job table in the Catalog. It is something like:

if (jobstatus == 'T') {
    if (joberrors > 0) {
        jobstatus = 'W';
    }
}
.... use jobstatus.

What do you think about it? Is it OK for you this getting joberrors
value from the Catalog and check it?

Thanks in advance for response.

Best regards.
Marcin Haba (gani)

On 30 September 2016 at 23:00, Hankins, Jonathan
<[hidden email]> wrote:

> So, I guess I'm curious about what causes ok with warnings vs. an error
> status? If I have checkfilechanges = yes, and I get an error that a file
> changed during backup, that is an ok with warnings status. Did the file
> actually get backed up, or is it skipped?
>
> If a file gets an err access denied, does that still count as a warning, or
> is that an error status?
>
> It seems to me that it'd be instructive to know in the console at a glance
> if there were any warnings. Maybe the output of terminated jobs list could
> include the JobErrors count? Or an asterisk next to the 'T' indicating
> warnings, leaving the JobStatus set to 'T' for purposes of custom queries,
> Nagios integration,  etc.
>
> Speaking of Nagios, that's why I'd asked about it back in 2012. I wanted my
> Nagios plug-in to return OK when JobStatus = T, WARNING when JobStatus = W,
> and CRITICAL otherwise. That lead me to discover that JobStatus is never W.
> I'm not at my office now, but I wonder if JobErrors is exposed in a
> %variable, and if not, could it be? This would let us detect warnings in
> Nagios plug-ins, etc. without changing JobStatus.
>
> I need to check if the docs still indicate that W is a possibile JobStatus.
> If it is gone from the code, the docs need to match.
>
> Thanks,
>
> -Jonathan Hankins
>
>
> On Fri, Sep 30, 2016, 3:16 PM Marcin Haba <[hidden email]> wrote:
>>
>> Hello,
>>
>> I would like to share with you my opinion about the jobstatus.
>>
>> For me the job status 'T' both for jobs completed OK and for jobs
>> completed OK with warnings is quite OK. Everything depends on question
>> on which the jobstatus 'T' has to give an answer. I think that the
>> question here is: "Did all required data is backed up?" Answer: Yes
>> ('T') or No ('E', 'e', 'f'...).
>>
>> It is the same story as a story about a guy that needed to travel from
>> city A to city B. The goal in this travel is to come from city A to
>> city B. Let's imagine that the guy started travel and he had some
>> problems during travel but at the end he came to city B. Does the guy
>> achieve what he needed?
>>
>> The same can be with the job. It doesn't matter how many times
>> something goes wrong. The important for me is that data is consistent
>> and everything what I needed is backed up.
>>
>> In my opinion, adding new 'W' jobstatus will introduce many problems
>> in applications related to Bacula, like monitor software plugins
>> (Nagios...), web interfaces (including mine Baculum), scripts written
>> internally by admins, close source software that uses Bacula, ...etc.
>>
>> What do you think about it?
>>
>> Best regards.
>> Marcin Haba (gani)
>>
>> On 30 September 2016 at 21:19, Hankins, Jonathan
>> <[hidden email]> wrote:
>> > My jobs that complete "OK -- with warnings" with JobErrors > 0 always
>> > have
>> > JobStatus 'T'.
>> >
>> > I posted about this in 2012:
>> >
>> > https://www.mail-archive.com/bacula-devel@.../msg07612.html
>> >
>> > No replies to that post. It looks like there was a commit in 2013:
>> >
>> > http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e
>> > that disabled this functionality, because there was code that needed to
>> > be
>> > updated to say (JS_Terminated || JS_Warning). Not sure if this was ever
>> > done? It looks like the DB gets 'T' stored as well, even though there
>> > are
>> > changelog comments indicating that the DB code has been updated to say
>> > "JobStatus IN ('T', 'W') where necessary.
>> >
>> > The committed code/comment above doesn't seem to be in bacula anymore,
>> > and I
>> > am wondering if JobStatus = 'W' is supposed to be implemented yet?
>> >
>> > It would be nice to be able to easily tell from the status command that
>> > a
>> > job had warnings, instead of having to look through the job logs.
>> >
>> > Is this something that could be implemented if I was able/willing to
>> > track
>> > down the necessary changes and make a patch?
>> >
>> > Thanks,
>> >
>> > -Jonathan Hankins
>> >
>> >
>> >
>> >
>> > This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Bacula-devel mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
>> >
>>
>>
>>
>> --
>> "Greater love hath no man than this, that a man lay down his life for
>> his friends." Jesus Christ
>>
>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> za przyjaciół swoich." Jezus Chrystus
>
>
> This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

jhankins
So looking at the code, it looks like the RunScript variable %e will be "OK -- with warnings" if status == JS_Warnings (never happens in current code), or if status == JS_Terminated and errors > 0.

Additionally, there is a %E that contains the number of JobErrors (undocumented in the Job Resource section of latest docs). Either of these can get me what I need as far as my RunScript to update nagios.

I'd still like a way to indicate in the "status director" output that a job was OK -- with warnings. I'm sure I can patch my local copy...maybe just a custom entry in query.sql would suffice. It'd be nice to have a hook in the code that "status director" runs to augment the job list query it runs.

Thanks for getting me looking at the code -- I can fix my nagios RunScript now!

-Jonathan Hankins

On Fri, Sep 30, 2016 at 4:19 PM Marcin Haba <[hidden email]> wrote:
Hello Jonathan,

When you add checkfilechanges = yes then you change your question
about jobstatus to question:

Did all required data is backed up AND no file changed during backup?

The "Access denied" means that something is currently impossible to
backup and I think that it is something like "non-backup data". Bacula
informs in job report when some data is impossible to backup.

I understand your problem about Nagios. I tried Nagios long time ago
and I remember that there are three states (info, warning, error). So,
you have 'info' and 'error' but you don't have 'warning'.

In web interfaces that I develop, I solve it by checking joberrors
value from Job table in the Catalog. It is something like:

if (jobstatus == 'T') {
    if (joberrors > 0) {
        jobstatus = 'W';
    }
}
.... use jobstatus.

What do you think about it? Is it OK for you this getting joberrors
value from the Catalog and check it?

Thanks in advance for response.

Best regards.
Marcin Haba (gani)

On 30 September 2016 at 23:00, Hankins, Jonathan
<[hidden email]> wrote:
> So, I guess I'm curious about what causes ok with warnings vs. an error
> status? If I have checkfilechanges = yes, and I get an error that a file
> changed during backup, that is an ok with warnings status. Did the file
> actually get backed up, or is it skipped?
>
> If a file gets an err access denied, does that still count as a warning, or
> is that an error status?
>
> It seems to me that it'd be instructive to know in the console at a glance
> if there were any warnings. Maybe the output of terminated jobs list could
> include the JobErrors count? Or an asterisk next to the 'T' indicating
> warnings, leaving the JobStatus set to 'T' for purposes of custom queries,
> Nagios integration,  etc.
>
> Speaking of Nagios, that's why I'd asked about it back in 2012. I wanted my
> Nagios plug-in to return OK when JobStatus = T, WARNING when JobStatus = W,
> and CRITICAL otherwise. That lead me to discover that JobStatus is never W.
> I'm not at my office now, but I wonder if JobErrors is exposed in a
> %variable, and if not, could it be? This would let us detect warnings in
> Nagios plug-ins, etc. without changing JobStatus.
>
> I need to check if the docs still indicate that W is a possibile JobStatus.
> If it is gone from the code, the docs need to match.
>
> Thanks,
>
> -Jonathan Hankins
>
>
> On Fri, Sep 30, 2016, 3:16 PM Marcin Haba <[hidden email]> wrote:
>>
>> Hello,
>>
>> I would like to share with you my opinion about the jobstatus.
>>
>> For me the job status 'T' both for jobs completed OK and for jobs
>> completed OK with warnings is quite OK. Everything depends on question
>> on which the jobstatus 'T' has to give an answer. I think that the
>> question here is: "Did all required data is backed up?" Answer: Yes
>> ('T') or No ('E', 'e', 'f'...).
>>
>> It is the same story as a story about a guy that needed to travel from
>> city A to city B. The goal in this travel is to come from city A to
>> city B. Let's imagine that the guy started travel and he had some
>> problems during travel but at the end he came to city B. Does the guy
>> achieve what he needed?
>>
>> The same can be with the job. It doesn't matter how many times
>> something goes wrong. The important for me is that data is consistent
>> and everything what I needed is backed up.
>>
>> In my opinion, adding new 'W' jobstatus will introduce many problems
>> in applications related to Bacula, like monitor software plugins
>> (Nagios...), web interfaces (including mine Baculum), scripts written
>> internally by admins, close source software that uses Bacula, ...etc.
>>
>> What do you think about it?
>>
>> Best regards.
>> Marcin Haba (gani)
>>
>> On 30 September 2016 at 21:19, Hankins, Jonathan
>> <[hidden email]> wrote:
>> > My jobs that complete "OK -- with warnings" with JobErrors > 0 always
>> > have
>> > JobStatus 'T'.
>> >
>> > I posted about this in 2012:
>> >
>> > https://www.mail-archive.com/bacula-devel@.../msg07612.html
>> >
>> > No replies to that post. It looks like there was a commit in 2013:
>> >
>> > http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e
>> > that disabled this functionality, because there was code that needed to
>> > be
>> > updated to say (JS_Terminated || JS_Warning). Not sure if this was ever
>> > done? It looks like the DB gets 'T' stored as well, even though there
>> > are
>> > changelog comments indicating that the DB code has been updated to say
>> > "JobStatus IN ('T', 'W') where necessary.
>> >
>> > The committed code/comment above doesn't seem to be in bacula anymore,
>> > and I
>> > am wondering if JobStatus = 'W' is supposed to be implemented yet?
>> >
>> > It would be nice to be able to easily tell from the status command that
>> > a
>> > job had warnings, instead of having to look through the job logs.
>> >
>> > Is this something that could be implemented if I was able/willing to
>> > track
>> > down the necessary changes and make a patch?
>> >
>> > Thanks,
>> >
>> > -Jonathan Hankins
>> >
>> >
>> >
>> >
>> > This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Bacula-devel mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
>> >
>>
>>
>>
>> --
>> "Greater love hath no man than this, that a man lay down his life for
>> his friends." Jesus Christ
>>
>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> za przyjaciół swoich." Jezus Chrystus
>
>
> This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Marcin Haba
Hello Jonathan,

Wow, great start. Now I see your solution with RunScript in the full context.

It seems to me that this new way of checking job status by %e keyword
is much more flexible than "status director" and it enables to provide
more % parameters if they are required in the future. When in Bacula
something will change in output after some version, you will need to
update only single sure value (for example: "Success" instead of "OK")
instead of changing a parser and  keeping parser working for different
Director versions.

I wish you good programming time :-) I am sure that Bacula and Nagios
users will appreciate your work on it.

Best regards.
Marcin Haba (gani)

On 1 October 2016 at 00:31, Hankins, Jonathan
<[hidden email]> wrote:

> So looking at the code, it looks like the RunScript variable %e will be "OK
> -- with warnings" if status == JS_Warnings (never happens in current code),
> or if status == JS_Terminated and errors > 0.
>
> Additionally, there is a %E that contains the number of JobErrors
> (undocumented in the Job Resource section of latest docs). Either of these
> can get me what I need as far as my RunScript to update nagios.
>
> I'd still like a way to indicate in the "status director" output that a job
> was OK -- with warnings. I'm sure I can patch my local copy...maybe just a
> custom entry in query.sql would suffice. It'd be nice to have a hook in the
> code that "status director" runs to augment the job list query it runs.
>
> Thanks for getting me looking at the code -- I can fix my nagios RunScript
> now!
>
> -Jonathan Hankins
>
> On Fri, Sep 30, 2016 at 4:19 PM Marcin Haba <[hidden email]> wrote:
>>
>> Hello Jonathan,
>>
>> When you add checkfilechanges = yes then you change your question
>> about jobstatus to question:
>>
>> Did all required data is backed up AND no file changed during backup?
>>
>> The "Access denied" means that something is currently impossible to
>> backup and I think that it is something like "non-backup data". Bacula
>> informs in job report when some data is impossible to backup.
>>
>> I understand your problem about Nagios. I tried Nagios long time ago
>> and I remember that there are three states (info, warning, error). So,
>> you have 'info' and 'error' but you don't have 'warning'.
>>
>> In web interfaces that I develop, I solve it by checking joberrors
>> value from Job table in the Catalog. It is something like:
>>
>> if (jobstatus == 'T') {
>>     if (joberrors > 0) {
>>         jobstatus = 'W';
>>     }
>> }
>> .... use jobstatus.
>>
>> What do you think about it? Is it OK for you this getting joberrors
>> value from the Catalog and check it?
>>
>> Thanks in advance for response.
>>
>> Best regards.
>> Marcin Haba (gani)
>>
>> On 30 September 2016 at 23:00, Hankins, Jonathan
>> <[hidden email]> wrote:
>> > So, I guess I'm curious about what causes ok with warnings vs. an error
>> > status? If I have checkfilechanges = yes, and I get an error that a file
>> > changed during backup, that is an ok with warnings status. Did the file
>> > actually get backed up, or is it skipped?
>> >
>> > If a file gets an err access denied, does that still count as a warning,
>> > or
>> > is that an error status?
>> >
>> > It seems to me that it'd be instructive to know in the console at a
>> > glance
>> > if there were any warnings. Maybe the output of terminated jobs list
>> > could
>> > include the JobErrors count? Or an asterisk next to the 'T' indicating
>> > warnings, leaving the JobStatus set to 'T' for purposes of custom
>> > queries,
>> > Nagios integration,  etc.
>> >
>> > Speaking of Nagios, that's why I'd asked about it back in 2012. I wanted
>> > my
>> > Nagios plug-in to return OK when JobStatus = T, WARNING when JobStatus =
>> > W,
>> > and CRITICAL otherwise. That lead me to discover that JobStatus is never
>> > W.
>> > I'm not at my office now, but I wonder if JobErrors is exposed in a
>> > %variable, and if not, could it be? This would let us detect warnings in
>> > Nagios plug-ins, etc. without changing JobStatus.
>> >
>> > I need to check if the docs still indicate that W is a possibile
>> > JobStatus.
>> > If it is gone from the code, the docs need to match.
>> >
>> > Thanks,
>> >
>> > -Jonathan Hankins
>> >
>> >
>> > On Fri, Sep 30, 2016, 3:16 PM Marcin Haba <[hidden email]> wrote:
>> >>
>> >> Hello,
>> >>
>> >> I would like to share with you my opinion about the jobstatus.
>> >>
>> >> For me the job status 'T' both for jobs completed OK and for jobs
>> >> completed OK with warnings is quite OK. Everything depends on question
>> >> on which the jobstatus 'T' has to give an answer. I think that the
>> >> question here is: "Did all required data is backed up?" Answer: Yes
>> >> ('T') or No ('E', 'e', 'f'...).
>> >>
>> >> It is the same story as a story about a guy that needed to travel from
>> >> city A to city B. The goal in this travel is to come from city A to
>> >> city B. Let's imagine that the guy started travel and he had some
>> >> problems during travel but at the end he came to city B. Does the guy
>> >> achieve what he needed?
>> >>
>> >> The same can be with the job. It doesn't matter how many times
>> >> something goes wrong. The important for me is that data is consistent
>> >> and everything what I needed is backed up.
>> >>
>> >> In my opinion, adding new 'W' jobstatus will introduce many problems
>> >> in applications related to Bacula, like monitor software plugins
>> >> (Nagios...), web interfaces (including mine Baculum), scripts written
>> >> internally by admins, close source software that uses Bacula, ...etc.
>> >>
>> >> What do you think about it?
>> >>
>> >> Best regards.
>> >> Marcin Haba (gani)
>> >>
>> >> On 30 September 2016 at 21:19, Hankins, Jonathan
>> >> <[hidden email]> wrote:
>> >> > My jobs that complete "OK -- with warnings" with JobErrors > 0 always
>> >> > have
>> >> > JobStatus 'T'.
>> >> >
>> >> > I posted about this in 2012:
>> >> >
>> >> >
>> >> > https://www.mail-archive.com/bacula-devel@.../msg07612.html
>> >> >
>> >> > No replies to that post. It looks like there was a commit in 2013:
>> >> >
>> >> >
>> >> > http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e
>> >> > that disabled this functionality, because there was code that needed
>> >> > to
>> >> > be
>> >> > updated to say (JS_Terminated || JS_Warning). Not sure if this was
>> >> > ever
>> >> > done? It looks like the DB gets 'T' stored as well, even though there
>> >> > are
>> >> > changelog comments indicating that the DB code has been updated to
>> >> > say
>> >> > "JobStatus IN ('T', 'W') where necessary.
>> >> >
>> >> > The committed code/comment above doesn't seem to be in bacula
>> >> > anymore,
>> >> > and I
>> >> > am wondering if JobStatus = 'W' is supposed to be implemented yet?
>> >> >
>> >> > It would be nice to be able to easily tell from the status command
>> >> > that
>> >> > a
>> >> > job had warnings, instead of having to look through the job logs.
>> >> >
>> >> > Is this something that could be implemented if I was able/willing to
>> >> > track
>> >> > down the necessary changes and make a patch?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > -Jonathan Hankins
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Check out the vibrant tech community on one of the world's most
>> >> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> >> > _______________________________________________
>> >> > Bacula-devel mailing list
>> >> > [hidden email]
>> >> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> "Greater love hath no man than this, that a man lay down his life for
>> >> his friends." Jesus Christ
>> >>
>> >> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> >> za przyjaciół swoich." Jezus Chrystus
>> >
>> >
>> >
>> > This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
>>
>>
>>
>> --
>> "Greater love hath no man than this, that a man lay down his life for
>> his friends." Jesus Christ
>>
>> "Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
>> za przyjaciół swoich." Jezus Chrystus
>
>
> This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



--
"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Kern Sibbald
In reply to this post by jhankins
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern

On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

jhankins

And I think that I confused myself. I'll check, but I think I saw that the director code for show dir does print ok with warnings,  and not just ok, on jobs with warnings (by looking at JobErrors). I was confusing that output with list jobs, which shows JobStatus, and thus indicates T even on jobs with warnings. It may be that it also shows a column for JobErrors...my brain was just expecting to see a W. I've read through the code enough to understand the issues and expected behavior now. I will do a patch to add %E to the documentation when I get a minute. That gives me what I need as far as Nagios runscripts.

I agree, suddenly having W where there hasn't been one before in the db might break people's Custom scripts and queries. It looks like bacula has been adapted for it everywhere that I looked though.

Thanks,

-Jonathan Hankins


On Sat, Oct 1, 2016, 7:07 AM Kern Sibbald <[hidden email]> wrote:
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern


On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

jhankins

Kern, what are your thoughts about, in an effort to phase in W job status without breaking people's stuff, a per-fileset/job/client/whatever directive such as WarnOnError, default = no, and some logic in the JobStatus code to write W to the database/wherever it needs to go, in cases where the user has explicitly asked for it, and T otherwise? I can imagine use cases where errors on one fileset don't matter but on others, you'd like it reflected in the db.

-Jonathan Hankins


On Sat, Oct 1, 2016, 11:10 AM Hankins, Jonathan <[hidden email]> wrote:

And I think that I confused myself. I'll check, but I think I saw that the director code for show dir does print ok with warnings,  and not just ok, on jobs with warnings (by looking at JobErrors). I was confusing that output with list jobs, which shows JobStatus, and thus indicates T even on jobs with warnings. It may be that it also shows a column for JobErrors...my brain was just expecting to see a W. I've read through the code enough to understand the issues and expected behavior now. I will do a patch to add %E to the documentation when I get a minute. That gives me what I need as far as Nagios runscripts.

I agree, suddenly having W where there hasn't been one before in the db might break people's Custom scripts and queries. It looks like bacula has been adapted for it everywhere that I looked though.

Thanks,

-Jonathan Hankins


On Sat, Oct 1, 2016, 7:07 AM Kern Sibbald <[hidden email]> wrote:
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern


On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Kern Sibbald
Jonathan,

That might be a good "compromise".  The only thing that doesn't appeal to me is adding yet another directive.  I have been trying hard to avoid adding new directives since Bacula now has so many directives, I am starting to forget what does what :-(.

If someone sent me a patch, I think I would apply it.  However, Bacula already warns on errors -- they generate an error message.  We should think about it a bit, but a better choice for the directive name, might be AllowWarningStatus ...  or maybe you have a better idea such as just "WarningStatus = yes/no".   I might even be inclined to make it default yes if all the regression scripts run with it on (very unlikely I think).

Best regards,
Kern

On 10/01/2016 06:32 PM, Hankins, Jonathan wrote:

Kern, what are your thoughts about, in an effort to phase in W job status without breaking people's stuff, a per-fileset/job/client/whatever directive such as WarnOnError, default = no, and some logic in the JobStatus code to write W to the database/wherever it needs to go, in cases where the user has explicitly asked for it, and T otherwise? I can imagine use cases where errors on one fileset don't matter but on others, you'd like it reflected in the db.

-Jonathan Hankins


On Sat, Oct 1, 2016, 11:10 AM Hankins, Jonathan <[hidden email]> wrote:

And I think that I confused myself. I'll check, but I think I saw that the director code for show dir does print ok with warnings,  and not just ok, on jobs with warnings (by looking at JobErrors). I was confusing that output with list jobs, which shows JobStatus, and thus indicates T even on jobs with warnings. It may be that it also shows a column for JobErrors...my brain was just expecting to see a W. I've read through the code enough to understand the issues and expected behavior now. I will do a patch to add %E to the documentation when I get a minute. That gives me what I need as far as Nagios runscripts.

I agree, suddenly having W where there hasn't been one before in the db might break people's Custom scripts and queries. It looks like bacula has been adapted for it everywhere that I looked though.

Thanks,

-Jonathan Hankins


On Sat, Oct 1, 2016, 7:07 AM Kern Sibbald <[hidden email]> wrote:
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern


On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

jhankins
I may poke around it a bit when I have time. I'm not a C programmer, but the code is pretty clear from what I've seen. If I can get something working, I'll send a patch.

Thanks! 

-Jonathan Hankins 

On Sat, Oct 1, 2016, 1:43 PM Kern Sibbald <[hidden email]> wrote:
Jonathan,

That might be a good "compromise".  The only thing that doesn't appeal to me is adding yet another directive.  I have been trying hard to avoid adding new directives since Bacula now has so many directives, I am starting to forget what does what :-(.

If someone sent me a patch, I think I would apply it.  However, Bacula already warns on errors -- they generate an error message.  We should think about it a bit, but a better choice for the directive name, might be AllowWarningStatus ...  or maybe you have a better idea such as just "WarningStatus = yes/no".   I might even be inclined to make it default yes if all the regression scripts run with it on (very unlikely I think).

Best regards,
Kern


On 10/01/2016 06:32 PM, Hankins, Jonathan wrote:

Kern, what are your thoughts about, in an effort to phase in W job status without breaking people's stuff, a per-fileset/job/client/whatever directive such as WarnOnError, default = no, and some logic in the JobStatus code to write W to the database/wherever it needs to go, in cases where the user has explicitly asked for it, and T otherwise? I can imagine use cases where errors on one fileset don't matter but on others, you'd like it reflected in the db.

-Jonathan Hankins


On Sat, Oct 1, 2016, 11:10 AM Hankins, Jonathan <[hidden email]> wrote:

And I think that I confused myself. I'll check, but I think I saw that the director code for show dir does print ok with warnings,  and not just ok, on jobs with warnings (by looking at JobErrors). I was confusing that output with list jobs, which shows JobStatus, and thus indicates T even on jobs with warnings. It may be that it also shows a column for JobErrors...my brain was just expecting to see a W. I've read through the code enough to understand the issues and expected behavior now. I will do a patch to add %E to the documentation when I get a minute. That gives me what I need as far as Nagios runscripts.

I agree, suddenly having W where there hasn't been one before in the db might break people's Custom scripts and queries. It looks like bacula has been adapted for it everywhere that I looked though.

Thanks,

-Jonathan Hankins


On Sat, Oct 1, 2016, 7:07 AM Kern Sibbald <[hidden email]> wrote:
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern


On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is JS_Warnings job status implemented?

Kern Sibbald
On 10/01/2016 08:52 PM, Hankins, Jonathan wrote:
I may poke around it a bit when I have time. I'm not a C programmer, but the code is pretty clear from what I've seen. If I can get something working, I'll send a patch.

If you implement a patch, please submit it in a "feature request" in the bugs database.  If you do not, you might want to submit a feature request without a patch because maybe in 10 years, I won't have any more projects :-)  (just kidding) maybe someday, I will just feel like doing a few small projects :-)

Best regards,
Kern


Thanks! 

-Jonathan Hankins 

On Sat, Oct 1, 2016, 1:43 PM Kern Sibbald <[hidden email]> wrote:
Jonathan,

That might be a good "compromise".  The only thing that doesn't appeal to me is adding yet another directive.  I have been trying hard to avoid adding new directives since Bacula now has so many directives, I am starting to forget what does what :-(.

If someone sent me a patch, I think I would apply it.  However, Bacula already warns on errors -- they generate an error message.  We should think about it a bit, but a better choice for the directive name, might be AllowWarningStatus ...  or maybe you have a better idea such as just "WarningStatus = yes/no".   I might even be inclined to make it default yes if all the regression scripts run with it on (very unlikely I think).

Best regards,
Kern


On 10/01/2016 06:32 PM, Hankins, Jonathan wrote:

Kern, what are your thoughts about, in an effort to phase in W job status without breaking people's stuff, a per-fileset/job/client/whatever directive such as WarnOnError, default = no, and some logic in the JobStatus code to write W to the database/wherever it needs to go, in cases where the user has explicitly asked for it, and T otherwise? I can imagine use cases where errors on one fileset don't matter but on others, you'd like it reflected in the db.

-Jonathan Hankins


On Sat, Oct 1, 2016, 11:10 AM Hankins, Jonathan <[hidden email]> wrote:

And I think that I confused myself. I'll check, but I think I saw that the director code for show dir does print ok with warnings,  and not just ok, on jobs with warnings (by looking at JobErrors). I was confusing that output with list jobs, which shows JobStatus, and thus indicates T even on jobs with warnings. It may be that it also shows a column for JobErrors...my brain was just expecting to see a W. I've read through the code enough to understand the issues and expected behavior now. I will do a patch to add %E to the documentation when I get a minute. That gives me what I need as far as Nagios runscripts.

I agree, suddenly having W where there hasn't been one before in the db might break people's Custom scripts and queries. It looks like bacula has been adapted for it everywhere that I looked though.

Thanks,

-Jonathan Hankins


On Sat, Oct 1, 2016, 7:07 AM Kern Sibbald <[hidden email]> wrote:
I have planned a JobStatus == 'W' for quite some time, but I am very concerned that implementing it will break many existing environments, scripts/programs that look at the output.  Consequently, it remains suspended.

Best regards,
Kern


On 09/30/2016 09:19 PM, Hankins, Jonathan wrote:
My jobs that complete "OK -- with warnings" with JobErrors > 0 always have JobStatus 'T'.

I posted about this in 2012: https://www.mail-archive.com/bacula-devel@.../msg07612.html

No replies to that post. It looks like there was a commit in 2013: http://www.bacula.org/git/cgit.cgi/bacula/commit/?id=36b7c10b7fc787ab7b075f0b2521f7b20605ae6e that disabled this functionality, because there was code that needed to be updated to say (JS_Terminated || JS_Warning). Not sure if this was ever done? It looks like the DB gets 'T' stored as well, even though there are changelog comments indicating that the DB code has been updated to say "JobStatus IN ('T', 'W') where necessary.

The committed code/comment above doesn't seem to be in bacula anymore, and I am wondering if JobStatus = 'W' is supposed to be implemented yet?

It would be nice to be able to easily tell from the status command that a job had warnings, instead of having to look through the job logs.

Is this something that could be implemented if I was able/willing to track down the necessary changes and make a patch?

Thanks,

-Jonathan Hankins



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments is prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bacula-devel
Loading...