Topic: Logfile format
Hi, nice utility. Two questions: is it possible to log the size of the file transfer to the logfile? Most FTP servers would do that. Secondly, could someone explain each field of the log file?
Thanks,
BS
You are not logged in. Please login or register.
MySecureShell forum → Configuration → Logfile format
Hi, nice utility. Two questions: is it possible to log the size of the file transfer to the logfile? Most FTP servers would do that. Secondly, could someone explain each field of the log file?
Thanks,
BS
Hi,
1/ At this time you can't change anything in the log file ... should be improved in the future !
2/ Sample:
2008-02-16 18:20:30 [42]My message.
Format
"2008-02-16 18:20:30" -> Date (year-month-day hours-minutes-seconds)
"42" -> Pid of MySecureShell (help to follow one session of a user)
"My message." -> Text of the events
Best regards,
MySecureShell Team.
pareil pour moi
oups,
same for me.
I have to set up a specific logfiles analyser --> AwStats ( http://awstats.sourceforge.net )
This logfiles analyser config file, can be modified to match some logfile formats. But there are some required fields as :
- code
- bytesd
- methodurl (or method)
for exemple i tryed to modify AwStats to match MySecureShell log format but i could not do something less than this
LogFormat="%time2 %code %logname %host %methodurlnoprot %bytesd"
The problem is i get a perl error when i launch the AwStats.pl perl script because i think i can't handle the final ^[37:40:0m
But this is probably not this because i tried to edit the log file and replace all the ^[37:40:0m with "0000" and it said the same error about no more existing ^[37:40:0m !!!??
So i am very interrested to be able to modify the MySecureShell log format to make the both "MySecureShell" and "AwStats" work together.
Exemple of my MySecureShell logfile
2008-05-12 16:17:52 [32:40:1m[2304]New client [nathalie] from [192.168.0.2][37:40:0m
2008-05-12 14:18:32 [31:40:1m[2304][nathalie][192.168.0.2]Try to create directory '/projet-25' : success[37:40:0m
2008-05-12 16:20:52 [32:40:1m[2310]New client [nathalie] from [192.168.0.2][37:40:0m
2008-05-12 14:20:52 [34:40:1m[2310][nathalie][192.168.0.2]Upload into file '/projet-25/P25-52.JPG'[37:40:0m
2008-05-12 16:20:52 [32:40:1m[2312]New client [nathalie] from [192.168.0.2][37:40:0m
2008-05-12 16:20:52 [34:40:1m[2312][nathalie][192.168.0.2]Upload into file '/projet-25/P25-53.JPG'[37:40:0m
2008-05-12 14:20:53 [34:40:1m[2310][nathalie][192.168.0.2]Upload into file '/projet-25/P25-54.JPG'[37:40:0m
2008-05-12 16:20:53 [34:40:1m[2312][nathalie][192.168.0.2]Upload into file '/projet-25/P25-49.JPG'[37:40:0m
2008-05-12 14:20:54 [34:40:1m[2310][nathalie][192.168.0.2]Upload into file '/projet-25/P25-50.JPG'[37:40:0m
2008-05-12 16:20:54 [34:40:1m[2312][nathalie][192.168.0.2]Upload into file '/projet-25/P25-51.JPG'[37:40:0m
2008-05-12 14:21:03 [32:40:1m[2304][nathalie][192.168.0.2]Quit.[37:40:0m
Hi,
Try to recompile MySecureShell with:
./configure --with-logcolor=no
make
./install.sh fr
pareil pour moi
oups,
same for me.
I have to set up a specific logfiles analyser --> AwStats ( http://awstats.sourceforge.net )
This logfiles analyser config file, can be modified to match some logfile formats. But there are some required fields as :
- code
- bytesd
- methodurl (or method)for exemple i tryed to modify AwStats to match MySecureShell log format but i could not do something less than this
LogFormat="%time2 %code %logname %host %methodurlnoprot %bytesd"
The problem is i get a perl error when i launch the AwStats.pl perl script because i think i can't handle the final ^[37:40:0m
But this is probably not this because i tried to edit the log file and replace all the "^[37:40:0m" with "0000" and it said the same error about no more existing "^[37:40:0m" !!!??http://img510.imageshack.us/img510/5755 … bn0.th.jpg
So i am very interrested to be able to modify the MySecureShell log format to make the both "MySecureShell" and "AwStats" work together.
Exemple of my MySecureShell logfile
2008-04-14 19:16:24 [32:40:1m[2258]New client [alain] from [192.168.0.2][37:40:0m
2008-04-14 17:21:25 [32:40:1m[2258][alain][192.168.0.2]Connection time out[37:40:0m
2008-04-14 17:21:25 [32:40:1m[2258][alain][192.168.0.2]Quit.[37:40:0m
2008-04-14 19:52:13 [32:40:1m[2395]New client [alain] from [192.168.0.2][37:40:0m
2008-04-14 17:52:17 [32:40:1m[2395][alain][192.168.0.2]Quit.[37:40:0m
2008-04-14 20:01:18 [32:40:1m[2425]New client [alain] from [192.168.0.2][37:40:0m
2008-04-14 20:01:25 [32:40:1m[2425][alain][192.168.0.2]Quit.[37:40:0m
2008-04-14 20:02:54 [32:40:1m[2441]New client [alaintest] from [192.168.0.2][37:40:0m
2008-04-14 18:07:14 [32:40:1m[2441][alaintest][192.168.0.2]Quit.[37:40:0m
2008-04-14 20:30:16 [32:40:1m[2642]New client [alain] from [192.168.0.2][37:40:0m
2008-04-14 20:30:16 [31:40:7m[2642][alain][192.168.0.2]Couldn't go to home '/CHROOT_RSSH/home/alain' : No such file or directory[37:40:0m
2008-04-14 20:30:16 [31:40:7m[2642][alain][192.168.0.2]Couldn't chroot : No such file or directory[37:40:0m
2008-04-14 20:35:17 [32:40:1m[2642][alain][192.168.0.2]Quit.[37:40:0m
ok i'll try that
thank you
Hello again.
(AwStats logfile analyser is on a windows client
(MySecureShell server is on a debian
I just checked and i saw i installed from a package.
/var/cache/apt/archives/mysecureshell_1.0_i386.deb
How can i recompile from a package ? (sorry i am a newbinux)
edit :
I found that --> http://mysecureshell.sourceforge.net/fr … #question2
But i wonder if i must uninstall the package i installed before reinstalling from compiled sources.
another problem, the logs.
Before recompiling, i made a
cp /var/log/sftp-server.log /var/log/sftp-server.log_old
> /var/log/sftp-server.log
to empty them.
To compile i became root in my "/root/mysecureshell_1.0/" directory (.tar.gz archive i uncomressed)
i compiled with :
./configure --with-logfile=/var/log/sftp-server.log --with-logcolor=no
make all
After recompiling, i made :
cp -f MySecureShell /bin/MySecureShell && chmod 755 /bin/MySecureShell
I perform some sftp actions, but my logs remains desperatly empty.
something's broken
Problem :
I compiled --with-logcolor=no and it compiled with yes :-/
Sorry , it's :
./configure --without-logcolor=yes
i mean't "./configure" too but with color at "no" it didn't work. My logs are colored.
Hi,
After "./configure", just edit "config.h" and find the line with "HAVE_LOG_IN_COLOR" and delete it
Thank you teka, i'll try that.
MySecureShell forum → Configuration → Logfile format
Powered by PunBB, supported by Informer Technologies, Inc.