Help with logging

Hello,
I want to monitor my OpenVPN clients to see when they are connected\disconnect in order to get some statistics
so I thought I will create a logging and send connected\disconnected messages - then I will do the math .

So I want to save only this messages:

09:50:31 ovpn,info <ovpn-test>: disconnected
09:53:30 ovpn,info <ovpn-test>: connected

is this the setting for the logging?
did I understand it correct?

/system logging action
add name=openvpn target=memory
/system logging
add action=openvpn prefix=info topics=ovpn,!packet,!account,!debug

Yes that will work, but you might see other messages too which are “info” level messages.
As far as I know, you cannot make a specific FILTER based on the message-content itself ; that would be even more flexibel.