El vie, 26-10-2007 a las 13:15 +0530, Krishnendu Nandy escribió:
>
> How can I have Ebox mail me the HTTP access logs, so that I don't have to
> check it GUI.
There's a way to do so using the new eBox event framework [1]. The guide
explains there are two components, which work together, watchers and
dispatchers.
The watchers are the components which take care about something inside
eBox, in your case, a query on Squid logs, and the other element, the
dispatchers which are in charge of sending the event using a transport
method.
So, you may need to develop a Watcher which asks for logs to the squid
module. These lines could do so:
use EBox::Global;
my $logsMod = EBox::Global->modInstance('logs');
my $result = $logsMod->search('2007-11-25 2:22:0', # from
'2007-11-26 2:22:0', # to
'squid', # index
15, # page size
0, # page
'timestamp', # time column
undef); # filters
And then, develop a Dispatcher to send you a mail. You can use
Mail::Sender [2] to do so.
Best regards,
[1] http://ebox-platform.com/devguide/en/html-chunk/ch09.html
[2] http://search.cpan.org/~jenda/Mail-Sender-0.8.13/Sender.pm
_______________________________________________
Ebox-user mailing list
[email protected]
https://lists.warp.es/mailman/listinfo/ebox-user