Configuration and day to day management of the Zycoo ZX Series IP-PBX is generally undertaken through Zycoo’s intuitive GUI interface. As of firmware 3.2 (ZX50 series) though, certain advanced functions such as configuring and viewing of system logs is undertaken through the system console.
By default, the ZX Series is set to record certain security information such as access to the console. However, if you wish to record more detailed system information including notices, warnings, errors or debug information, then this must be enabled within the system
The easiest way to view and configure system logs on a Zycoo Zx Series is through the use of WinSCP. This can be downloaded here – http://winscp.net/eng/index.php
Messages Log File
The default messages log records a limited amount of system and security information and is located in the persistent/var/log/ directory. This file is useful for identifying who has been accessing the device using the console. The following example details one such access entry located within the log file.
Dec 6 13:01:01 IPPBX cron.notice crond[312]: USER root pid 9562 cmd /bin/sh /etc/zycoo-gui/ntp.sh
Dec 6 13:09:42 IPPBX authpriv.info dropbear[12180]: Child connection from 192.168.4.4:57787
Dec 6 13:09:42 IPPBX authpriv.notice dropbear[12180]: main_inetd: ip=192.168.4.4,fail=0
Dec 6 13:09:52 IPPBX authpriv.notice dropbear[12180]: password auth succeeded for ‘root’ from 192.168.4.4:57787
The message log is automatically deleted every two days to ensure that excessive disk space is not consumed. To cancel the deletion of the messages file, the following file needs to be edited - /persistent/etc/config/root
Root contains the following configuration information:
# file is /etc/config/root
#Format:
#min hour day mon week shell-command
50 3 * * * /bin/rm -f /dead.letter
50 3 */2 * * /bin/rm -f /persistent/var/log/messages
01 * * * * /bin/sh /etc/zycoo-gui/ntp.sh
#50 2 * * Sun /bin/reboot
To cancel file deletion, change the relevant line to read the following and save the file:
#50 3 */2 * * /bin/rm -f /persistent/var/log/messages
Detailed logging
If you wish to enable logging of other system events such as notices and warning then this needs to be enabled. To achieve this, you need to edit the logger.conf file located in the /persistent/etc/asterisk/ directory.
In the logfiles section of the file, remove the ‘;’ before messages and save the file.
[logfiles]
;
; Format is “filename” and then “levels” of debugging to be included:
; debug
; notice
; warning
; error
; verbose
; dtmf
;
; Special filename “console” represents the system console
;
; We highly recommend that you DO NOT turn on debug mode if you are simply
; running a production system. Debug mode turns on a LOT of extra messages,
; most of which you are unlikely to understand without an understanding of
; the underlying code. Do NOT report debug messages as code issues, unless
; you have a specific issue that you are attempting to debug. They are
; messages for just that — debugging — and do not rise to the level of
; something that merit your attention as an Asterisk administrator. Debug
; messages are also very verbose and can and do fill up logfiles quickly;
; this is another reason not to have debug mode on a production system unless
; you are in the process of debugging a specific issue.
;
;debug => debug
console => notice,warning,error
;console => notice,warning,error,debug
messages => notice,warning,error
;full => notice,warning,error,debug,verbose
Note – You can also create a customised filename to log to if preferred. To achieve this, create an entry in the logfiles section of logger.conf as per the example below:
Myfile => notice,warning,error
This will create a file called myfile, which will hold notices, warnings and errors generated by the system.
To update the ZX Series with your changes, in the asterisk CLI, type ‘logger reload’
Information will now be written to the messages file (or customer file if created) located in the /persistent/mmc/asterisk/ directory (this location is defined in the /etc/asterisk/asterisk.conf file). The example below shows typical information written to this file:
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_8′ is now Reachable. (26ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_7′ is now Reachable. (585ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_5′ is now Reachable. (490ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_4′ is now Reachable. (379ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_1′ is now Reachable. (264ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ‘trunk_2′ is now Reachable. (146ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ’802′ is now Reachable. (28ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ’803′ is now Reachable. (125ms / 2000ms)
[Dec 6 22:05:50] NOTICE[597] chan_sip.c: Peer ’801′ is now Reachable. (27ms / 2000ms)