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
24de0e5b
Commit
24de0e5b
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update php-fpm check - smal changes in output
parent
557eb335
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_php-fpm-status
+11
-4
11 additions, 4 deletions
check_php-fpm-status
with
11 additions
and
4 deletions
check_php-fpm-status
+
11
−
4
View file @
24de0e5b
...
...
@@ -15,7 +15,7 @@
tmpfile
=
/tmp/check_fpm_processes_1
defaulturl
=
localhost/status
sDeltaunit
=
"
s
"
sDeltaunit
=
"
min
"
# ----------------------------------------------------------------------
# functions
...
...
@@ -73,7 +73,7 @@ ______________________________________________________________________
The check fetches several counters from php-fm-status page.
It shows a short status in a single line and then the dump of the
It shows a short
service
status in a single line and then the dump of the
status page.
For performance data it echos:
...
...
@@ -158,6 +158,7 @@ typeset -i iMaxQueue=$( _getvalue "max listen queue")
typeset
-i
iSlowTotal
=
$(
_getvalue
"slow requests"
)
typeset
-i
iSlow
=
$(
ph.perfdeltaspeed
"fpm-slow"
$iSlowTotal
$sDeltaunit
)
typeset
-i
iMaxChilds
=
$(
_getvalue
"max children reached"
)
typeset
-i
iSlowPercent
=
$iSpeed
*
100/
$iSlow
typeset
-i
iWorkerRunning
=
$(
_getWorkerOfState
"Running"
|
wc
-l
)
...
...
@@ -188,9 +189,15 @@ fi
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
ph.status
"PHP-FPM: active:
$iActive
(max:
$iMaxActive
) .. idle workers:
$iIdle
.. queue:
$iQueue
(max:
$iMaxQueue
) .. speed:
$iSpeed
req per
$sDeltaunit
... slow:
$iSlow
req per
$sDeltaunit
(total:
$iSlowTotal
)"
echo
Worker states: Running:
$iWorkerRunning
.. Reading headers:
$iWorkerReading
.. Idle:
$iWorkerIdle
ph.status
"PHP-FPM service: active:
$iActive
(max:
$iMaxActive
) .. idle workers:
$iIdle
.. queue:
$iQueue
.. speed:
$iSpeed
req per
$sDeltaunit
... slow:
$iSlow
req per
$sDeltaunit
(
$iSlowPercent
%; total:
$iSlowTotal
)"
echo
"Workers: Running:
$iWorkerRunning
"
echo
" Reading headers:
$iWorkerReading
"
echo
" Idle:
$iWorkerIdle
"
echo
echo
" Waiting for a worker (queue):
$iQueue
(max:
$iMaxQueue
)"
echo
# ----- output hints on warning level
hint
=
"!! IMPORTANT !! Any non-OK status is still experimmental."
if
[
$iWorkerIdle
-eq
0
]
;
then
echo
$hint
...
...
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