You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@wellsfargo.com.INVALID on 2023/07/06 20:22:57 UTC

OT: Question regarding the listeners in the upcoming releases.

I have a question which is based around the idea of the new Listeners that are being introduced in the upcoming releases. This is based on something I’ve been thinking on for the last 6 to 9 mos. Would it be possible to have a Listener that could output stats for the Tomcat Instance, similar to what you would see in the Manager application? Not wanting any of the actual Manager functionality, just the status reporting features. Something that could be consumed by Elastic to go into a dashboard showing Instance/Application health? I really don’t want to deploy the Manager Application just to get this type of data.

Thanks. I know this is a long shot question and this is where NOT being a developer blows. 😊

Thank you,

Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexander@wellsfargo.com<ma...@wellsfargo.com>
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.


Re: OT: Question regarding the listeners in the upcoming releases.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jon,

On 7/7/23 15:46, jonmcalexander@wellsfargo.com.INVALID wrote:
> Thank you Chris. I will look into Manager + JMXProxyServlet. Dumb
> question, but does this require the Manager.war to be deployed (Isn't
> that just to get to the UI?)
Yes, the Manager application must be deployed. You do not have to allow 
any users to use the GUI, though, if you don't want to give users the 
required role(s).

> or does it call the Catalina Manager servlet directly?
The servlet is in the Manager application. It's not in the Tomcat core.

> Is there any documentation around this type of setup?

Yep: have a look at the Manager application docs and let me know if 
something isn't clear. The docs are kind of thin, so if you think there 
is room for improvement, I'd be happy to have you augment what's there 
and I can commit a docs-update.

-chris

>> -----Original Message-----
>> From: Christopher Schultz <ch...@christopherschultz.net>
>> Sent: Friday, July 7, 2023 2:05 PM
>> To: users@tomcat.apache.org
>> Subject: Re: OT: Question regarding the listeners in the upcoming releases.
>>
>> Jon,
>>
>> On 7/7/23 1:06 PM, jonmcalexander@wellsfargo.com.INVALID wrote:
>>> Yes, I'm aware that JMX may be the easiest method, however to use it
>>> means modifying the JAVA_OPTIONS as well as having a username and
>>> password as well as to meet our internal requirements, an ssl
>>> certificate for the jmx connection.
>> You can use Manager + JMXProxyServlet which IMHO is way better than
>> "regular JMX"... for all the reasons you mention above.
>>
>>> What I'm looking for, if possible, is the addition of a
>>> connector/valve, whatever method, in the server.xml. My thinking would
>>> be to have it only accessible via localhost and not on the general
>>> network. Again, something that can query and put the results out for
>>> Elastic to ingest and make use of.
>> You can do this with Manager + JMXProxyServlet and no new code needs to
>> be written (other than your script to request the data and push it to Elastic).
>>
>> -chris
>>
>>>> -----Original Message-----
>>>> From: Christopher Schultz <ch...@christopherschultz.net>
>>>> Sent: Friday, July 7, 2023 8:39 AM
>>>> To: users@tomcat.apache.org
>>>> Subject: Re: OT: Question regarding the listeners in the upcoming
>> releases.
>>>>
>>>> Jon,
>>>>
>>>> On 7/6/23 16:22, jonmcalexander@wellsfargo.com.INVALID wrote:
>>>>> I have a question which is based around the idea of the new
>>>>> Listeners that are being introduced in the upcoming releases. This
>>>>> is based on something I’ve been thinking on for the last 6 to 9 mos.
>>>>> Would it be possible to have a Listener that could output stats for
>>>>> the Tomcat Instance, similar to what you would see in the Manager
>> application?
>>>>> Not wanting any of the actual Manager functionality, just the status
>>>>> reporting features. Something that could be consumed by Elastic to
>>>>> go into a dashboard showing Instance/Application health? I really
>>>>> don’t want to deploy the Manager Application just to get this type of
>> data.
>>>>>
>>>>> Thanks. I know this is a long shot question and this is where NOT
>>>>> being a developer blows. 😊
>>>>
>>>> I would do this using JMX from a remote querying agent, at whatever
>>>> interval you want. No Listener required.
>>>>
>>>> -chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: OT: Question regarding the listeners in the upcoming releases.

Posted by jo...@wellsfargo.com.INVALID.
Thank you Chris. I will look into Manager + JMXProxyServlet. Dumb question, but does this require the Manager.war to be deployed (Isn't that just to get to the UI?), or does it call the Catalina Manager servlet directly? Is there any documentation around this type of setup?

Thanks again and have a great Weekend!

Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexander@wellsfargo.com
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.

> -----Original Message-----
> From: Christopher Schultz <ch...@christopherschultz.net>
> Sent: Friday, July 7, 2023 2:05 PM
> To: users@tomcat.apache.org
> Subject: Re: OT: Question regarding the listeners in the upcoming releases.
> 
> Jon,
> 
> On 7/7/23 1:06 PM, jonmcalexander@wellsfargo.com.INVALID wrote:
> > Yes, I'm aware that JMX may be the easiest method, however to use it
> > means modifying the JAVA_OPTIONS as well as having a username and
> > password as well as to meet our internal requirements, an ssl
> > certificate for the jmx connection.
> You can use Manager + JMXProxyServlet which IMHO is way better than
> "regular JMX"... for all the reasons you mention above.
> 
> > What I'm looking for, if possible, is the addition of a
> > connector/valve, whatever method, in the server.xml. My thinking would
> > be to have it only accessible via localhost and not on the general
> > network. Again, something that can query and put the results out for
> > Elastic to ingest and make use of.
> You can do this with Manager + JMXProxyServlet and no new code needs to
> be written (other than your script to request the data and push it to Elastic).
> 
> -chris
> 
> >> -----Original Message-----
> >> From: Christopher Schultz <ch...@christopherschultz.net>
> >> Sent: Friday, July 7, 2023 8:39 AM
> >> To: users@tomcat.apache.org
> >> Subject: Re: OT: Question regarding the listeners in the upcoming
> releases.
> >>
> >> Jon,
> >>
> >> On 7/6/23 16:22, jonmcalexander@wellsfargo.com.INVALID wrote:
> >>> I have a question which is based around the idea of the new
> >>> Listeners that are being introduced in the upcoming releases. This
> >>> is based on something I’ve been thinking on for the last 6 to 9 mos.
> >>> Would it be possible to have a Listener that could output stats for
> >>> the Tomcat Instance, similar to what you would see in the Manager
> application?
> >>> Not wanting any of the actual Manager functionality, just the status
> >>> reporting features. Something that could be consumed by Elastic to
> >>> go into a dashboard showing Instance/Application health? I really
> >>> don’t want to deploy the Manager Application just to get this type of
> data.
> >>>
> >>> Thanks. I know this is a long shot question and this is where NOT
> >>> being a developer blows. 😊
> >>
> >> I would do this using JMX from a remote querying agent, at whatever
> >> interval you want. No Listener required.
> >>
> >> -chris
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: OT: Question regarding the listeners in the upcoming releases.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jon,

On 7/7/23 1:06 PM, jonmcalexander@wellsfargo.com.INVALID wrote:
> Yes, I'm aware that JMX may be the easiest method, however to use it
> means modifying the JAVA_OPTIONS as well as having a username and
> password as well as to meet our internal requirements, an ssl
> certificate for the jmx connection.
You can use Manager + JMXProxyServlet which IMHO is way better than 
"regular JMX"... for all the reasons you mention above.

> What I'm looking for, if possible, is the addition of a
> connector/valve, whatever method, in the server.xml. My thinking
> would be to have it only accessible via localhost and not on the
> general network. Again, something that can query and put the results
> out for Elastic to ingest and make use of.
You can do this with Manager + JMXProxyServlet and no new code needs to 
be written (other than your script to request the data and push it to 
Elastic).

-chris

>> -----Original Message-----
>> From: Christopher Schultz <ch...@christopherschultz.net>
>> Sent: Friday, July 7, 2023 8:39 AM
>> To: users@tomcat.apache.org
>> Subject: Re: OT: Question regarding the listeners in the upcoming releases.
>>
>> Jon,
>>
>> On 7/6/23 16:22, jonmcalexander@wellsfargo.com.INVALID wrote:
>>> I have a question which is based around the idea of the new Listeners
>>> that are being introduced in the upcoming releases. This is based on
>>> something I’ve been thinking on for the last 6 to 9 mos. Would it be
>>> possible to have a Listener that could output stats for the Tomcat
>>> Instance, similar to what you would see in the Manager application?
>>> Not wanting any of the actual Manager functionality, just the status
>>> reporting features. Something that could be consumed by Elastic to go
>>> into a dashboard showing Instance/Application health? I really don’t
>>> want to deploy the Manager Application just to get this type of data.
>>>
>>> Thanks. I know this is a long shot question and this is where NOT
>>> being a developer blows. 😊
>>
>> I would do this using JMX from a remote querying agent, at whatever interval
>> you want. No Listener required.
>>
>> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: OT: Question regarding the listeners in the upcoming releases.

Posted by jo...@wellsfargo.com.INVALID.
Hi Chris,

Yes, I'm aware that JMX may be the easiest method, however to use it means modifying the JAVA_OPTIONS as well as having a username and password as well as to meet our internal requirements, an ssl certificate for the jmx connection.

What I'm looking for, if possible, is the addition of a connector/valve, whatever method, in the server.xml. My thinking would be to have it only accessible via localhost and not on the general network. Again, something that can query and put the results out for Elastic to ingest and make use of.

Note, still just brainstorming, so I don't have all connections fully made here.

Thanks,

Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexander@wellsfargo.com
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.

> -----Original Message-----
> From: Christopher Schultz <ch...@christopherschultz.net>
> Sent: Friday, July 7, 2023 8:39 AM
> To: users@tomcat.apache.org
> Subject: Re: OT: Question regarding the listeners in the upcoming releases.
> 
> Jon,
> 
> On 7/6/23 16:22, jonmcalexander@wellsfargo.com.INVALID wrote:
> > I have a question which is based around the idea of the new Listeners
> > that are being introduced in the upcoming releases. This is based on
> > something I’ve been thinking on for the last 6 to 9 mos. Would it be
> > possible to have a Listener that could output stats for the Tomcat
> > Instance, similar to what you would see in the Manager application?
> > Not wanting any of the actual Manager functionality, just the status
> > reporting features. Something that could be consumed by Elastic to go
> > into a dashboard showing Instance/Application health? I really don’t
> > want to deploy the Manager Application just to get this type of data.
> >
> > Thanks. I know this is a long shot question and this is where NOT
> > being a developer blows. 😊
> 
> I would do this using JMX from a remote querying agent, at whatever interval
> you want. No Listener required.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


Re: OT: Question regarding the listeners in the upcoming releases.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jon,

On 7/6/23 16:22, jonmcalexander@wellsfargo.com.INVALID wrote:
> I have a question which is based around the idea of the new Listeners
> that are being introduced in the upcoming releases. This is based on
> something I’ve been thinking on for the last 6 to 9 mos. Would it be
> possible to have a Listener that could output stats for the Tomcat
> Instance, similar to what you would see in the Manager application?
> Not wanting any of the actual Manager functionality, just the status
> reporting features. Something that could be consumed by Elastic to go
> into a dashboard showing Instance/Application health? I really don’t
> want to deploy the Manager Application just to get this type of
> data.
> 
> Thanks. I know this is a long shot question and this is where NOT
> being a developer blows. 😊

I would do this using JMX from a remote querying agent, at whatever
interval you want. No Listener required.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org