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
!137
6468 docs and harmonize
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
6468 docs and harmonize
6468-docs-and-harmonize
into
master
Overview
0
Commits
4
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
6468-docs-and-harmonize
into
master
1 year ago
Overview
0
Commits
4
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
ba964f31
Prev
Next
Show latest version
1 file
+
8
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ba964f31
onevm: update help; show help without requirements
· ba964f31
Hahn Axel (hahn)
authored
1 year ago
check_onevm
+
8
−
15
View file @ ba964f31
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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
)
Loading