This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig_sample.py
198 lines (176 loc) · 3.84 KB
/
config_sample.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
###########################################################
############### DO NOT EDIT THIS SECTION! ###############
###########################################################
import os
class Service:
def __init__(self, name, group, check, *data):
self.name = name
self.group = group
self.check = check
self.data = data
class Data:
def __init__(self, key, value, **kwargs):
self.key = key
self.value = value
self.kwargs = kwargs
###########################################################
#################### EDIT BELOW HERE ####################
###########################################################
# Database configuration
DATABASE_URI = "mysql://user:pass@localhost:3306/scoreengine"
DATABASE_EXTRA = {
"pool_size": 40,
"max_overflow": 60,
}
# Bank-API configuration
# As a note, the username/password configured here
# should be a user in the 'bank' that is a staff member (has the 'staff' flag)
# Typically, this is the user with the username of 'scoring'
BANK = {
"ENABLED": False,
"SERVER": "localhost",
"USER": "username",
"PASS": "password"
}
# Configuration for our task queue
CELERY = {
"BROKER": "pyamqp://guest@localhost/",
"BACKEND": "db+{}".format(DATABASE_URI),
"WORKER": {
"concurrency": 20,
"loglevel": "INFO",
"traceback": True
}
}
# Round configuration
ROUND = {
"time": 60,
"jitter": 5,
"reaper": 1,
}
# Traffic Generator configuration
TRAFFICGEN = {
"sleep": 10,
"amount": 10,
}
# This section is for overriding check-specific
# configuration
CHECKS = {
"icmp": {
"timeout": 5
}
}
# Amount of teams. As a note, MAX_NUM is not
# inclusive
TEAMS = {
"MIN_NUM": 1,
"MAX_NUM": 11,
}
# Logging
LOGGING = {
'version': 1,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
},
},
'handlers': {
'default': {
'level':'INFO',
'class':'logging.StreamHandler',
'formatter': 'standard',
},
},
'loggers': {
'scoreengine': {
'handlers': ['default'],
'level': 'INFO',
'propagate': True,
},
},
}
# All the services. Woah!
SERVICES = [
# ICMP Ping
Service(
"Ubuntu Clients",
"icmp",
"check_icmp",
Data("IP", "10.{team}.1.10", edit=False),
Data("IP", "10.{team}.1.20", edit=False)
),
# ICMP Ping
Service(
"Windows Clients",
"icmp",
"check_icmp",
Data("IP", "10.{team}.1.30", edit=False),
Data("IP", "10.{team}.1.40", edit=False)
),
# Active Directory
Service(
"AD",
"ldap",
"check_ldap_lookup",
Data("HOST", "10.{team}.1.50", order=0),
Data("DOMAIN", "loribird{team}.win", edit=False, order=1),
Data("USERPASS", "jgeistBird||Changeme123!", order=2),
Data("USERPASS", "jdrosteBird||Changeme123!", order=2)
),
# DNS
Service(
"DNS",
"dns",
"check_dns",
Data("HOST", "10.{team}.1.50", order=0),
Data("LOOKUP", "loribird{team}.win", order=1),
Data("TYPE", "A", order=2),
Data("EXPECTED", "10.{team}.1.50", order=3)
),
# Wordpress
Service(
"HTTP Web",
"http",
"check_wordpress",
Data("HOST", "10.{team}.2.2", order=0),
Data("PORT", "80", order=1),
Data("USERPASS", "BirdMan||changeme", order=2),
),
# HTTP Mail Client
Service(
"HTTP Mail",
"http",
"check_http",
Data("HOST", "10.{team}.2.4", order=0),
Data("PORT", "80", order=1)
),
# FTP
Service(
"FTP",
"ftp",
"check_upload_download",
Data("HOST", "10.{team}.2.5", order=0),
Data("USERPASS", "bigbird||Lorirox123", order=1)
),
# IMAP
Service(
"IMAP",
"imap",
"check_imap_login",
Data("HOST", "10.{team}.2.4", order=0),
Data("PORT", "143", order=1),
Data("USERPASS", "backups||changeme", order=2)
),
# MySQL
Service(
"DB",
"mysql",
"check_wordpress",
Data("HOST", "10.{team}.2.3", order=0),
Data("PORT", "3306", order=1),
Data("USER", "MariaBird", order=2),
Data("PASS", "lori4prez", order=3),
Data("DB_LOOKUP", "wordpress", order=4),
Data("BLOG_NAME", "Lori Bird 4 Prez 2k17", order=5)
),
]