-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCONFIG.py
More file actions
28 lines (23 loc) · 824 Bytes
/
CONFIG.py
File metadata and controls
28 lines (23 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import requests
test = False # only worked on task_server.py side. does not affect client side
LEVEL = 20 # info: 20
LogDirectionary = "./log"
ICMP_ECHO_REQUEST = 8
RETRY_TIMES = 3
LOOPTIMEOUTSEC = 20
DELAYONCRITICALERROR = 60
PLOTCACHEBYPASS = False
# Define the size of the rolling window in minutes
window_size = 60
LOCAL_SERVER_IP = "http://127.0.0.1:8001" # FOR LOCAL SERVRE ONLY
INTRA_SERVER_IP = "http://172.16.82.60:8001" # FOR INTRANET
INTER_SERVER_IP = "http://47.95.223.74:8001" # FOR PUBLIC address
try:
if requests.get(LOCAL_SERVER_IP + "/ping", timeout=2).status_code == 200:
SERVER_IP = LOCAL_SERVER_IP
except:
try:
if requests.get(INTRA_SERVER_IP + "/ping", timeout=2).status_code == 200:
SERVER_IP = INTRA_SERVER_IP
except:
SERVER_IP = INTER_SERVER_IP