SOURCE

function _beforeNotify(id, data) {
    const old_data = data.preData.text.split(' ');
    const new_data = data.curData.text.split(' ');
    names = ['af_backup', 'af_model_queue', 'af_receive_files', 'af_upload', 'backup', 'bili_upload', 'model_queue', 'receive_files', 'upload'];
    threshold = [40, 300, 40, 50, 200, 0, 600, 50, 50];
    notify = false;
    data.config.title = '报警';
    for (var i = 0; i < threshold.length; i++) {
        if (new_data[i] > threshold[i] && old_data[i] <= threshold[i]) {
        // if (new_data[i] > threshold[i] ) {
            notify = true;
            data.config.title += names[i] + new_data[i] + ' ';
        }
    }

    if (!notify) {
        data.ignored = true;
    }

    _callback(id, data);
}
console 命令行工具 X clear

                    
>
console