-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCloud-Application_Data-Java_Logs.html
283 lines (257 loc) · 11.9 KB
/
Cloud-Application_Data-Java_Logs.html
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html>
<html lang="en">
<head>
<title>Logscape Cloud Support</title>
<link href="css/style-app.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style-app.css" rel="stylesheet">
<link href="css/cloud-app.css" rel="stylesheet">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular-1.2.9/angular.min.js"></script>
<script src="js/angular-1.2.9/angular-animate.min.js"></script>
<script src="js/angular-1.2.9/angular-route.min.js"></script>
<script src="js/app/controllers.js"> </script>
<script src="js/cloud-breadcrumb.js"></script>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script>
$(document).ready(function(){
navigation_bind();
});
function navigation_bind(){
$(".menu p").click(function() {
$(".submenu").each(function() {
$(this).attr("style", "display:none");
});
parent = $(this).parent();
ul = parent.find("ul");
ul.attr("style", "display:block");
});
}
</script>
<script>
function submit_form(){
var q=$("#searchBox").val()
q=encodeURIComponent(q)
var query="https://www.google.com/?gws_rd=cr&q=site:logscape.github.io+#q=site:logscape.github.io+"+q
var location = window.location.href;
console.log("back:" + location);
history.pushState({},"",location);
window.location.replace(query);
}
</script>
<script>
$( document ).ready(function() {
$("#cseSubmit").on("click",function(e){
e.preventDefault();
submit_form();
});
$("#searchBox").on("keypress",function(e){
if (e.keyCode == 13) {
e.preventDefault();
submit_form()
}
});
});
</script>
</head>
<body>
<div style="width:100%;height:85px;background-color:#2980B9;">
<!--div
a(href="/") Documentation
a(href="") Forums |
a(href="") Getting Started |
a(href="") Logscape |
-->
<div style="padding-left:100px;padding-top:20px"><img src="images/logscapecloud.png" style="height:45px">
<div style="float:right" class="col-md-3">
<form id="cse-search-box" action="" style="position:right;padding-top:5px;padding-bottom:5px" onSubmit="submit_form()"></form>
<input type="hidden" name="cx" value="015161349156186070243:ktxh8djpql8">
<input type="hidden" name="ie" value="UTF-8">
<input id="searchBox" type="text" name="q" size="31" style="margin-left:15px">
<input id="cseSubmit" type="submit" value=" " class="btn-search">
</div>
</div>
</div>
<div id="navdiv" style="width:100%;height:40px;background-color:#EEE;box-shadow: 0 0 2px #999;">
<div style="padding-left:70px;padding-top:10px"><a href="/index.html">Support | </a><a href="http://logscape.activeboard.com/">Forums | </a><a href="/apps.html">Apps | </a><a href="http://www.logscape.com">Logscape.com </a>
<div id="google_translate_element" class="float-right display-inline"> </div>
</div>
</div>
<div style="" class="row">
<div style="" class="col-md-2 nav-padding">
<hr>
<ul class="menu nav nav-tabs nav-stacked">
<li><a href="Cloud-Introduction.html">Introduction</a>
<ul class="menu nav nav-tabs nav-stacked active open">
<!--lia(href="cloud-welcome.html") Welcome to Logscape
-->
<li><a href="Cloud-Introduction-Full_Stack_Monitoring.html">Full Stack Monitoring</a></li>
<li><a href="Cloud-Introduction-Getting_Started.html">Getting Started </a></li>
</ul>
</li><a href="Cloud-Stream_Your_Data.html">Stream Your Data </a>
<li><a href="Cloud-Stream_Your_Data-Syslog.html">▶ Syslog</a>
<!--div
ul.nav.nav-tabs.nav-stacked
li
a(href="cloud-syslog-ng.html") Syslog-NG
li
a(href="") System Logs
li
a(href="") Application Logs
-->
</li>
<li><a href="Cloud-Stream_Your_Data-NxLog.html">Nxlog </a></li>
<li><a href="Cloud-Stream_Your_Data-Collector.html">▶ Collector </a></li><a href="Cloud-System_Data.html">System Data </a>
<li><a href="Cloud-System_Data-Unix_Server.html">▶ Unix Server</a></li>
<!--li a(href="Cloud-System_Data-Unix_Server-Unix_System_Logs.html") Unix System Logs
-->
<!--li a(href="Cloud-System_Data-Unix_Server-Unix_Audit_Logs.html") Unix Audit Logs
-->
<li><a href="Cloud-System_Data-Windows_Server.html">▶ Windows Server </a></li>
<!--li a(href="Cloud-System_Data-Windows_Server-Windows_System_Logs.html") Windows Event Logs
-->
<!--mdli
a(href="Cloud-System_Data-Windows_Server-Windows_Audit_Logs.html") Windows Audit Logs
--><a href="Cloud-Application_Data.html">Application Data </a>
<li> <a href="Cloud-Application_Data-Java_Logs.html">Java Logs </a></li>
<!--li a(href="cloud-dotnet-logs.html") DotNet Logs
-->
<!--li
a(href="cloud-aws-logs.html") Amazon AWS
-->
<!--lia(href="cloud-iis-logs.html") IIS Logs
-->
<!--p Web Data-->
<li><a href="Cloud-Application_Data-Apache_Logs.html">Apache Logs</a></li>
<li><a href="Cloud-Application_Data-Nginx_Logs.html">Nginx Logs</a></li>
<li><a href="Cloud-Application_Data-Web_Logs.html">Web Logs</a></li><a href="Cloud-Network_Devices.html">Network Devices </a>
<li><a href="Cloud-Network_Devices-Juniper.html">Juniper</a></li>
<li> <a href="Cloud-Network_Devices-Cisco_ASA.html">Cisco ASA </a></li>
<!--p Logscape Configuration-->
<!--lia(href="cloud-alerts.html") Alerts
-->
<!--lia(href="cloud-workspaces.html") Creating a workspace
-->
<!--li
a(href="cloud-sub-user.html") Create a new team member
-->
</ul>
</div>
<div class="col-md-9 apps">
<div ng-app="docBrowserApp" class="row">
<div>
<h6 id="breadcrumb"></h6>
<h3>Configuring your Java Logs.</h3>
<p>Logscape supports the Log4j logging standing, if you're sending your Java logs into the cloud, then the default Log4J workspaces will give you an overview of problems in your Java application logs, including exceptions and warnings across your packages and threads.</p>
<div style="padding-left:65px;" class="images"><img src="/images/cloud-java-workspace.png" width="600" class="shadow">
<!--.side-box
h4 Configuring Fields
a(href="types-tutorial.html") Types Tutorial
br
a(href="types-fields.html") Fields
br
a(href="types-field_discovery.html") Field Discovery
br
a(href="types-field_grokit.html") Grokit Fields
br
a(href="types-system_fields.html") System Fields
br
-->
</div>
<h3>Stream your Java logs with Log4J</h3>
<p>In a couple of minutes it is possible to set up your log4J logs to be streamed to the Logscape Cloud, allow data visulation and analysis.</p><strong>1) Configure your Log4j syslog appender</strong>
<p>Java applications are capable of sending their log files via syslog directly to the Logscape cloud(Method 1), however the recomended method is to first forward these logs to a centralized syslog server(Method 2), below you can find configuration files for each method.</p>
<!--.image
img(src="/images/cloud-java-overview.png",width=600)
-->
<h4>Using a Central Syslog Server (method 1) </h4>
<p>Update your log4j properties file to send your log4j data to your central syslog server. The syslog server should already be configured to forward logs into the cloud. Follow the instrucitons on this <a href="Cloud-Stream_Your_Data-Syslog.html">page.</a></p>
<pre>log4j.rootLogger=INFO, SYSLOG
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.SyslogHost=[YOUR SYSLOG SERVER]
log4j.appender.SYSLOG.Facility=Local3
log4j.appender.SYSLOG.Header=true
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n</pre><br><br>
<h4>Direct into the Cloud (method 2)</h4>
<p>Log4j logs can be sent directly into the cloud. It only supports the UDP protocol and this is not the recommended method. </p>
<pre>log4j.rootLogger=INFO, UDP
log4j.appender.UDP=org.apache.log4j.net.SyslogAppender
log4j.appender.UDP.SyslogHost=collector.logscape.com:1468
log4j.appender.UDP.Facility=Local3
log4j.appender.UDP.Header=true
log4j.appender.UDP.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=LOGSCAPE_TOKEN=[YOUR TOKEN HERE] LOGSCAPE_TAG=Log4j %d [%t] %-5p %c - %m%n</pre><br><strong>3) Restart your java application. </strong>
<p>Make sure that your updated log4j properties file is the classpath and then restart your java application.</p>
<pre>java -cp log4j.properties:log4j-1.2.17.jar myJavaClass.class</pre><strong>step 4) Open the Log4j Workspace</strong>
<p>The Log4j workspace can be found <a href="http://cloud.logscape.com:8080/play/?Workspace=Log4j%20-%20Home">here.</a>Data should start arriving in a few minutes. This depends on the log level of your application. </p>
</div>
</div><br><br><br>
<div id="disqus_thread">
<script>
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'logscape'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</div>
</div>
</body>
</html>
<!--
.container
//
.navbar.navbar-fixed-top
.navbar-inner
.nav-collapse.collapse
ul.nav
li.active Main Support Site
li Explore Logscape Apps
li
a(href="") Download
h3 Logscape Apps
a(href="index.html") Getting Started |
a(href="http://support.liquidlabs.co.uk") Older Versions 1.3x Docs
.container-fluid
br
br
br
br
br
.row
.col-md-11(style="padding-left:100px")
block content
script(src="js/ga.js")
-->
<!--
//
.row
.col-md-2.nav-padding
br
ul
li
a(href="https://github.com/logscape/windowsapp#windowsapp-10") WindowsApp
li
a(href="https://github.com/logscape/unixapp#unixapp-10") UnixApp
li
a(href="https://github.com/logscape/coherenceapp#oraclecoherenceapp-10") Oracle Coherence App
li
a(href="https://github.com/logscape/javaapp#javaapp-10") JavaApp
li
a(href="https://github.com/logscape/vmwareapp#vmwareapp-10") VMWareApp
li
a(href="https://github.com/logscape/ciscoapp#ciscoapp-10") Cisco Devices
.col-md-10
block content
-->