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
ba964f31
Commit
ba964f31
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
onevm: update help; show help without requirements
parent
19921ad1
No related branches found
No related tags found
1 merge request
!137
6468 docs and harmonize
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_onevm
+8
-15
8 additions, 15 deletions
check_onevm
with
8 additions
and
15 deletions
check_onevm
+
8
−
15
View file @
ba964f31
...
...
@@ -33,14 +33,14 @@
# STAT:done:Done:The VM is done. VMs in this state won’t be shown with onevm list but are kept in the database for accounting purposes. You can still get their information with the onevm show command.
# ----------------------------------------------------------------------
# 2023-06-12 v1.0 <axel.hahn@unibe.ch> initial version
# 2023-06-15 v1.0 <axel.hahn@unibe.ch> fix output if no vm is running
# 2023-06-15 v1.1 <axel.hahn@unibe.ch> fix output if no vm is running
# 2023-08-23 v1.2 <axel.hahn@unibe.ch> update help; show help without requirements
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPVERSION
=
1.1
self_APPVERSION
=
1.2
# new line
NL
=
"
...
...
@@ -53,21 +53,14 @@ showData=0
# ----------------------------------------------------------------------
function
showHelp
(){
local
_self
;
_self
=
$(
basename
$0
)
cat
<<
EOF
______________________________________________________________________
$self_APPNAME
v
$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
$(
ph.showImlHelpHeader
)
Show count of vms in OpenNebula - listed by state and by host.
It will go to warning if a non running state was found.
It will go to critical if a vm is on failure.
SYNTAX:
$(
basename
$0
)
...
...
@@ -88,9 +81,6 @@ function _add(){
# MAIN
# ----------------------------------------------------------------------
# --- check required tools
ph.require onehost
# --- check param -h
case
"
$1
"
in
"--help"
|
"-h"
)
...
...
@@ -100,6 +90,9 @@ case "$1" in
*
)
esac
# --- check required tools
ph.require onehost
# --- get data
cmdout
=
$(
sudo
onevm list
--csv
2>&1
)
...
...
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