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
7dc5d2b9
Commit
7dc5d2b9
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
about: added to show disks
parent
ba584320
No related branches found
No related tags found
1 merge request
!202
about: added to show disks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
about
+33
-6
33 additions, 6 deletions
about
with
33 additions
and
6 deletions
about
+
33
−
6
View file @
7dc5d2b9
...
...
@@ -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"
...
...
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