Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
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
Imldeployment
Commits
68cc3286
Commit
68cc3286
authored
6 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
Merge branch 'appmonitor-fix' into 'master'
Appmonitor fix See merge request !102
parents
65303135
2920fd38
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public_html/appmonitor/classes/appmonitor-client.class.php
+2
-2
2 additions, 2 deletions
public_html/appmonitor/classes/appmonitor-client.class.php
public_html/appmonitor/plugins/checkApacheProcesses.php
+12
-9
12 additions, 9 deletions
public_html/appmonitor/plugins/checkApacheProcesses.php
with
14 additions
and
11 deletions
public_html/appmonitor/classes/appmonitor-client.class.php
+
2
−
2
View file @
68cc3286
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
* 2018-11-05 0.58 axel.hahn@iml.unibe.ch additional flag in http check to show content<br>
* 2018-11-05 0.58 axel.hahn@iml.unibe.ch additional flag in http check to show content<br>
* 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br>
* 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br>
* --------------------------------------------------------------------------------<br>
* --------------------------------------------------------------------------------<br>
* @version 0.9
1
* @version 0.9
2
* @author Axel Hahn
* @author Axel Hahn
* @link TODO
* @link TODO
* @license GPL
* @license GPL
...
@@ -51,7 +51,7 @@ class appmonitor {
...
@@ -51,7 +51,7 @@ class appmonitor {
* value is in seconds
* value is in seconds
* @var int
* @var int
*/
*/
protected
$_sVersion
=
'php-client-v0.9
1
'
;
protected
$_sVersion
=
'php-client-v0.9
2
'
;
/**
/**
* config: default ttl for server before requesting the client check again
* config: default ttl for server before requesting the client check again
...
...
This diff is collapsed.
Click to expand it.
public_html/appmonitor/plugins/checkApacheProcesses.php
+
12
−
9
View file @
68cc3286
...
@@ -14,10 +14,7 @@
...
@@ -14,10 +14,7 @@
*
*
* ____________________________________________________________________________
* ____________________________________________________________________________
*
*
* SHOW LOAD AS LINE
* SHOW COUNT OF ACTIVE APACHE PROCESSES
*
* A plugin always is loaded in clases/appmonitor-checks.class.php
* Have look there for the used protected classes
* ____________________________________________________________________________
* ____________________________________________________________________________
*
*
* PARAMS:
* PARAMS:
...
@@ -36,8 +33,8 @@
...
@@ -36,8 +33,8 @@
* "function" => "ApacheProcesses",
* "function" => "ApacheProcesses",
* "params" => array(
* "params" => array(
* "url" => "https://localhost/status",
* "url" => "https://localhost/status",
* "warning" =>
30
,
* "warning" =>
75
,
* "error" =>
5
0,
* "error" =>
9
0,
* ),
* ),
* ),
* ),
* "worstresult" => RESULT_OK
* "worstresult" => RESULT_OK
...
@@ -109,12 +106,18 @@ class checkApacheProcesses extends appmonitorcheck{
...
@@ -109,12 +106,18 @@ class checkApacheProcesses extends appmonitorcheck{
if
(
$iActive
===
false
){
if
(
$iActive
===
false
){
$iResult
=
RESULT_UNKNOWN
;
$iResult
=
RESULT_UNKNOWN
;
}
else
{
}
else
{
$sComment
=
''
;
$iTotal
=
$aProcesses
[
'total'
];
$iResult
=
RESULT_OK
;
$iResult
=
RESULT_OK
;
if
(
$iActive
>
$this
->
_iWarn
){
if
(
(
$iActive
/
$iTotal
*
100
)
>
$this
->
_iWarn
){
$iResult
=
RESULT_WARNING
;
$iResult
=
RESULT_WARNING
;
$sComment
=
'more than warning level '
.
$this
->
_iWarn
.
'%'
;
}
else
{
$sComment
=
'less than warning level '
.
$this
->
_iWarn
.
'%'
;
}
}
if
(
$iActive
>
$this
->
_iError
){
if
(
(
$iActive
/
$iTotal
*
100
)
>
$this
->
_iError
){
$iResult
=
RESULT_ERROR
;
$iResult
=
RESULT_ERROR
;
$sComment
=
'more than error level '
.
$this
->
_iError
.
'%'
;
}
}
}
}
...
@@ -132,7 +135,7 @@ class checkApacheProcesses extends appmonitorcheck{
...
@@ -132,7 +135,7 @@ class checkApacheProcesses extends appmonitorcheck{
//
//
return
array
(
return
array
(
$iResult
,
$iResult
,
(
$iActive
===
false
?
'Apache httpd server status is not available'
:
'apache processes: '
.
print_r
(
$aProcesses
,
1
)),
(
$iActive
===
false
?
'Apache httpd server status is not available'
:
'apache processes: '
.
print_r
(
$aProcesses
,
1
))
.
' '
.
$sComment
,
(
$iActive
===
false
(
$iActive
===
false
?
array
()
?
array
()
:
array
(
:
array
(
...
...
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