Table of Contents

Qnaplog plugin

This plugin reads the Qnap logs (connections or events).

The plugin dont disturb the standby of the Qnap. Only when the log files are changed, the plugin reads the sqlite database.


Settings

Plugin QnapLog {
#    database '/etc/logs/conn.log'	# if none, /etc/logs/conn.log is assumed
}

Will be implemented in the future.

Functions

qnaplog::conn(f)call qnaplog::conn() and return field <fconn>
qnaplog::event(f)call qnaplog::event() and return field <fevent>

The field 'fconn' can have the following values:

FieldDescription
ressourcedescription of ressource (filename etc.
ipip address of the user
typetype like Information, Warning, Error
actionaction like Read, Write, Add, Delete
servconnection like HTTP, Samba, SSH
username of the user
computername of the connected computer
timeaccess time
dateaccess date

The field 'fevent' can have the following values:

FieldDescription
username of the user
computername of the connected computer
descriptiondescription of the event
ipip address of the user
typetype like Information, Warning, Error
timeaccess time
dateaccess date

Examples

Widget QnaplogActionFile {
    class 'Text'
    expression qnaplog::conn('action').': '.qnaplog::conn('ressource')
    width 20
    foreground '0000bbff'
    align 'M'
    speed 200
    update 1000
}

Example result: 'Read: home/data/file.txt'

Widget QnaplogDate {
    class 'Text'
    expression qnaplog::conn('date')
    prefix 'Date: '
    width 20
    foreground '0000bbff'
    align 'L'
    update 1000
}

Example result: 'Date: 2009-04-25'

Widget QnapEventDesc {
    class 'Text'
    expression qnaplog::event('description')
    prefix 'Event: '
    width 20
    foreground '0000bbff'
    align 'M'
    speed 200
    update 1000
}

Example result: 'Event: HDD SMART: HDD 1 Quick Test started.'