summaryrefslogtreecommitdiffstats
path: root/doc/book-enea-edge-getting-started/doc/log_collector.xml
blob: 1148dc203dc84eadfd77dc999f5313711b5e7343 (plain)
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="log_collector">
  <title>Using the Log Collector</title>

  <para>Troubleshooting problems on a uCPE device require an analysis of a set
  of data and information i.e. logs collected from the uCPE device and/or the
  Enea Edge Management application. The following information describes how
  the log collection mechanism works.</para>

  <section id="log_collect_ucpem">
    <title>Log collecting using the Enea Edge Management application</title>

    <para>The Enea Edge Management application allows for collecting a set of
    logs and state information from a uCPE device.</para>

    <section id="log_collect">
      <title>Collecting the Logs</title>

      <para>Collect the necessary log files and system details, then create an
      archive (a tar file) on the uCPE device in the
      <filename>/var/odm/log/archives</filename> folder:</para>

      <orderedlist>
        <listitem>
          <para>Access <emphasis role="bold">Operations</emphasis> and then
          select <emphasis role="bold">Collect Debug Logs</emphasis>.</para>
        </listitem>

        <listitem>
          <para>Provide a file name in the new window.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">Execute</emphasis>
          button.</para>

          <para>A success message is shown in the same window as shown below.
          At this moment, the process of collecting logs on the uCPE device
          starts.</para>
        </listitem>

        <figure>
          <title>Collecting Debug Logs</title>

          <mediaobject>
            <imageobject>
              <imagedata align="center" contentwidth="500"
                         fileref="images/collect_debug_logs.png" />
            </imageobject>
          </mediaobject>
        </figure>
      </orderedlist>

      <note>
        <para>It might take some time for the archive to be created. When the
        operation completes, a "CollectLogsComplete" notification is sent from
        the uCPE device to the Enea Edge Management application. This can be
        viewed in the GUI in the <emphasis role="bold">Faults</emphasis> menu,
        after selecting <emphasis role="bold">Events</emphasis>.</para>

        <figure>
          <title>Collecting Debug Logs</title>

          <mediaobject>
            <imageobject>
              <imagedata align="center" contentwidth="500"
                         fileref="images/fault_events.png" />
            </imageobject>
          </mediaobject>
        </figure>
      </note>
    </section>

    <section id="view_logs">
      <title>View collected Logs</title>

      <para>A list with the archives containing already collected logs will be
      shown in the <emphasis role="bold">Device File Listing</emphasis>
      table:</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Files</emphasis> menu and
          select the <emphasis role="bold">Download</emphasis> button.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">List</emphasis> button.</para>

          <figure>
            <title>Device File Listing Table</title>

            <mediaobject>
              <imageobject>
                <imagedata align="center" contentwidth="500"
                           fileref="images/archive_list.png" />
              </imageobject>
            </mediaobject>
          </figure>
        </listitem>
      </orderedlist>

      <note>
        <para>If the filename you specified does not appear, it might still be
        in the process of creation. Click on the <emphasis
        role="bold">Refresh</emphasis> icon at the bottom of the table until
        you can see the desired file listing.</para>
      </note>
    </section>

    <section id="download_fr_dev">
      <title>Downloading Logs from the uCPE Device</title>

      <para>This option transfers a debug file archive from the uCPE device to
      Enea Edge Management application.</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Files</emphasis> menu and
          select the <emphasis role="bold">Download</emphasis> button.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">List</emphasis> button.</para>
        </listitem>

        <listitem>
          <para>In the <emphasis role="bold">Device File Listing</emphasis>
          table, select the archive you want to download from the uCPE device
          to Enea Edge Management.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">Download from
          Device</emphasis> button.</para>

          <para>The archive will be downloaded from the uCPE device and stored
          on the Enea Edge Management application.</para>
        </listitem>
      </orderedlist>

      <note>
        <para>The archive will not be deleted from the uCPE device after
        download.</para>
      </note>
    </section>

    <section id="download_logs_locally">
      <title>Downloading collected Logs locally</title>

      <para>This option downloads a logs archive from the Enea Edge Management
      application to a local (user) machine for analysis. The archive must
      first be available in the Enea Edge Management application in order to
      be downloaded.</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Devices</emphasis> menu and
          select <emphasis role="bold">Files</emphasis>.</para>
        </listitem>

        <listitem>
          <para>Select the <emphasis role="bold">Downloaded Files</emphasis>
          tab.</para>
        </listitem>

        <listitem>
          <para>Select an archive from the <emphasis role="bold">Downloaded
          Files</emphasis> table.</para>
        </listitem>

        <listitem>
          <para>Click the <emphasis role="bold">Download</emphasis>
          button.</para>

          <para>The file will be downloaded in the download folder of the
          supported browser in use.</para>

          <figure>
            <title>Downloaded Files Table</title>

            <mediaobject>
              <imageobject>
                <imagedata align="center" contentwidth="500"
                           fileref="images/download_files.png" />
              </imageobject>
            </mediaobject>
          </figure>
        </listitem>
      </orderedlist>
    </section>

    <section id="delete_log_archive_dev">
      <title>Deleting a Logs Archive from a uCPE device</title>

      <para>Use this option when you want to delete unnecessary collected logs
      on a uCPE device.</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Files</emphasis> menu and
          then click the <emphasis role="bold">Download</emphasis>
          button.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">List</emphasis> button.</para>
        </listitem>

        <listitem>
          <para>In the <emphasis role="bold">Device File Listing</emphasis>
          table, select the archive you want to delete from the uCPE
          device.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">Delete</emphasis>
          button.</para>

          <para>The archive will be deleted from the uCPE device and the table
          will be updated.</para>
        </listitem>
      </orderedlist>

      <para>The same can be achieved using these alternative options:</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Operations</emphasis> menu
          and select <emphasis role="bold">Delete Debug Log
          Archive</emphasis>.</para>
        </listitem>

        <listitem>
          <para>Provide a file name in the new window.</para>
        </listitem>

        <listitem>
          <para>Press the <emphasis role="bold">Execute</emphasis>
          button.</para>

          <para>A success message is displayed if the file is deleted from the
          uCPE device correctly.</para>
        </listitem>
      </orderedlist>
    </section>

    <section id="delete_archives_ucpem">
      <title>Deleting a Logs Archive from the Enea Edge Management
      application</title>

      <para>This option deletes a logs archive from the Enea Edge Management
      application.</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Devices</emphasis> menu, then
          select <emphasis role="bold">Files</emphasis>.</para>
        </listitem>

        <listitem>
          <para>Select the <emphasis role="bold">Downloaded Files</emphasis>
          tab.</para>
        </listitem>

        <listitem>
          <para>Select an archive from the <emphasis role="bold">Downloaded
          Files</emphasis> table.</para>
        </listitem>

        <listitem>
          <para>Click the <emphasis role="bold">Delete</emphasis>
          button.</para>

          <para>The file will be deleted from the Enea Edge Management
          application and the table will be updated.</para>
        </listitem>
      </orderedlist>

      <note>
        <para>Deleting the logs file from the Enea Edge Management application
        does not affect the file located on the uCPE device.</para>
      </note>
    </section>

    <section condition="hidden" id="enable_disable_via_perms">
      <title>Enabling/Disabling the Log Collector via Permissions</title>

      <para>To disable the ability to access/download the uCPE device's
      debug-log files from the Enea Edge Management application, the
      appropriate permissions must be changed:</para>

      <orderedlist>
        <listitem>
          <para>Access the <emphasis role="bold">Security</emphasis> menu,
          then select <emphasis role="bold">Configuration</emphasis>.</para>
        </listitem>

        <listitem>
          <para>Click the <emphasis role="bold">Security Groups</emphasis>
          tab.</para>
        </listitem>

        <listitem>
          <para>Click the desired group.</para>
        </listitem>

        <listitem>
          <para>Click the <emphasis role="bold">Permissions</emphasis> tab on
          the right side.</para>
        </listitem>

        <listitem>
          <para>Click the <emphasis role="bold">Devices</emphasis> tab like in
          the image below.</para>
        </listitem>

        <listitem>
          <para>Change the <emphasis role="bold">Device File
          Management</emphasis> option to <emphasis
          role="bold">none</emphasis> to disable the feature.</para>
        </listitem>
      </orderedlist>

      <figure>
        <title>Device File Management</title>

        <mediaobject>
          <imageobject>
            <imagedata align="center" contentwidth="500"
                       fileref="images/dev_file_mg.png" />
          </imageobject>
        </mediaobject>
      </figure>
    </section>

    <section id="download_ucpemg_logs">
      <title>Downloading Enea Edge Management Logs</title>

      <para>Often, sending the Enea Edge Management logs together with
      collected uCPE device logs to the support team provides important
      information for troubleshooting (especially in cases of connectivity
      issues with the uCPE device and error popups).</para>

      <para>Enea Edge Management log files are located in
      <filename>application/logs/</filename> in the Enea Edge Management
      application's installation folder
      (e.g.<filename>/opt/ems/ucpemanager/application/logs</filename>). They
      can be copied from that location, or they can be downloaded using the
      Enea Edge Management GUI by performing the following:</para>

      <orderedlist>
        <listitem>
          <para>Access <emphasis role="bold">Test</emphasis>, then <emphasis
          role="bold">Debug Settings</emphasis> and select the <emphasis
          role="bold">Log Files</emphasis> tab.</para>
        </listitem>

        <listitem>
          <para>Select the desired log file
          (<filename>ucpemanager.log</filename> or
          <filename>watchdog.log</filename>) and press the <emphasis
          role="bold">Download</emphasis> button.</para>
        </listitem>

        <listitem>
          <para>A new (blank) popup window opens and the file is downloaded
          locally. This popup can be closed after the download.</para>
        </listitem>

        <listitem>
          <para>Repeat steps 2. And 3. Until all the desired log files have
          been downloaded</para>
        </listitem>
      </orderedlist>

      <figure>
        <title>Debug Settings</title>

        <mediaobject>
          <imageobject>
            <imagedata align="center" contentwidth="500"
                       fileref="images/debug_settings.png" />
          </imageobject>
        </mediaobject>
      </figure>
    </section>
  </section>

  <section id="log_collect_no_ucpem">
    <title>Log collecting without using the Enea Edge Management
    application</title>

    <para>Log collection from uCPE Devices can also be done when there is no
    Enea Edge Management connection. A SSH connection to the uCPE Device is
    needed for use of the log collector script, which can be found in the uCPE
    Device file system in <literal>/usr/local/enea/</literal>.</para>

    <para>The Log collector script takes relevant information about the system
    and collects it in an archive:</para>

    <programlisting>./log-collector.sh -p &lt;LOG_PATHh&gt; -n &lt;ARCHIVE_NAME&gt;</programlisting>

    <para>Where <literal>-p</literal> is the path where the log archive will
    be saved, and <literal>-n</literal> is the archive name.</para>

    <note>
      <para>If <literal>-p</literal> is not provided, the default path will be
      used: <literal>/var/logcollector</literal>. If <literal>-n</literal> is
      not provided, the default name will be used:
      <filename>log_archive_&lt;timestamp&gt;.tar.gz</filename>.</para>
    </note>

    <para>To access the help menu of the script:</para>

    <programlisting>./log-collector.sh -h</programlisting>
  </section>
</chapter>