apache_log_report 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/apache_log_report/templates/template.html.erb +172 -140
- data/lib/apache_log_report/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b90448ec269bd64d60c2323888fb77ea8ac7307a00198434119a6f0da605585
|
|
4
|
+
data.tar.gz: 24569c78964b795478c50e5de01c4f42fb2be8f02c30911e4e81229a96917a55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 604697690824080fbbed523f26c1727f969fcf791803ebd15d6838384c5c77edbcde25ad74fa47c2371c0690019745948b6d78f9f1a51e6742e51e35c5c5ba76
|
|
7
|
+
data.tar.gz: b7d5a6940308a6a098cb61b9118cd17760592e299e091193b07a003ae87e6f7058ee1aab81aed2cadd65dcc07c6b64652ede126274be5be552dbbf0ca3ba11b1
|
|
@@ -10,68 +10,98 @@
|
|
|
10
10
|
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-icons.min.css">
|
|
11
11
|
</head>
|
|
12
12
|
|
|
13
|
-
<body>
|
|
14
|
-
<
|
|
15
|
-
|
|
13
|
+
<body class="container">
|
|
14
|
+
<h1>Apache Log Analysis: <%= data[:log_file] || "stdin" %></h1>
|
|
15
|
+
|
|
16
|
+
<nav>
|
|
17
|
+
<ul class="nav">
|
|
18
|
+
<li class="nav-item active">
|
|
19
|
+
<a href="#">Navigation</a>
|
|
20
|
+
<ul class="nav">
|
|
21
|
+
<% [ "Summary",
|
|
22
|
+
"Log Structure",
|
|
23
|
+
"Daily Distribution",
|
|
24
|
+
"Time Distribution",
|
|
25
|
+
"Most Requested Pages",
|
|
26
|
+
"Most Requested Resources",
|
|
27
|
+
"404 on HTML Files",
|
|
28
|
+
"404 on other Resources",
|
|
29
|
+
"Attacks",
|
|
30
|
+
"Statuses",
|
|
31
|
+
"Daily Statuses",
|
|
32
|
+
"Browsers",
|
|
33
|
+
"Platforms",
|
|
34
|
+
"Referers",
|
|
35
|
+
"IPs"
|
|
36
|
+
].each do |item| %>
|
|
37
|
+
<li class="nav-item">
|
|
38
|
+
<a href="#<%= item.downcase.gsub(' ', '-') %>"><%= item %></a>
|
|
39
|
+
</li>
|
|
40
|
+
<% end %>
|
|
41
|
+
</ul>
|
|
42
|
+
</li>
|
|
43
|
+
</ul>
|
|
44
|
+
</nav>
|
|
16
45
|
|
|
46
|
+
<section>
|
|
17
47
|
<div class="columns">
|
|
18
48
|
<article class="col-6 column">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<table class="table summary">
|
|
22
|
-
<tr>
|
|
23
|
-
<th class="hits">Hits</th>
|
|
24
|
-
<td class="hits"><%= data[:total_hits][0][0] %></td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<th class="unique-visitors">Unique Visitors</th>
|
|
28
|
-
<td class="unique-visitors"><%= data[:total_unique_visitors][0][0] %></td>
|
|
29
|
-
</tr>
|
|
30
|
-
<tr>
|
|
31
|
-
<th class="tx">Tx</th>
|
|
32
|
-
<td class="tx"><%= data[:total_size][0][0] %></td>
|
|
33
|
-
</tr>
|
|
34
|
-
<tr>
|
|
35
|
-
<th class="period">Period</th>
|
|
36
|
-
<td class="period">
|
|
37
|
-
<%= data[:first_day][0][0] %>
|
|
38
|
-
--
|
|
39
|
-
<%= data[:last_day][0][0] %>
|
|
40
|
-
</td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr>
|
|
43
|
-
<th class="days">Days </th>
|
|
44
|
-
<td class="days"><%= data[:total_days] %></td>
|
|
45
|
-
</tr>
|
|
46
|
-
</table>
|
|
47
|
-
</article>
|
|
48
|
-
<article class="column col-6">
|
|
49
|
-
<h3> Log Structure</h3>
|
|
49
|
+
<h2 id="summary">Summary</h2>
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
<tbody>
|
|
51
|
+
<table class="table summary">
|
|
53
52
|
<tr>
|
|
54
|
-
<th>
|
|
55
|
-
<td
|
|
53
|
+
<th class="hits">Hits</th>
|
|
54
|
+
<td class="hits"><%= data[:total_hits][0][0] %></td>
|
|
56
55
|
</tr>
|
|
57
56
|
<tr>
|
|
58
|
-
<th>
|
|
59
|
-
<td><%= data[:
|
|
57
|
+
<th class="unique-visitors">Unique Visitors</th>
|
|
58
|
+
<td class="unique-visitors"><%= data[:total_unique_visitors][0][0] %></td>
|
|
60
59
|
</tr>
|
|
61
60
|
<tr>
|
|
62
|
-
<th>
|
|
63
|
-
<td><%= data[:
|
|
61
|
+
<th class="tx">Tx</th>
|
|
62
|
+
<td class="tx"><%= data[:total_size][0][0] %></td>
|
|
64
63
|
</tr>
|
|
65
64
|
<tr>
|
|
66
|
-
<th>
|
|
67
|
-
<td
|
|
65
|
+
<th class="period">Period</th>
|
|
66
|
+
<td class="period">
|
|
67
|
+
<%= data[:first_day][0][0] %>
|
|
68
|
+
--
|
|
69
|
+
<%= data[:last_day][0][0] %>
|
|
70
|
+
</td>
|
|
68
71
|
</tr>
|
|
69
72
|
<tr>
|
|
70
|
-
<th>
|
|
71
|
-
<td><%= data[:
|
|
73
|
+
<th class="days">Days </th>
|
|
74
|
+
<td class="days"><%= data[:total_days] %></td>
|
|
72
75
|
</tr>
|
|
73
|
-
</
|
|
74
|
-
|
|
76
|
+
</table>
|
|
77
|
+
</article>
|
|
78
|
+
<article class="column col-6">
|
|
79
|
+
<h2 id="log-structure">Log Structure</h2>
|
|
80
|
+
|
|
81
|
+
<table class="table log-structure">
|
|
82
|
+
<tbody>
|
|
83
|
+
<tr>
|
|
84
|
+
<th>Input file</th>
|
|
85
|
+
<td><b><%= (data[:log_file] || "stdin") %></b></td>
|
|
86
|
+
</tr>
|
|
87
|
+
<tr>
|
|
88
|
+
<th>Log size</th>
|
|
89
|
+
<td><%= data[:log_size][0][0] %></td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<th>Self poll entries</th>
|
|
93
|
+
<td><%= data[:selfpolls_size][0][0] %></td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<th>Crawlers</th>
|
|
97
|
+
<td><%= data[:crawlers_size][0][0] %></td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<th>Entries considered</th>
|
|
101
|
+
<td><%= data[:total_hits][0][0] %></td>
|
|
102
|
+
</tr>
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
75
105
|
</article>
|
|
76
106
|
</div>
|
|
77
107
|
|
|
@@ -98,7 +128,9 @@
|
|
|
98
128
|
<div class="column <%= report[:col] || "col-6" %>">
|
|
99
129
|
<article>
|
|
100
130
|
<% if report[:title] != nil %>
|
|
101
|
-
<h2
|
|
131
|
+
<h2 id="<%= report[:title].downcase.gsub(/ +/, '-') %>">
|
|
132
|
+
<%= report[:title] %>
|
|
133
|
+
</h2>
|
|
102
134
|
<%= render "output_table", report %>
|
|
103
135
|
<% end %>
|
|
104
136
|
</article>
|
|
@@ -107,108 +139,108 @@
|
|
|
107
139
|
</div>
|
|
108
140
|
|
|
109
141
|
<article>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<tr>
|
|
115
|
-
<th>IP</th>
|
|
116
|
-
<th>Day and URL</th>
|
|
117
|
-
</tr>
|
|
118
|
-
</thead>
|
|
119
|
-
<tbody>
|
|
120
|
-
<% data[:streaks].group_by(&:first).each do |ip, date_urls| %>
|
|
142
|
+
<h2 id="streaks">Streaks</h2>
|
|
143
|
+
|
|
144
|
+
<table class="table streaks">
|
|
145
|
+
<thead>
|
|
121
146
|
<tr>
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
<% date_urls.group_by(&:first).each do |date, urls| %>
|
|
125
|
-
<% urls.each do |url| %>
|
|
126
|
-
<b><%= url[1] %>:</b> <%= url[2] %> <br />
|
|
127
|
-
<% end %>
|
|
128
|
-
<% end %>
|
|
129
|
-
</td>
|
|
147
|
+
<th>IP</th>
|
|
148
|
+
<th>Day and URL</th>
|
|
130
149
|
</tr>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
150
|
+
</thead>
|
|
151
|
+
<tbody>
|
|
152
|
+
<% data[:streaks].group_by(&:first).each do |ip, date_urls| %>
|
|
153
|
+
<tr>
|
|
154
|
+
<td class="ip"><%= ip %></td>
|
|
155
|
+
<td class="streaks">
|
|
156
|
+
<% date_urls.group_by(&:first).each do |date, urls| %>
|
|
157
|
+
<% urls.each do |url| %>
|
|
158
|
+
<b><%= url[1] %>:</b> <%= url[2] %> <br />
|
|
159
|
+
<% end %>
|
|
160
|
+
<% end %>
|
|
161
|
+
</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<% end %>
|
|
164
|
+
</tbody>
|
|
165
|
+
</table>
|
|
166
|
+
</article>
|
|
135
167
|
|
|
136
168
|
<div class="columns">
|
|
137
169
|
<div class="column col-6">
|
|
138
170
|
<article>
|
|
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
|
-
|
|
171
|
+
<h2 id="command-invocation">Command Invocation</h2>
|
|
172
|
+
|
|
173
|
+
<table class="table command-invocation">
|
|
174
|
+
<tbody>
|
|
175
|
+
<tr>
|
|
176
|
+
<th>CLI Command</th>
|
|
177
|
+
<td><pre><%= data[:command] %></pre></td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<th>Input file</th>
|
|
181
|
+
<td><code><%= (data[:log_file] || "stdin") %></code></td>
|
|
182
|
+
</tr>
|
|
183
|
+
<tr>
|
|
184
|
+
<th>Ignore crawlers</th>
|
|
185
|
+
<td><code><%= options[:ignore_crawlers] %></code></td></tr>
|
|
186
|
+
<tr>
|
|
187
|
+
<th>Only crawlers</th>
|
|
188
|
+
<td><code><%= options[:only_crawlers] %></code></td>
|
|
189
|
+
</tr>
|
|
190
|
+
<tr>
|
|
191
|
+
<th>No selfpoll</th>
|
|
192
|
+
<td><code><%= options[:no_selfpoll] %></code></td>
|
|
193
|
+
</tr>
|
|
194
|
+
<tr>
|
|
195
|
+
<th>Filter by date</th>
|
|
196
|
+
<td>
|
|
197
|
+
<code><%= (options[:from_date] != nil or options[:to_date] != nil) %></code>
|
|
198
|
+
</td>
|
|
199
|
+
</tr>
|
|
200
|
+
<tr>
|
|
201
|
+
<th>Prefix</th>
|
|
202
|
+
<td><code><%= @prefix %></code></td>
|
|
203
|
+
</tr>
|
|
204
|
+
<tr>
|
|
205
|
+
<th>Suffix</th>
|
|
206
|
+
<td><code><%= @suffix %></code></td>
|
|
207
|
+
</tr>
|
|
208
|
+
</tbody>
|
|
209
|
+
</table>
|
|
178
210
|
</article>
|
|
179
211
|
</div>
|
|
180
212
|
|
|
181
213
|
<div class="column col-6">
|
|
182
214
|
<article>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
<h2 id="performance"> Performance</h2>
|
|
216
|
+
|
|
217
|
+
<table class="table performance">
|
|
218
|
+
<tbody>
|
|
219
|
+
<tr>
|
|
220
|
+
<th>Analysis started at</th>
|
|
221
|
+
<td><%= data[:started_at].to_s %></td>
|
|
222
|
+
</tr>
|
|
223
|
+
<tr>
|
|
224
|
+
<th>Analysis ended at</th>
|
|
225
|
+
<td><%= data[:ended_at].to_s %></td>
|
|
226
|
+
</tr>
|
|
227
|
+
<tr>
|
|
228
|
+
<th>Duration (sec)</th>
|
|
229
|
+
<td><%= "%.1f" % data[:duration] %></td>
|
|
230
|
+
</tr>
|
|
231
|
+
<tr>
|
|
232
|
+
<th>Duration (min)</th>
|
|
233
|
+
<td><%= "%d" % (data[:duration] / 60 ) %></td>
|
|
234
|
+
</tr>
|
|
235
|
+
<tr>
|
|
236
|
+
<th>Log size</th>
|
|
237
|
+
<td><%= data[:log_size][0][0] %></td>
|
|
238
|
+
</tr>
|
|
239
|
+
<tr>
|
|
240
|
+
<th>Lines/sec</th>
|
|
241
|
+
<td><%= "%.2f" % (data[:log_size][0][0] / data[:duration]) %></td></tr>
|
|
242
|
+
</tbody>
|
|
243
|
+
</table>
|
|
212
244
|
</article>
|
|
213
245
|
</div>
|
|
214
246
|
</div>
|