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
!146
update doc page for ph.* functions
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
update doc page for ph.* functions
6468-docs-and-harmonize
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Merged
update doc page for ph.* functions
Hahn Axel (hahn)
requested to merge
6468-docs-and-harmonize
into
master
Aug 25, 2023
Overview
0
Commits
2
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
fa42f796
Prev
Next
Show latest version
1 file
+
12
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
fa42f796
add shell docs
· fa42f796
Hahn Axel (hahn)
authored
Aug 25, 2023
inc_pluginfunctions
+
12
−
2
View file @ fa42f796
Edit in single-file editor
Open in Web IDE
Show full file
@@ -393,9 +393,12 @@ function ph._perfinit(){
function
ph._getperflabel
(){
echo
"
$1
"
|
tr
[
:upper:]
[
:lower:] |
sed
"s#[^a-z0-9
\-
]##g"
}
# get speed of change of a counter value
# param1: string variable name
# param2: integer value
# param string variable name
# param integer value
# param string unit to calculate a speed value per min or per sec; one of s|sec or m|min; default: "s"
# param string optional: flag to return a float value
function
ph.perfdeltaspeed
(){
local
varName
=
$1
local
value
=
$2
@@ -453,6 +456,13 @@ function ph.perfdeltaspeed(){
#
# example
# ph.perfadd
#
# param string label
# param int|float your value
# param integer optional: warning level
# param integer optional: critical level
# param integer optional: min graph value
# param integer optional: max graph value
function
ph.perfadd
(){
if
[
-z
"
$ph_perfdatafile
"
]
;
then
ph._perfinit
Loading