tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Monitoring Tomcat
Date Sat, 02 Apr 2016 22:47:45 GMT
Anthony,

On 3/31/16 8:56 PM, Anthony Biacco wrote:
> On Wed, Mar 30, 2016 at 5:23 PM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
> 
>> Anthony,
>>
>> On 3/30/16 6:08 PM, Anthony Biacco wrote:
>>> On Wed, Mar 30, 2016 at 9:13 AM, Christopher Schultz <
>>> chris@christopherschultz.net> wrote:
>>>
>>> Edwin,
>>>
>>>
>>> For my money, I wouldn't enable JMX because, for monitoring, JMX is a
>>> heavy-handed protocol: you either have to maintain a persistent
>>> connection to the server or you need to launch a whole JVM and connect
>>> over JMX to get e.g. a single sample value (such as current throughput).
>>>
>>> I would recommend enabling the JMXProxyServlet through the manager
>>> application, and then locking-down the manager application so you can
>>> only access it from localhost. Also use a non-trivial password for
>>> HTTP authentication for the manager.
>>>
>>>
>>>> +1
>>>> i was using the jmxquery jar pulled from nagios and was slooow compared
>> to
>>>> the manager's jmxproxy (as would be expected).
>>>> i just used the the perl script from
>>>> https://wiki.apache.org/tomcat/FAQ/Monitoring and assigned a user to
>> the
>>>> manager-jmx security role in tomcat.
>>
>> Nice to see someone else is using it ;)
>>
>> Feel free to contribute to it or just complain about anything you need.
>> I'd like for that tool to be widely-useful. I use it a lot at $work, but
>> it should be universally useful.
>>
>> -chris
>>
> 
> I only changed some minor things.
> I removed the requirement for the -w and -c parameters, because i didn't
> need them. I just wanted the data. Sure I could have have just put in bogus
> values for them on the command line, but it just cluttered it up.

Gotcha.

> One problem i have is with returned data that's a number with a decimal in
> it (like 'OK - Attribute get 'java.lang:type=OperatingSystem' -
> ProcessCpuLoad = 0.009808796275369524'). It returned a Bad Response because
> $num was null. I tried a different regex for it, but i'm not very good with
> regex. :D
> I ended up just doing a "split ' = ', $content" to get the number.

What regular expression did you try?

How about this one:

^OK.*=\s*([0-9.]+)$

-chris

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


Mime
View raw message