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
Merge requests
!202
about: added to show disks
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
about: added to show disks
6745-extend-unit-check
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
6745-extend-unit-check
into
master
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
7dc5d2b9
1 commit,
1 year ago
1 file
+
33
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
about
+
33
−
6
View file @ 7dc5d2b9
Edit in single-file editor
Open in Web IDE
Show full file
@@ -5,13 +5,19 @@
# ABOUT
#
# ----------------------------------------------------------------------
# 2020-10-23 v1.0 <axel.hahn@iml.unibe.ch>
# 2020-10-23 v1.0 <axel.hahn@iml.unibe.ch> initial version
# 2020-10-25 v1.1 <axel.hahn@iml.unibe.ch> show disks, show installed versions (WIP)
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
.
/etc/icingaclient/client.cfg 2>/dev/null
# show versions of these tools.
# number 2 or 3 stands for position of version in the output
# tools2="curl restic php python"
# tools3="rsync"
# ----------------------------------------------------------------------
# FUNCTIONS
# ----------------------------------------------------------------------
@@ -42,12 +48,19 @@ echo
_section
"CPU:
$_iCpu
"
echo
"
${
_sCpuModel
}
"
echo
echo
_section
"Memory"
echo
"RAM total
${
_sMem
}
"
echo
"Swap
${
_sSwap
}
"
echo
_section
"Disks"
out
=
$(
df
-h
)
echo
"
$out
"
|
head
-1
for
mydev
in
$(
echo
"
$out
"
|
grep
"^/"
|
cut
-f
1
-d
" "
|
sort
-u
)
do
echo
"
$out
"
|
grep
"^
$mydev
"
|
head
-1
done
echo
if
[
-d
"
${
dir_checks
}
"
]
;
then
@@ -56,12 +69,26 @@ if [ -d "${dir_checks}" ]; then
ls
-1
Service-
*
|
cut
-f
2-
-d
"-"
cd
-
>
/dev/null 2>&1
echo
echo
fi
# _section "Disk"
# df -h
# echo
# hmmmm - too complicated...
# _section "Tools"
# (
# for mytool in $tools2
# do
# (
# $mytool --version 2>/dev/null \
# || $mytool version 2>/dev/null
# ) | head -1 | awk '{ print $1 " " $2 }'
# done
# for mytool in $tools3
# do
# (
# $mytool --version 2>/dev/null \
# || $mytool version 2>/dev/null
# ) | head -1 | awk '{ print $1 " " $3 }'
# done
# ) | sort
# echo
# _section "network"
Loading