Fix legacy services check names
This commit is contained in:
parent
18cfd175a2
commit
69d85c4236
|
@ -5,15 +5,15 @@ class Application_Model_Systemstatus
|
||||||
public static function GetMonitStatus($p_ip)
|
public static function GetMonitStatus($p_ip)
|
||||||
{
|
{
|
||||||
$CC_CONFIG = Config::getConfig();
|
$CC_CONFIG = Config::getConfig();
|
||||||
// $monit_user = $CC_CONFIG['monit_user'];
|
// $monit_user = $CC_CONFIG['monit_user'];
|
||||||
// $monit_password = $CC_CONFIG['monit_password'];
|
// $monit_password = $CC_CONFIG['monit_password'];
|
||||||
|
|
||||||
$url = "http://{$p_ip}:2812/_status?format=xml";
|
$url = "http://{$p_ip}:2812/_status?format=xml";
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
// curl_setopt($ch, CURLOPT_USERPWD, "$monit_user:$monit_password");
|
// curl_setopt($ch, CURLOPT_USERPWD, "$monit_user:$monit_password");
|
||||||
//wait a max of 3 seconds before aborting connection attempt
|
//wait a max of 3 seconds before aborting connection attempt
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
|
||||||
$result = curl_exec($ch);
|
$result = curl_exec($ch);
|
||||||
|
@ -42,7 +42,8 @@ class Application_Model_Systemstatus
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'memory_perc' => '0%',
|
'memory_perc' => '0%',
|
||||||
'memory_kb' => '0',
|
'memory_kb' => '0',
|
||||||
'cpu_perc' => '0%', ];
|
'cpu_perc' => '0%',
|
||||||
|
];
|
||||||
|
|
||||||
$notMonitored = [
|
$notMonitored = [
|
||||||
'name' => $p_serviceName,
|
'name' => $p_serviceName,
|
||||||
|
@ -153,7 +154,7 @@ class Application_Model_Systemstatus
|
||||||
|
|
||||||
$docRoot = self::GetMonitStatus($ip);
|
$docRoot = self::GetMonitStatus($ip);
|
||||||
|
|
||||||
return self::ExtractServiceInformation($docRoot, 'airtime-playout');
|
return self::ExtractServiceInformation($docRoot, 'libretime-playout');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetLiquidsoapStatus()
|
public static function GetLiquidsoapStatus()
|
||||||
|
@ -166,7 +167,7 @@ class Application_Model_Systemstatus
|
||||||
|
|
||||||
$docRoot = self::GetMonitStatus($ip);
|
$docRoot = self::GetMonitStatus($ip);
|
||||||
|
|
||||||
return self::ExtractServiceInformation($docRoot, 'airtime-liquidsoap');
|
return self::ExtractServiceInformation($docRoot, 'libretime-liquidsoap');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetMediaMonitorStatus()
|
public static function GetMediaMonitorStatus()
|
||||||
|
|
|
@ -136,13 +136,13 @@ function checkAnalyzerService()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if airtime-playout is currently running.
|
* Check if libretime-playout is currently running.
|
||||||
*
|
*
|
||||||
* @return bool true if airtime-playout is running
|
* @return bool true if libretime-playout is running
|
||||||
*/
|
*/
|
||||||
function checkPlayoutService()
|
function checkPlayoutService()
|
||||||
{
|
{
|
||||||
exec('pgrep -f airtime-playout', $out, $status);
|
exec('pgrep -f libretime-playout', $out, $status);
|
||||||
if ($out > 0) {
|
if ($out > 0) {
|
||||||
return posix_kill(rtrim($out[0]), 0);
|
return posix_kill(rtrim($out[0]), 0);
|
||||||
}
|
}
|
||||||
|
@ -151,13 +151,13 @@ function checkPlayoutService()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if airtime-liquidsoap is currently running.
|
* Check if libretime-liquidsoap is currently running.
|
||||||
*
|
*
|
||||||
* @return bool true if airtime-liquidsoap is running
|
* @return bool true if libretime-liquidsoap is running
|
||||||
*/
|
*/
|
||||||
function checkLiquidsoapService()
|
function checkLiquidsoapService()
|
||||||
{
|
{
|
||||||
exec('pgrep -f airtime-liquidsoap', $out, $status);
|
exec('pgrep -f libretime-liquidsoap', $out, $status);
|
||||||
if ($out > 0) {
|
if ($out > 0) {
|
||||||
return posix_kill(rtrim($out[0]), 0);
|
return posix_kill(rtrim($out[0]), 0);
|
||||||
}
|
}
|
||||||
|
@ -166,9 +166,9 @@ function checkLiquidsoapService()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if airtime-celery is currently running.
|
* Check if libretime-celery is currently running.
|
||||||
*
|
*
|
||||||
* @return bool true if airtime-celery is running
|
* @return bool true if libretime-celery is running
|
||||||
*/
|
*/
|
||||||
function checkCeleryService()
|
function checkCeleryService()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue