Quote:
Originally Posted by mariosipad
@teejcee
Hmm, I never thought that I would learn something about scripting by using COPS 
|
Until retirement, I'd been in the computer game since the early 70's and
it was a dud day if I didn't learn something new. ( and still learning) .
Quote:
0 - I changed other_vhosts_access.log to access.log
1 - Using the line grep -e "200 2183" -e "200 2328" $LOGFILE > cops-log.txt didn't work for me.
a - neither 2183 nor 2328 showed up in my log file. But this was easily fixed with other (for me) matching numbers.
|
This would be because the LogFormat defined in apache2.conf for
vhosts would be different . I believe if you followed %>s with %0 in
your log definition, you'll get that field. If that doesn't work, try %b
Quote:
b - Logging into COPS with OPDS gave other numbers than logging into COPS from a browser. Did you take this into account in your script?
c - are you sure that one of these numbers isn't our old friend getJSON and double login log entries?
|
Hmmm, didn't consider OPDS....then again, I didn't tell my users about
it so it shouldn't matter. I'll try some testing & let you know.
I'm as sure as I can be about the codes. I did quite a bit of testing and viewed the original log file to work it out.
Mind you, I'd be a lot happier if I knew what those
byte counts represented.
Here is an edited sample output...
Quote:
01/Feb/2016:11:17:04 aaaaa 110.175.xx.xxx
01/Feb/2016:11:20:41 aaaaa 110.175.xx.xxx
01/Feb/2016:11:24:08 aaaaa 110.175.xx.xxx
01/Feb/2016:11:25:48 aaaaa 110.175.xx.xxx
01/Feb/2016:15:32:04 bbbbb 192.168.1.1
02/Feb/2016:12:21:11 ccccc 58.173.aa.aaa
02/Feb/2016:12:55:58 ccccc 58.173.aa.aaa
02/Feb/2016:19:04:41 ccccc 58.173.aa.aaa
03/Feb/2016:11:46:24 bbbbb 192.168.1.1
04/Feb/2016:11:51:45 bbbbb 192.168.1.1
04/Feb/2016:14:40:00 bbbbb 192.168.1.1
04/Feb/2016:14:41:08 bbbbb 192.168.1.1
04/Feb/2016:15:30:39 bbbbb 192.168.1.1
04/Feb/2016:15:31:57 bbbbb 192.168.1.1
04/Feb/2016:15:34:27 bbbbb 192.168.1.1
04/Feb/2016:15:40:56 bbbbb 192.168.1.1
|
I'll probably add the "200 2183" etc codes eventually.
edit.... I've tried to login with opds & couldn't.
I used url/feed.php . Is that correct?
Cheers,
TC