Project

General

Profile

Testovani db testovaci dotazy » testovani.txt

Doplneni dotazu - Radek Orkac - Tomáš Plesník, 04/18/2016 11:14 AM

 
1
Indexy:
2

    
3
"indexes": {
4
	"ts": {"fields": [{"ts": 1}], "background": 1},
5
	"ts_u": {"fields": [{"ts_u": 1}], "background": 1},
6
	"node_name": {"fields": [{"Node.Name": 1}], "background": 1},
7
	"node_sw": {"fields": [{"Node.SW": 1}], "background": 1},
8
	"category": {"fields": [{"Category": 1}], "background": 1},
9
	"description": {"fields": [{"Description": 1}], "background": 1},
10
	"detector": {"fields": [{"Node.Name": 1}, {"Node.SW": 1}], "background": 1},
11
	"createtime": {"fields": [{"CreateTime": -1}], "background": 1},
12
	"detecttime": {"fields": [{"DetectTime": -1}], "background": 1},
13
	"source_ip4": {"fields": [{"Source.IP4.ip": 1}], "background": 1},
14
	"target_ip4": {"fields": [{"Target.IP4.ip": 1}], "background": 1},
15
	"source_ip4_min_max": {"fields": [{"Source.IP4.min": 1}, {"Source.IP4.max": 1}], "background": 1},
16
	"target_ip4_min_max": {"fields": [{"Target.IP4.min": 1}, {"Target.IP4.max": 1}], "background": 1},
17
	"resolved_abuses": {"fields": [{"_CESNET.ResolvedAbuses": 1}], "background": 1}
18
}
19

    
20
Ukazky hodnot:
21

    
22
"{gte}": "2016-03-21T00:00:00"
23
"{lte}": "2016-03-23T00:00:00"
24
"{ip_s}": "27.254.67.139"
25
"{ip_t}": "158.196.0.0"
26
"{net_min_s}": "27.254.67.0"
27
"{net_max_s}": "27.254.67.255"
28
"{category1}": "Attempt.Login"
29
"{node.sw1}": "value": "Mentat"
30
"{node.name1}": "value": "cz.cesnet.mentat.warden_filer"
31

    
32
Dotazy:
33

    
34
{"$and": [
35
    {
36
	"$and": [
37
	    {
38
		"DetectTime": {
39
		    "$gte": "{gte}"
40
		}
41
	    },
42
	    {
43
		"DetectTime": {
44
		    "$lte": "{lte}"
45
		}
46
	    }
47
	]
48
    },
49
    {
50
	"$or": [
51
	    {
52
		"Source.IP4.ip": "{ip}"
53
	    },
54
	    {
55
		"Target.IP4.ip": "{ip}"
56
	    }
57
	]
58
    }
59
]}
60

    
61
----------
62

    
63
{ "$and": [
64
    {
65
	"$and": [
66
	    {
67
		"DetectTime": {
68
		    "$gte": "{gte}"
69
		}
70
	    },
71
	    {
72
		"DetectTime": {
73
		    "$lte": "{lte}"
74
		}
75
	    }
76
	]
77
    },
78
    {
79
	"$or": [
80
	   {
81
		"$and": [
82
		    {
83
			"Source.IP4.min": {
84
			    "$gte": "{net_min1}"
85
			}
86
		    },
87
		    {
88
			"Source.IP4.max": {
89
			    "$lte": "{net_max1}"
90
			}
91
		    }
92
		]
93
	   },
94
	   {
95
		"$and": [
96
		    {
97
			"Target.IP4.min": {
98
			    "$gte": "{net_min2}"
99
			}
100
		    },
101
		    {
102
			"Target.IP4.max": {
103
			    "$lte": "{net_max2}"
104
			}
105
		    }
106
		]
107
	   }
108
	]
109
    }
110
]}
111

    
112
----------
113

    
114
{ "$and": [
115
    {
116
	"$and": [
117
	    {
118
		"DetectTime": {
119
		    "$gte": "{gte}"
120
		}
121
	    },
122
	    {
123
		"DetectTime": {
124
		    "$lte": "{lte}"
125
		}
126
	    }
127
	]
128
    },
129
    {
130
	"$or": [
131
	    {
132
		"Source.IP4.ip": "{ip1}"
133
	    },
134
	    {
135
		"Target.IP4.ip": "{ip1}"
136
	    },
137
	    {
138
		"Source.IP4.ip": "{ip2}"
139
	    },
140
	    {
141
		"Target.IP4.ip": "{ip2}"
142
	    }
143
	]
144
    }
145
]}
146

    
147
------------
148

    
149
{"$and": [
150
    {
151
	"Source.IP4.ip": "{ip_s}"
152
    },
153
    {
154
	"Target.IP4.ip": "{ip_t}"
155
    },
156
    {
157
	"DetectTime": {
158
	    "$gte": "{gte}"
159
	}
160
    },
161
    {
162
	"DetectTime": {
163
	    "$lte": "{lte}"
164
	}
165
    },
166
    {
167
	"Category": "{category1}"
168
    },
169
    {
170
	"Node.SW": "{node.sw1}"
171
    },
172
    {
173
	"Node.Name": "{node.name1}"
174
    }
175
]}
(2-2/2)