apache_log_report 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45396921f6e594c2b2dcce25320c292c08f4bb35ab7c19dc72fb99cec8520dd4
|
4
|
+
data.tar.gz: 990dacd5e607a0f62a55f7248396ac095f2867f905807f91c3df1f6c06b5def0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c69d138504939d0c1917c7d9f278fff974fce0c27f82c64fd45b80641070924ea5f63a17b6efb4c64c63ea54f458a8b7d3d3f3e100664c70cdc3488be78950
|
7
|
+
data.tar.gz: a675921834c7551b2b95bf983c08a71f40f94f1f16e2b24d6b4fb10c4be61f9ffd8abb9947f985f0419d1678045758934e448d7e77f4904d806f3c966b8af358
|
data/apache_log_report.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.authors = ["Adolfo Villafiorita"]
|
7
7
|
spec.email = ["adolfo.villafiorita@ict4g.net"]
|
8
8
|
|
9
|
-
spec.summary = %q{Generate
|
10
|
-
spec.description = %q{Generate
|
9
|
+
spec.summary = %q{Generate analytics from an Apache log file.}
|
10
|
+
spec.description = %q{Generate requests reports in HTML, OrgMode, and SQLite format from an Apache log file.}
|
11
11
|
spec.homepage = "https://www.ict4g.net/gitea/adolfo/apache_log_report"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
@@ -4,42 +4,76 @@
|
|
4
4
|
<meta name="author" content="apache_log_report">
|
5
5
|
|
6
6
|
<link rel="stylesheet" href="alr-styles.css"></style>
|
7
|
+
|
8
|
+
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css">
|
9
|
+
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-exp.min.css">
|
10
|
+
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-icons.min.css">
|
7
11
|
</head>
|
8
12
|
|
9
13
|
<body>
|
10
|
-
<section>
|
14
|
+
<section class="container">
|
11
15
|
<h1>Apache Log Analysis: <%= data[:log_file] || "stdin" %></h1>
|
12
16
|
|
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
|
-
|
17
|
+
<div class="columns">
|
18
|
+
<article class="col-6 column">
|
19
|
+
<h2>Summary</h2>
|
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>
|
50
|
+
|
51
|
+
<table class="table log-structure">
|
52
|
+
<tbody>
|
53
|
+
<tr>
|
54
|
+
<th>Input file</th>
|
55
|
+
<td><b><%= (data[:log_file] || "stdin") %></b></td>
|
56
|
+
</tr>
|
57
|
+
<tr>
|
58
|
+
<th>Log size</th>
|
59
|
+
<td><%= data[:log_size][0][0] %></td>
|
60
|
+
</tr>
|
61
|
+
<tr>
|
62
|
+
<th>Self poll entries</th>
|
63
|
+
<td><%= data[:selfpolls_size][0][0] %></td>
|
64
|
+
</tr>
|
65
|
+
<tr>
|
66
|
+
<th>Crawlers</th>
|
67
|
+
<td><%= data[:crawlers_size][0][0] %></td>
|
68
|
+
</tr>
|
69
|
+
<tr>
|
70
|
+
<th>Entries considered</th>
|
71
|
+
<td><%= data[:total_hits][0][0] %></td>
|
72
|
+
</tr>
|
73
|
+
</tbody>
|
74
|
+
</table>
|
75
|
+
</article>
|
76
|
+
</div>
|
43
77
|
|
44
78
|
<% @reports = [
|
45
79
|
{ title: "Daily Distribution", header: ["Day", "Hits", "Visits", "Size"], rows: data[:daily_distribution] },
|
@@ -49,30 +83,37 @@
|
|
49
83
|
{ title: "404 on HTML Files", header: ["Path", "Hits", "Visitors"], rows: data[:missed_pages] },
|
50
84
|
{ title: "404 on other Resources", header: ["Path", "Hits", "Visitors"], rows: data[:missed_resources] },
|
51
85
|
{ title: "Attacks", header: ["Path", "Hits", "Visitors"], rows: data[:attacks] },
|
86
|
+
{ },
|
52
87
|
{ title: "Statuses", header: ["Status", "Count"], rows: data[:statuses] },
|
53
88
|
{ title: "Daily Statuses", header: ["Status", "2xx", "3xx", "4xx"], rows: data[:statuses_by_day] },
|
54
89
|
{ title: "Browsers", header: ["Browser", "Hits", "Visitors", "Size"], rows: data[:browsers] },
|
55
90
|
{ title: "Platforms", header: ["Platform", "Hits", "Visitors", "Size"], rows: data[:platforms] },
|
91
|
+
{ title: "Referers", header: ["Referers", "Hits", "Visitors", "Size"], rows: data[:referers], col: "col-12" },
|
56
92
|
{ title: "IPs", header: ["IPs", "Hits", "Visitors", "Size"], rows: data[:ips] },
|
57
|
-
{
|
93
|
+
{ },
|
58
94
|
]
|
59
95
|
%>
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
96
|
+
<div class="columns">
|
97
|
+
<% @reports.each do |report| %>
|
98
|
+
<div class="column <%= report[:col] || "col-6" %>">
|
99
|
+
<article>
|
100
|
+
<% if report[:title] != nil %>
|
101
|
+
<h2><%= report[:title] %></h2>
|
102
|
+
<%= render "output_table", report %>
|
103
|
+
<% end %>
|
104
|
+
</article>
|
105
|
+
</div>
|
106
|
+
<% end %>
|
107
|
+
</div>
|
66
108
|
|
67
109
|
<article>
|
68
110
|
<h2>Streaks</h2>
|
69
111
|
|
70
|
-
<table class="streaks">
|
112
|
+
<table class="table streaks">
|
71
113
|
<thead>
|
72
114
|
<tr>
|
73
115
|
<th>IP</th>
|
74
|
-
<th>Day</th>
|
75
|
-
<th>URL</th>
|
116
|
+
<th>Day and URL</th>
|
76
117
|
</tr>
|
77
118
|
</thead>
|
78
119
|
<tbody>
|
@@ -92,105 +133,85 @@
|
|
92
133
|
</table>
|
93
134
|
</article>
|
94
135
|
|
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
|
-
<td><%= data[:ended_at].to_s %></td>
|
175
|
-
</tr>
|
176
|
-
<tr>
|
177
|
-
<th>Duration (sec)</th>
|
178
|
-
<td><%= "%.1f" % data[:duration] %></td>
|
179
|
-
</tr>
|
180
|
-
<tr>
|
181
|
-
<th>Duration (min)</th>
|
182
|
-
<td><%= "%d" % (data[:duration] / 60 ) %></td>
|
183
|
-
</tr>
|
184
|
-
<tr>
|
185
|
-
<th>Log size</th>
|
186
|
-
<td><%= data[:log_size][0][0] %></td>
|
187
|
-
</tr>
|
188
|
-
<tr>
|
189
|
-
<th>Lines/sec</th>
|
190
|
-
<td><%= "%.2f" % (data[:log_size][0][0] / data[:duration]) %></td></tr>
|
191
|
-
</tbody>
|
192
|
-
</table>
|
193
|
-
</article>
|
136
|
+
<div class="columns">
|
137
|
+
<div class="column col-6">
|
138
|
+
<article>
|
139
|
+
<h2>Command Invocation</h2>
|
140
|
+
|
141
|
+
<table class="table command-invocation">
|
142
|
+
<tbody>
|
143
|
+
<tr>
|
144
|
+
<th>CLI Command</th>
|
145
|
+
<td><pre><%= data[:command] %></pre></td>
|
146
|
+
</tr>
|
147
|
+
<tr>
|
148
|
+
<th>Input file</th>
|
149
|
+
<td><code><%= (data[:log_file] || "stdin") %></code></td>
|
150
|
+
</tr>
|
151
|
+
<tr>
|
152
|
+
<th>Ignore crawlers</th>
|
153
|
+
<td><code><%= options[:ignore_crawlers] %></code></td></tr>
|
154
|
+
<tr>
|
155
|
+
<th>Only crawlers</th>
|
156
|
+
<td><code><%= options[:only_crawlers] %></code></td>
|
157
|
+
</tr>
|
158
|
+
<tr>
|
159
|
+
<th>No selfpoll</th>
|
160
|
+
<td><code><%= options[:no_selfpoll] %></code></td>
|
161
|
+
</tr>
|
162
|
+
<tr>
|
163
|
+
<th>Filter by date</th>
|
164
|
+
<td>
|
165
|
+
<code><%= (options[:from_date] != nil or options[:to_date] != nil) %></code>
|
166
|
+
</td>
|
167
|
+
</tr>
|
168
|
+
<tr>
|
169
|
+
<th>Prefix</th>
|
170
|
+
<td><code><%= @prefix %></code></td>
|
171
|
+
</tr>
|
172
|
+
<tr>
|
173
|
+
<th>Suffix</th>
|
174
|
+
<td><code><%= @suffix %></code></td>
|
175
|
+
</tr>
|
176
|
+
</tbody>
|
177
|
+
</table>
|
178
|
+
</article>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<div class="column col-6">
|
182
|
+
<article>
|
183
|
+
<h2> Performance</h2>
|
184
|
+
|
185
|
+
<table class="table performance">
|
186
|
+
<tbody>
|
187
|
+
<tr>
|
188
|
+
<th>Analysis started at</th>
|
189
|
+
<td><%= data[:started_at].to_s %></td>
|
190
|
+
</tr>
|
191
|
+
<tr>
|
192
|
+
<th>Analysis ended at</th>
|
193
|
+
<td><%= data[:ended_at].to_s %></td>
|
194
|
+
</tr>
|
195
|
+
<tr>
|
196
|
+
<th>Duration (sec)</th>
|
197
|
+
<td><%= "%.1f" % data[:duration] %></td>
|
198
|
+
</tr>
|
199
|
+
<tr>
|
200
|
+
<th>Duration (min)</th>
|
201
|
+
<td><%= "%d" % (data[:duration] / 60 ) %></td>
|
202
|
+
</tr>
|
203
|
+
<tr>
|
204
|
+
<th>Log size</th>
|
205
|
+
<td><%= data[:log_size][0][0] %></td>
|
206
|
+
</tr>
|
207
|
+
<tr>
|
208
|
+
<th>Lines/sec</th>
|
209
|
+
<td><%= "%.2f" % (data[:log_size][0][0] / data[:duration]) %></td></tr>
|
210
|
+
</tbody>
|
211
|
+
</table>
|
212
|
+
</article>
|
213
|
+
</div>
|
214
|
+
</div>
|
194
215
|
</section>
|
195
216
|
</body>
|
196
217
|
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apache_log_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adolfo Villafiorita
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: Generate
|
69
|
+
description: Generate requests reports in HTML, OrgMode, and SQLite format from an
|
70
|
+
Apache log file.
|
70
71
|
email:
|
71
72
|
- adolfo.villafiorita@ict4g.net
|
72
73
|
executables:
|
@@ -121,5 +122,5 @@ requirements: []
|
|
121
122
|
rubygems_version: 3.2.22
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
|
-
summary: Generate
|
125
|
+
summary: Generate analytics from an Apache log file.
|
125
126
|
test_files: []
|