Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
5f2e363f
Commit
5f2e363f
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
fix output of error counter
parent
81e25c44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_cronstatus
+3
-2
3 additions, 2 deletions
check_cronstatus
with
3 additions
and
2 deletions
check_cronstatus
+
3
−
2
View file @
5f2e363f
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line
# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line
# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs
# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs
# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter
# ======================================================================
# ======================================================================
...
@@ -143,7 +144,7 @@ do
...
@@ -143,7 +144,7 @@ do
if
[
$iErr
-gt
0
]
;
then
if
[
$iErr
-gt
0
]
;
then
echo
"
${
sPre
}
CHECK FAILED"
echo
"
${
sPre
}
CHECK FAILED"
iErrJobs
=
$iErrJobs
+1
iErrJobs
=
$iErrJobs
+1
echo
$iErrJobs
>
$errfile
echo
"
$logfile
"
>
$errfile
getLogValue SCRIPTLABEL
>>
$failfile
getLogValue SCRIPTLABEL
>>
$failfile
fi
fi
)>>
$sTmpOutfile
)>>
$sTmpOutfile
...
@@ -156,7 +157,7 @@ done
...
@@ -156,7 +157,7 @@ done
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
if
[
-f
$errfile
]
;
then
if
[
-f
$errfile
]
;
then
iErrJobs
=
`
cat
$errfile
`
iErrJobs
=
$(
wc
-l
$errfile
)
echo
"ERROR:
$iErrJobs
of
$iJobs
jobs [
`
cat
$failfile
|
sed
':a;N;$!ba;s/\n/, /g'
`
] have a problem"
echo
"ERROR:
$iErrJobs
of
$iJobs
jobs [
`
cat
$failfile
|
sed
':a;N;$!ba;s/\n/, /g'
`
] have a problem"
echo
echo
echo
"********** Jobs with problems:"
echo
"********** Jobs with problems:"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment