ActiveMQ and auditing

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ and auditing

Irwin, Allen - DEN
Hello,

I'm running 5.15.9 ActiveMQ on Windows as a service.

I'm trying to turn on Auditing and I found your webpage https://activemq.apache.org/audit-logging

However I can't find the  line to uncomment as mentioned on the webpage (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS -Dorg.apache.activemq.audit=true") anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat file under bin, but is this batch file even being used when you run ActiveMQ as a service on Windows as it's running wrapper.exe?

I do see the empty audit.log file so it looks like auditing is all setup, I just need to find out how to turn it on?  Anyone know how to turn on Auditing when running ActiveMQ as a service on Windows?

Thanks,

Allen
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ and auditing

Tim Bain
I've not run under Windows, but my understanding was that the wrapper calls
the batch script which runs the JVM. So I'd have expected changing the
batch file to have the effect you're looking for.

Your question didn't make it clear whether you had tried doing that. Did
you try it and it didn't work? If you didn't try it, I'd recommend you
start with that.

Tim

On Wed, Oct 23, 2019, 11:38 AM Irwin, Allen - DEN <[hidden email]>
wrote:

> Hello,
>
> I'm running 5.15.9 ActiveMQ on Windows as a service.
>
> I'm trying to turn on Auditing and I found your webpage
> https://activemq.apache.org/audit-logging
>
> However I can't find the  line to uncomment as mentioned on the webpage
> (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS -Dorg.apache.activemq.audit=true")
> anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat file
> under bin, but is this batch file even being used when you run ActiveMQ as
> a service on Windows as it's running wrapper.exe?
>
> I do see the empty audit.log file so it looks like auditing is all setup,
> I just need to find out how to turn it on?  Anyone know how to turn on
> Auditing when running ActiveMQ as a service on Windows?
>
> Thanks,
>
> Allen
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ and auditing

Irwin, Allen - DEN
Thanks for the reply Tim

I looked in the wrapper.conf for something indicating it called the batch file and could find nothing.

So between that and the fact there's several batch files, none of which have that line the documentation says to uncomment, I didn't try guessing.

I was actually hoping for a fast definitive response, particularly since the documentation is wrong, but doesn't look like that's going to happen.

Thanks again, I'll give that a try.

Allen

________________________________
From: Tim Bain <[hidden email]>
Sent: Wednesday, October 23, 2019, 9:04 PM
To: ActiveMQ Users
Subject: Re: ActiveMQ and auditing

I've not run under Windows, but my understanding was that the wrapper calls
the batch script which runs the JVM. So I'd have expected changing the
batch file to have the effect you're looking for.

Your question didn't make it clear whether you had tried doing that. Did
you try it and it didn't work? If you didn't try it, I'd recommend you
start with that.

Tim

On Wed, Oct 23, 2019, 11:38 AM Irwin, Allen - DEN <[hidden email]>
wrote:

> Hello,
>
> I'm running 5.15.9 ActiveMQ on Windows as a service.
>
> I'm trying to turn on Auditing and I found your webpage
> https://activemq.apache.org/audit-logging
>
> However I can't find the  line to uncomment as mentioned on the webpage
> (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS -Dorg.apache.activemq.audit=true")
> anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat file
> under bin, but is this batch file even being used when you run ActiveMQ as
> a service on Windows as it's running wrapper.exe?
>
> I do see the empty audit.log file so it looks like auditing is all setup,
> I just need to find out how to turn it on?  Anyone know how to turn on
> Auditing when running ActiveMQ as a service on Windows?
>
> Thanks,
>
> Allen
>

Reply | Threaded
Open this post in threaded view
|

RE: ActiveMQ and auditing

Irwin, Allen - DEN
Well I tried adding -Dorg.apache.activemq.audit=true to ACTIVEMQ_OPTS in activemq.bat.  I then added and deleted a few queues and my audit.log file stayed enmpty.  So I'm assuming that was not the way to turn auditing on.

Can I get some assistance on this?  Auditing is there, it looks like the documentation is wrong, all I need to do is to know how to turn it on!

Thanks,

Allen

-----Original Message-----
From: Irwin, Allen - DEN <[hidden email]>
Sent: Thursday, October 24, 2019 8:20 AM
To: [hidden email]
Subject: Re: ActiveMQ and auditing

Thanks for the reply Tim

I looked in the wrapper.conf for something indicating it called the batch file and could find nothing.

So between that and the fact there's several batch files, none of which have that line the documentation says to uncomment, I didn't try guessing.

I was actually hoping for a fast definitive response, particularly since the documentation is wrong, but doesn't look like that's going to happen.

Thanks again, I'll give that a try.

Allen

________________________________
From: Tim Bain <[hidden email]>
Sent: Wednesday, October 23, 2019, 9:04 PM
To: ActiveMQ Users
Subject: Re: ActiveMQ and auditing

I've not run under Windows, but my understanding was that the wrapper calls the batch script which runs the JVM. So I'd have expected changing the batch file to have the effect you're looking for.

Your question didn't make it clear whether you had tried doing that. Did you try it and it didn't work? If you didn't try it, I'd recommend you start with that.

Tim

On Wed, Oct 23, 2019, 11:38 AM Irwin, Allen - DEN <[hidden email]>
wrote:

> Hello,
>
> I'm running 5.15.9 ActiveMQ on Windows as a service.
>
> I'm trying to turn on Auditing and I found your webpage
> https://activemq.apache.org/audit-logging
>
> However I can't find the  line to uncomment as mentioned on the
> webpage (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS
> -Dorg.apache.activemq.audit=true")
> anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat
> file under bin, but is this batch file even being used when you run
> ActiveMQ as a service on Windows as it's running wrapper.exe?
>
> I do see the empty audit.log file so it looks like auditing is all
> setup, I just need to find out how to turn it on?  Anyone know how to
> turn on Auditing when running ActiveMQ as a service on Windows?
>
> Thanks,
>
> Allen
>

Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ and auditing

jbertram
It's worth noting that the "-Dorg.apache.activemq.audit=true" parameter is
just a normal Java system property that simply needs to be specified on the
Java command-line. There's nothing magical about having it a script file. I
don't have a Windows VM or box handy, but looking at wrapper.conf I see
there are number of lines where other "-D" parameters are being set, e.g.:

  wrapper.java.additional.1=-Dactivemq.home="%ACTIVEMQ_HOME%"
  wrapper.java.additional.2=-Dactivemq.base="%ACTIVEMQ_BASE%"
  wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password

I imagine you can just simply add another one of those, e.g.:

  wrapper.java.additional.13=-Dorg.apache.activemq.audit=true

Try that and see how it goes.


Justin

On Thu, Oct 24, 2019 at 1:17 PM Irwin, Allen - DEN <
[hidden email]> wrote:

> Well I tried adding -Dorg.apache.activemq.audit=true to ACTIVEMQ_OPTS in
> activemq.bat.  I then added and deleted a few queues and my audit.log file
> stayed enmpty.  So I'm assuming that was not the way to turn auditing on.
>
> Can I get some assistance on this?  Auditing is there, it looks like the
> documentation is wrong, all I need to do is to know how to turn it on!
>
> Thanks,
>
> Allen
>
> -----Original Message-----
> From: Irwin, Allen - DEN <[hidden email]>
> Sent: Thursday, October 24, 2019 8:20 AM
> To: [hidden email]
> Subject: Re: ActiveMQ and auditing
>
> Thanks for the reply Tim
>
> I looked in the wrapper.conf for something indicating it called the batch
> file and could find nothing.
>
> So between that and the fact there's several batch files, none of which
> have that line the documentation says to uncomment, I didn't try guessing.
>
> I was actually hoping for a fast definitive response, particularly since
> the documentation is wrong, but doesn't look like that's going to happen.
>
> Thanks again, I'll give that a try.
>
> Allen
>
> ________________________________
> From: Tim Bain <[hidden email]>
> Sent: Wednesday, October 23, 2019, 9:04 PM
> To: ActiveMQ Users
> Subject: Re: ActiveMQ and auditing
>
> I've not run under Windows, but my understanding was that the wrapper
> calls the batch script which runs the JVM. So I'd have expected changing
> the batch file to have the effect you're looking for.
>
> Your question didn't make it clear whether you had tried doing that. Did
> you try it and it didn't work? If you didn't try it, I'd recommend you
> start with that.
>
> Tim
>
> On Wed, Oct 23, 2019, 11:38 AM Irwin, Allen - DEN <
> [hidden email]>
> wrote:
>
> > Hello,
> >
> > I'm running 5.15.9 ActiveMQ on Windows as a service.
> >
> > I'm trying to turn on Auditing and I found your webpage
> > https://activemq.apache.org/audit-logging
> >
> > However I can't find the  line to uncomment as mentioned on the
> > webpage (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS
> > -Dorg.apache.activemq.audit=true")
> > anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat
> > file under bin, but is this batch file even being used when you run
> > ActiveMQ as a service on Windows as it's running wrapper.exe?
> >
> > I do see the empty audit.log file so it looks like auditing is all
> > setup, I just need to find out how to turn it on?  Anyone know how to
> > turn on Auditing when running ActiveMQ as a service on Windows?
> >
> > Thanks,
> >
> > Allen
> >
>
>
Reply | Threaded
Open this post in threaded view
|

RE: ActiveMQ and auditing

Irwin, Allen - DEN
Hello Justin,

Thanks, that worked!

Thanks again!

Allen

-----Original Message-----
From: Justin Bertram <[hidden email]>
Sent: Thursday, October 24, 2019 1:11 PM
To: [hidden email]
Subject: Re: ActiveMQ and auditing

It's worth noting that the "-Dorg.apache.activemq.audit=true" parameter is just a normal Java system property that simply needs to be specified on the Java command-line. There's nothing magical about having it a script file. I don't have a Windows VM or box handy, but looking at wrapper.conf I see there are number of lines where other "-D" parameters are being set, e.g.:

  wrapper.java.additional.1=-Dactivemq.home="%ACTIVEMQ_HOME%"
  wrapper.java.additional.2=-Dactivemq.base="%ACTIVEMQ_BASE%"
  wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password

I imagine you can just simply add another one of those, e.g.:

  wrapper.java.additional.13=-Dorg.apache.activemq.audit=true

Try that and see how it goes.


Justin

On Thu, Oct 24, 2019 at 1:17 PM Irwin, Allen - DEN < [hidden email]> wrote:

> Well I tried adding -Dorg.apache.activemq.audit=true to ACTIVEMQ_OPTS
> in activemq.bat.  I then added and deleted a few queues and my
> audit.log file stayed enmpty.  So I'm assuming that was not the way to turn auditing on.
>
> Can I get some assistance on this?  Auditing is there, it looks like
> the documentation is wrong, all I need to do is to know how to turn it on!
>
> Thanks,
>
> Allen
>
> -----Original Message-----
> From: Irwin, Allen - DEN <[hidden email]>
> Sent: Thursday, October 24, 2019 8:20 AM
> To: [hidden email]
> Subject: Re: ActiveMQ and auditing
>
> Thanks for the reply Tim
>
> I looked in the wrapper.conf for something indicating it called the
> batch file and could find nothing.
>
> So between that and the fact there's several batch files, none of
> which have that line the documentation says to uncomment, I didn't try guessing.
>
> I was actually hoping for a fast definitive response, particularly
> since the documentation is wrong, but doesn't look like that's going to happen.
>
> Thanks again, I'll give that a try.
>
> Allen
>
> ________________________________
> From: Tim Bain <[hidden email]>
> Sent: Wednesday, October 23, 2019, 9:04 PM
> To: ActiveMQ Users
> Subject: Re: ActiveMQ and auditing
>
> I've not run under Windows, but my understanding was that the wrapper
> calls the batch script which runs the JVM. So I'd have expected
> changing the batch file to have the effect you're looking for.
>
> Your question didn't make it clear whether you had tried doing that.
> Did you try it and it didn't work? If you didn't try it, I'd recommend
> you start with that.
>
> Tim
>
> On Wed, Oct 23, 2019, 11:38 AM Irwin, Allen - DEN <
> [hidden email]>
> wrote:
>
> > Hello,
> >
> > I'm running 5.15.9 ActiveMQ on Windows as a service.
> >
> > I'm trying to turn on Auditing and I found your webpage
> > https://activemq.apache.org/audit-logging
> >
> > However I can't find the  line to uncomment as mentioned on the
> > webpage (ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS
> > -Dorg.apache.activemq.audit=true")
> > anywhere.  I do see the variable ACTIVEMQ_OPTS in the activemq.bat
> > file under bin, but is this batch file even being used when you run
> > ActiveMQ as a service on Windows as it's running wrapper.exe?
> >
> > I do see the empty audit.log file so it looks like auditing is all
> > setup, I just need to find out how to turn it on?  Anyone know how
> > to turn on Auditing when running ActiveMQ as a service on Windows?
> >
> > Thanks,
> >
> > Allen
> >
>
>