Difference between revisions of "Tailon"

From Amahi Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
The configuration file can be modified to add or remove log files as needed. Currently, it provides for several log files. Only files that exist will be displayed in the web browser.
 
The configuration file can be modified to add or remove log files as needed. Currently, it provides for several log files. Only files that exist will be displayed in the web browser.
  
The default configuration is shown below ('''NOTE:''' recommend not making any changed to lines 1, 3, or 4 as it could break the application):
+
The default configuration is shown below ('''NOTE:''' DO NOT making any changes to lines 1, 3, or 4 as it will break the application):
  
 
<pre>
 
<pre>
bind: 0.0.0.0:5000         # address and port to bind on
+
bind: 0.0.0.0:5000               # address and port to bind on
allow-transfers: true       # allow log file downloads
+
allow-transfers: true           # allow log file downloads
follow-names: false         # allow tailing of not-yet-existent files
+
follow-names: false             # allow tailing of not-yet-existent files
relative-root: /           # web app root path (default: '')
+
relative-root: /                 # web app root path (default: '')
commands: [tail, grep, awk] # allowed commands
+
commands: [tail, grep, awk, sed] # allowed commands
tail-lines: 10             # number of lines to tail initially
+
tail-lines: 10                   # number of lines to tail initially
wrap-lines: true           # initial line-wrapping state
+
wrap-lines: true                 # initial line-wrapping state
  
 
files:
 
files:
   - 'Amahi':               # it's possible to add sub-sections
+
   - 'Amahi':                     # it's possible to add sub-sections
 
       - '/var/log/amahi-app-installer.log'
 
       - '/var/log/amahi-app-installer.log'
 
       - '/var/log/greyhole.log'
 
       - '/var/log/greyhole.log'
Line 37: Line 37:
 
       - '/var/log/boot.log'
 
       - '/var/log/boot.log'
 
       - '/var/log/cron'
 
       - '/var/log/cron'
       - '/var/log/dnf.log'
+
       - '/var/log/dnf.rpm.log'
 
       - '/var/log/maillog'
 
       - '/var/log/maillog'
 
       - '/var/log/messages'
 
       - '/var/log/messages'
Line 46: Line 46:
 
       - '/var/log/tailon.log'
 
       - '/var/log/tailon.log'
 
    
 
    
http-auth: basic           # enable authentication (optional)
+
http-auth: basic                 # enable authentication (optional)
users:                     # password access (optional)
+
users:                           # password access (optional)
 
   admin: admin
 
   admin: admin
 
</pre>
 
</pre>
Line 68: Line 68:
 
Once complete, restart the service:
 
Once complete, restart the service:
 
  sudo systemctl restart tailon
 
  sudo systemctl restart tailon
 
  
 
Check the service status to ensure there are no errors:
 
Check the service status to ensure there are no errors:

Latest revision as of 01:12, 27 August 2019

Overview

Tailon is an application that tails log files in the web browser. User authentication is required by default to prevent unauthorized access.

The application is preconfigured with many log files, but can be customized for addditional log files if needed.

Configuration

Configuration File Location: /var/hda/web-apps/tailon/html/tailon.yaml

The configuration file can be modified to add or remove log files as needed. Currently, it provides for several log files. Only files that exist will be displayed in the web browser.

The default configuration is shown below (NOTE: DO NOT making any changes to lines 1, 3, or 4 as it will break the application):

bind: 0.0.0.0:5000               # address and port to bind on
allow-transfers: true            # allow log file downloads
follow-names: false              # allow tailing of not-yet-existent files
relative-root: /                 # web app root path (default: '')
commands: [tail, grep, awk, sed] # allowed commands
tail-lines: 10                   # number of lines to tail initially
wrap-lines: true                 # initial line-wrapping state

files:
  - 'Amahi':                     # it's possible to add sub-sections
      - '/var/log/amahi-app-installer.log'
      - '/var/log/greyhole.log'
      - '/var/log/amahi-sync.log'
      - '/var/log/amahi-anywhere.log'
      - '/var/log/hda-updates.log'
      - '/var/hda/platform/html/log/production.log'
  - 'Apache':
      - '/var/log/httpd/*_log'
  - 'Samba':
      - '/var/log/samba/?mbd.log'
  - 'MariaDB':
      - '/var/log/mariadb/mariadb.log'      
  - 'System':
      - '/var/log/boot.log'
      - '/var/log/cron'
      - '/var/log/dnf.rpm.log'
      - '/var/log/maillog'
      - '/var/log/messages'
      - '/var/log/monit.log'
      - '/var/log/openvpn-status.log'
      - '/var/log/secure'
  - 'Tailon':
      - '/var/log/tailon.log'
  
http-auth: basic                 # enable authentication (optional)
users:                           # password access (optional)
  admin: admin

Log Files

Log files can be added, removed, or changed by updating the configuration file. Optionally, logs can be grouped together using sub-sections. By grouping, it determines the order they appear in the application. If grouping is not used, logs will appear in the drop down list in alphabetical order.

To include new log files, follow the format as follows (grouped; indent 2 spaces for group, 4 for the log):

  - 'MyLog':
    - 'path/to/log/filename'

or (ungrouped; indent 2 spaces for the log)

  - 'path/to/log/filename'

Once complete, restart the service:

sudo systemctl restart tailon

Check the service status to ensure there are no errors:

sudo systemctl status tailon

Authentication

Users/Passwords can be added, removed, or changed by modifying the configuration file. Follow the format for the default user/password.

If no authentication is desired, comment out the following lines as such (precede line with #):

#http-auth: basic            # enable authentication (optional)
#users:                      # password access (optional)
#  admin: admin

Restart the service to apply the changes:

sudo systemctl restart tailon

Check the service status to ensure there are no errors:

sudo systemctl status tailon

Troubleshooting

If you have any issues, recommend you verify there are no errors in the configuration file. Most often a missing, incorrect, or stray operand is the culprit.