Commit a0c02851 authored by yujiwei's avatar yujiwei

update:fix

parent 12ba97d8
......@@ -85,15 +85,26 @@ class MonUtil{
}
public static function mongoMon($mysql_host,$operator,$request_time = -799)
public static function mongoMon($mongo_host,$operator,$request_time = -799)
{
if (empty($mysql_host) || empty($operator)) {
return ;
if ( empty($operator) || !is_array($mongo_host)) {
return ;
}
$host = '';
foreach ($mongo_host as $items)
{
$host .= $items['host'].'_';
}
if (empty($host)) {
$host = 'unknow';
}
$host = trim($host,'_');
//记录请求量
self::counting('mongodb.'.$mysql_host , (string)$operator,0);
self::counting('mongodb.'.$host , (string)$operator,0);
//耗时打点
if(!empty($request_time) && is_numeric($request_time) && $request_time != -799){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment