<commit_before>#!/bin/bash
# Date : 2015年10月26日16:22:32
# Author : houqian
# Contact : <EMAIL>
# Company : www.onealert.com
# OneAlert pre install script : nagios

set -e
#agent installing log file 
logfile="onealert-agent-install.log"
#current system timestamp for log
SYSTEM_TIME=`date '+%Y-%m-%d %T'`
# color
yellow='\e[0;33m'
green='\e[0;32m' 
endColor='\e[0m'

#server url
YUM_URL="http://yum.110monitor.com:80"
INSTALL_PROCESS_URL="http://ci1.test.110monitor.com:28080/alert/api/escalation/agentInstall/$NAGIOS_APPKEY"
MENU_CEP_URL="http://ci1.test.110monitor.com:28080/alert/api/event"
HB_URL="http://ci1.test.110monitor.com:28080/alert/api/heartbeat/"
MENU_ALERT_URL="http://ci1.test.110monitor.com:28080/alert"

# detect whether the current user is root.
# Root user detection
if [ $(echo "$UID") = "0" ]; then
    sudo_cmd=''
else
    sudo_cmd='sudo'
fi
<commit_msg>正式安装脚本<commit_after>#!/bin/bash
# Date : 2015年10月26日16:22:32
# Author : houqian
# Contact : <EMAIL>
# Company : www.onealert.com
# OneAlert pre install script : nagios

set -e
#agent installing log file 
logfile="onealert-agent-install.log"
#current system timestamp for log
SYSTEM_TIME=`date '+%Y-%m-%d %T'`
# color
yellow='\e[0;33m'
green='\e[0;32m' 
endColor='\e[0m'

#server url
YUM_URL="http://yum.110monitor.com"
INSTALL_PROCESS_URL="http://api.110monitor.com/alert/api/escalation/agentInstall/$NAGIOS_APPKEY"
MENU_CEP_URL="http://api.110monitor.com/alert/api/event"
HB_URL="http://api.110monitor.com/alert/api/heartbeat/"
MENU_ALERT_URL="http://api.110monitor.com/alert"

# detect whether the current user is root.
# Root user detection
if [ $(echo "$UID") = "0" ]; then
    sudo_cmd=''
else
    sudo_cmd='sudo'
fi

{'fraction_non_alphanumeric': 0.16784452296819788, 'fraction_numerical': 0.05889281507656066, 'mean_word_length': 5.178181818181818, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7371900', 'n_tokens_mistral': 755, 'n_tokens_neox': 675, 'n_words': 118}