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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
98ebad01
Commit
98ebad01
authored
2 weeks ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
set status in dependency of "(healthy)" in status
parent
fbd45da4
No related branches found
No related tags found
1 merge request
!309
set status in dependency of "(healthy)" in status
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_docker_info
+8
-3
8 additions, 3 deletions
check_docker_info
with
8 additions
and
3 deletions
check_docker_info
+
8
−
3
View file @
98ebad01
...
...
@@ -173,10 +173,8 @@ sStatus+=") .. "
sStatus+
=
"containers:
$iCTotal
running:
$iCRunning
paused:
$iCPaused
stopped:
$iCStopped
.. "
sStatus+
=
"images:
$iImages
"
ph.status
"
$sStatus
"
echo
"
$out
"
if
[
$bOptContainers
-eq
1
]
&&
[
"
$iCTotal
"
-gt
"0"
]
;
then
out+
=
"
$(
echo
echo
"Containers:"
# containers=$( sudo -n --preserve-env docker ps --all --format '{"Names": "{{.Names}}", "State": "{{.State}}", "Status": "{{.Status}}" }' 2>/dev/null )
...
...
@@ -199,9 +197,16 @@ if [ $bOptContainers -eq 1 ] && [ "$iCTotal" -gt "0" ]; then
done
echo
)
"
fi
if
grep
-q
"^??"
<<<
"
$out
"
;
then
ph.setStatus critical
fi
ph.status
"
$sStatus
"
echo
"
$out
"
# if -d was given then show debug infos too
test
$bOptDebug
-eq
1
&&
(
echo
;
echo
"DEBUG: full docker system infos as json"
;
echo
"
$data
"
| jq
;
_debugInfos
)
...
...
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