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
dc905296
Commit
dc905296
authored
1 month ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
hello: add help and markdown doc
parent
267283ed
No related branches found
No related tags found
1 merge request
!300
harden source of files; quote basename and dirname
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/20_Checks/_index.md
+1
-1
1 addition, 1 deletion
docs/20_Checks/_index.md
docs/20_Checks/hello.md
+63
-0
63 additions, 0 deletions
docs/20_Checks/hello.md
hello
+42
-1
42 additions, 1 deletion
hello
with
106 additions
and
2 deletions
docs/20_Checks/_index.md
+
1
−
1
View file @
dc905296
...
...
@@ -53,4 +53,4 @@
*
[
check_systemdunit
](
check_systemdunit.md
)
*
[
check_timesync
](
check_timesync.md
)
*
[
check_uptime
](
check_uptime.md
)
*
hello
*
[
hello
](
hello.md
)
This diff is collapsed.
Click to expand it.
docs/20_Checks/hello.md
0 → 100644
+
63
−
0
View file @
dc905296
## Hello
Script:
`hello`
It prints a hello message to signal that a non reachable host is alive.
Use it for passive checks in private networks that can't be reached from an Icinga sattelite.
## Requirements
Nothing special.
## Standalone installation
From this repository ypu need next to this script:
*
`inc_pluginfunctions`
shared function for all IML checks written in bash
## Syntax
Start the script with
`-h`
or
`--help`
to get the help.
```
txt
______________________________________________________________________
HELLO
v1.1
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/hello.html
______________________________________________________________________
Print a hello message to signal that a non reachable host is alive.
Use it for passive checks in private networks that can't be reached from an
Icinga sattelite.
SYNTAX:
hello [-h]
OPTIONS:
-h or --help show this help.
PARAMETERS:
None.
```
## Examples
No parameter is needed.
`./hello`
returns
```
txt
OK: Here I am!
Thu Feb 20 09:11:55 CET 2025
```
This diff is collapsed.
Click to expand it.
hello
+
42
−
1
View file @
dc905296
...
...
@@ -9,10 +9,51 @@
#
# ----------------------------------------------------------------------
# 2021-06-04 v1.0 <axel.hahn@iml.unibe.ch> hello :-)
# 2025-02-20 v1.1 <axel.hahn@unibe.ch> add help
# ======================================================================
.
`
dirname
$0
`
/inc_pluginfunctions
.
"
$(
dirname
"
$0
"
)
/inc_pluginfunctions"
self_APPVERSION
=
1.1
# show help text
function
showHelp
(){
local
_self
;
_self
=
$(
basename
$0
)
cat
<<
EOF
$(
ph.showImlHelpHeader
)
Print a hello message to signal that a non reachable host is alive.
Use it for passive checks in private networks that can't be reached from an
Icinga sattelite.
SYNTAX:
$_self
[-h]
OPTIONS:
-h or --help show this help.
PARAMETERS:
None.
EOF
}
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
showHelp
exit
0
;
fi
if
[
-n
"
$*
"
]
;
then
echo
"ERROR: no parameter expected."
exit
1
fi
ph.status
"Here I am!"
date
ph.exit
# ----------------------------------------------------------------------
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