Skip to content
Snippets Groups Projects
Commit 24299308 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

#7709 - update appmomitor client check for instances per rollout plugin

parent 22909d04
No related branches found
No related tags found
1 merge request!75#7709 - update appmomitor client check for instances per rollout plugin
This commit is part of merge request !75. Comments created here will be created in the context of that merge request.
...@@ -230,30 +230,33 @@ if(isset($aConfig['foreman']['api'])){ ...@@ -230,30 +230,33 @@ if(isset($aConfig['foreman']['api'])){
} }
// #6421 - add check for AWX // #6421 - add check for AWX
// #7709 - update for instances per rollout plugin
if(isset($aConfig['plugins']['rollout']['awx'])){ if(isset($aConfig['plugins']['rollout']['awx'])){
$aOpts=[]; $aOpts=[];
$aOpts['url'] = $aConfig['plugins']['rollout']['awx']['url'].'/'; foreach ($aConfig['plugins']['rollout'] as $sId => $aRolloutConfig) {
if(isset($aConfig['plugins']['rollout']['awx']['user'])){ if ($aRolloutConfig['plugin'] == "awx") {
$aOpts['userpwd'] = $aConfig['plugins']['rollout']['awx']['user'] $aOpts['url'] = $aRolloutConfig['url'].'/';
. (isset($aConfig['plugins']['rollout']['awx']['password']) $aOpts['userpwd'] = $aRolloutConfig['user']
? ':'.$aConfig['plugins']['rollout']['awx']['password'] . (isset($aRolloutConfig['password'])
? ':'.$aRolloutConfig['password']
: '' : ''
) )
; ;
}
$oMonitor->addCheck( $oMonitor->addCheck(
[ [
"name" => "AWX API", "name" => "AWX API - ".$sId,
"description" => "check if AWX api is available", "description" => "check if AWX api is available",
"group" => "network", "group" => "network",
"parent" => "read config file", "parent" => "read config file",
"check" => [ "check" => [
"function" => "HttpContent", "function" => "HttpContent",
"params" => $aOpts, "params" => $aOpts,
], ],
] ]
); );
}
}
} }
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment