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
06a567a2
Commit
06a567a2
authored
11 months ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
remove check_sensuplugins
parent
ada16a78
No related branches found
No related tags found
1 merge request
!270
Update docs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_sensuplugins
+0
-78
0 additions, 78 deletions
check_sensuplugins
docs/20_Checks/_index.md
+0
-1
0 additions, 1 deletion
docs/20_Checks/_index.md
with
0 additions
and
79 deletions
check_sensuplugins
deleted
100755 → 0
+
0
−
78
View file @
ada16a78
#!/bin/bash
# ======================================================================
#
# SENSU CHECK FOR VALIDITY OF PLUGIN LINKS
#
# ----------------------------------------------------------------------
#
# ----------------------------------------------------------------------
# 2018-07-17 first lines
# 2022-10-21 v1.1 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# ======================================================================
.
`
dirname
$0
`
/inc_pluginfunctions
tmpfile
=
/tmp/check_sensuplugins.out
# ----------------------------------------------------------------------
# functions to fetch infos by status
# ----------------------------------------------------------------------
function
_getStatus
(){
cat
$tmpfile
|
grep
'^\.\.\.'
|
grep
"
$1
\:
"
}
function
getTotal
(){
_getStatus
'.*'
}
function
getOK
(){
_getStatus
"OK"
}
function
getWarnings
(){
_getStatus
"WARNING"
}
function
getErrors
(){
_getStatus
"ERROR"
}
# ----------------------------------------------------------------------
# MAIN
# ----------------------------------------------------------------------
(
/usr/local/bin/link-sensu-checks.sh
-i
;
/usr/local/bin/link-sensu-checks.sh
-f
)
>
$tmpfile
# --- output of errors and warnings
echo
---
Check sensu plugins
getErrors
getWarnings
# --- show status
typeset
-i
iTOTAL
=
`
getTotal |
wc
-l
`
typeset
-i
iOK
=
`
getOK |
wc
-l
`
typeset
-i
iERRORS
=
`
getErrors |
wc
-l
`
typeset
-i
iWARNINGS
=
`
getWarnings |
wc
-l
`
echo
---
Status:
echo
"total :
$iTOTAL
"
echo
"Errors :
$iERRORS
"
echo
"Warnings:
$iWARNINGS
"
echo
"OK :
$iOK
"
rm
-f
$tmpfile
# --- return with wanted exitcode
if
[
$iERRORS
-gt
0
]
;
then
echo exit
with error.
exit
$EXIT_CRITICAL
fi
if
[
$iWARNINGS
-gt
0
]
;
then
echo exit
with warning
exit
$EXIT_WARNING
fi
echo exit
with OK
exit
$EXIT_OK
# ----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
docs/20_Checks/_index.md
+
0
−
1
View file @
06a567a2
...
...
@@ -47,7 +47,6 @@ There is one include script used by all checks:
*
[
check_rearbackup
](
check_rearbackup.md
)
*
[
check_reboot_required
](
check_reboot_required.md
)
*
[
check_requirements
](
check_requirements.md
)
*
check_sensuplugins
*
check_smartstatus
*
[
check_snmp_data
](
check_snmp_data.md
)
*
check_snmp_printer
...
...
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