Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-passive-client
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
Open Source
icinga-passive-client
Commits
2c443984
Commit
2c443984
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
move codeblock to check pipes
parent
248ec8ac
No related branches found
No related tags found
1 merge request
!13
move codeblock to check pipes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
icinga-cli.sh
+7
-6
7 additions, 6 deletions
icinga-cli.sh
with
7 additions
and
6 deletions
icinga-cli.sh
+
7
−
6
View file @
2c443984
...
@@ -352,6 +352,13 @@ function processCheck(){
...
@@ -352,6 +352,13 @@ function processCheck(){
_elog
"
${
_logPrefix
}
$(
ls
-ld
${
dir_data
}
$_outfile
)
"
_elog
"
${
_logPrefix
}
$(
ls
-ld
${
dir_data
}
$_outfile
)
"
exit
1
exit
1
fi
fi
typeset
-i
local
iTsEnd
=
`
date
+%s
`
# outPerfdata=`grep '|' $_outfile | cut -f 2 -d '|'`
outPerfdata
=
`
grep
'|'
$_outfile
| rev |
cut
-f
1
-d
'|'
| rev
`
_echo
_echo
--------
check output:
_echo
$(
cat
"
$_outfile
"
)
iPipes
=
$(
sed
's#[^|]##g'
"
$_outfile
"
|
grep
"."
|
wc
-L
)
iPipes
=
$(
sed
's#[^|]##g'
"
$_outfile
"
|
grep
"."
|
wc
-L
)
_echo
"Pipe chars:
$iPipes
"
_echo
"Pipe chars:
$iPipes
"
if
[[
$iPipes
-gt
1
]]
;
then
if
[[
$iPipes
-gt
1
]]
;
then
...
@@ -359,12 +366,6 @@ function processCheck(){
...
@@ -359,12 +366,6 @@ function processCheck(){
exit
1
exit
1
fi
fi
typeset
-i
local
iTsEnd
=
`
date
+%s
`
# outPerfdata=`grep '|' $_outfile | cut -f 2 -d '|'`
outPerfdata
=
`
grep
'|'
$_outfile
| rev |
cut
-f
1
-d
'|'
| rev
`
_echo
_echo
--------
check output:
_echo
$(
cat
"
$_outfile
"
)
_echo
_echo
# echo -------- extracted performance data:
# echo -------- extracted performance data:
# echo $outPerfdata
# echo $outPerfdata
...
...
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