...
When an uncontrolled file closure occurs, such as an
switch-over or system failure, this footer may not be present.
How to Set Up SFTP from
...
to a CDR ServerIf the CDR server is configured, SBC
transfers the files through SFTP to the configured destination.
If transfer fails, ACT files begin to accumulate. When SBC accumulates the maximum number of configured files, it deletes the oldest unsuccessfully transferred files first. Therefore, these files are lost. The trap sonusCpEventLogFileCountNotification - MAJOR indicates that the number of event log files (in this case accounting files) is approaching the configured maximum per fileCount
parameter. There are different reasons for unsuccessful transfer, which includes network errors, insufficient bandwidth, disk capacity issues on destination, bad configuration, and so on. Therefore, this trap can be used to prevent the loss of accounting or billing data. Note |
---|
CDR files are removed when the fileCount configured for oam eventLog typeAdmin acct is reached. (see Event Log - CLI for configuration details) |
Note |
---|
The accounting files (in this case .ACT files) can be copied to the event log directory, which increases the file count (all .ACT files count toward total number). SBC application does not have knowledge of that copied file and cannot automatically delete the manually copied files. For example, 100000A.ACT is copied to 100000A-backup-debug-special-project.ACT. |
To create the CDR server, use the following command syntax:
Code Block |
---|
|
% set oam accounting cdrServer admin [primary | secondary] connectionTimeout <numeric: 15 to 600 seconds> filePrefix <name of SBC> ipAddress <ip address> password <password for ftp user> path <directory to ftp to> transferTimeout <numeric: 15 to 600 seconds> username <username of ftp user> |
An example to show the CDR server configuration and check the configuration is as follows: Code Block |
---|
|
admin@SBC01> config
admin@SBC01% set oam accounting cdrServer admin primary connectionTimeout 15 filePrefix SBC01 ipAddress 10.10.211.10 password sonus path /export/home/SBC01ACTrecs/ transferTimeout 15 username root
admin@SBC01% commit
admin@SBC01% quit
admin@SBC01> show table oam accounting cdrServer admin
FILE CONNECTION TRANSFER
TYPE IP ADDRESS USERNAME PASSWORD PATH PREFIX TIMEOUT TIMEOUT
--------------------------------------------------------------------------------------------------------------
primary 10.10.211.10 root $3$qaO71mBy8l8= /export/home/SBC01ACTrecs/ SBC01 15 15
[ok][2013-10-02 06:14:49]
admin@SBC01> |
Initially, the accounting field is not set to ftp or automatically roll over. Use the following command to view Rollover setting for accounting (See "acct" row in the example):
Div |
---|
|
Code Block |
---|
| admin@SBC01> show table oam eventLog typeAdmin
MESSAGE FILE SYSLOG SYSLOG SYSLOG RENAME
FILE FILE QUEUE SAVE FILTER ROLLOVER START ROLLOVER ROLLOVER WRITE SYSLOG REMOTE REMOTE REMOTE OPEN
TYPE STATE COUNT SIZE SIZE TO LEVEL TIME INTERVAL ROLLOVER TYPE ACTION MODE STATE HOST PROTOCOL PORT FILES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
system enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
debug enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
trace enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
acct enabled 16 64000 32 disk info - 0 nonrepetitive stop optimize disabled 0.0.0.0 tcp 514 disabled
security enabled 16 16000 32 disk major - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
audit enabled 32 2048 10 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
packet enabled 32 2048 10 disk major - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
[ok][2013-10-02 06:41:58] |
|
To create the accounting file rollover and ftp, use the following command syntax:
Code Block |
---|
|
% set oam eventLog typeAdmin acct rolloverStartTime <CCYY-MM-DDTHH:MM:SS> rolloverInterval <number of seconds between each file rollover> rolloverType repetitive rolloverAction start
where 'T' in 'DDTHH' is a constant used to indicate the Time follows. |
An example of the configuration and display of the accounting file rollover and ftp is as follows: Div |
---|
|
Code Block |
---|
| admin@SBC01% set oam eventLog typeAdmin acct rolloverStartTime 2013-10-02T06:30:00 rolloverInterval 900 rolloverType repetitive rolloverAction start
[ok][2013-10-02 06:41:25]
[edit]
admin@SBC01% commit
Commit complete.
[ok][2013-10-02 06:41:28]
[edit]
admin@SBC01% quit
admin@SBC01> show table oam eventLog typeAdmin
MESSAGE FILE SYSLOG SYSLOG SYSLOG RENAME
FILE FILE QUEUE SAVE FILTER ROLLOVER START ROLLOVER ROLLOVER WRITE SYSLOG REMOTE REMOTE REMOTE OPEN
TYPE STATE COUNT SIZE SIZE TO LEVEL TIME INTERVAL ROLLOVER TYPE ACTION MODE STATE HOST PROTOCOL PORT FILES
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
system enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
debug enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
trace enabled 16 16000 32 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
acct enabled 16 64000 32 disk info 2013-10-02T06:30:00 900 repetitive start optimize disabled 0.0.0.0 tcp 514 disabled
security enabled 16 16000 32 disk major - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
audit enabled 32 2048 10 disk info - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
packet enabled 32 2048 10 disk major - 0 nonrepetitive stop default disabled 0.0.0.0 tcp 514 disabled
[ok][2013-10-02 06:41:58] |
|
View CDR Server status using the following command:
Code Block |
---|
|
admin@SBC01> show table oam accounting cdrServer status
SUCCESSFUL FAILED PENDING
TYPE STATE PROGRESS TRANSFERS TRANSFERS TRANSFERS
-------------------------------------------------------------
primary active done 3 0 0
[ok][2013-10-02 07:27:19] |
Verify that the files were transferred to the FTP server by logging in to the CDR server and executing the following command:
Code Block |
---|
|
ftp server:
root@hostname # pwd
/export/home/SBC01ACTrecs
root@hostname # ls -l
total 708
-rw-r--r-- 1 root other 346730 Oct 2 06:45 SBC01.20131002064500.1000022.ACT
-rw-r--r-- 1 root other 175 Oct 2 07:00 SBC01.20131002070000.1000023.ACT
-rw-r--r-- 1 root other 175 Oct 2 07:15 SBC01.20131002071500.1000024.ACT
root@hostname # |
Execute the following command to view the successful and failed CDR file transfer:
Code Block |
---|
|
% show table oam accounting cdrServer status
SUCCESSFUL FAILED PENDING
TYPE STATE PROGRESS TRANSFERS TRANSFERS TRANSFERS
---------------------------------------------------------
primary active done 2 0 0
secondary standby idle 0 7 0 |
...