[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-28 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17759525#comment-17759525
 ] 

Vikas Kumar commented on RANGER-4196:
-

Thanks [~dhavalshah9131] .

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-25 Thread Dhaval Shah (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17759138#comment-17759138
 ] 

Dhaval Shah commented on RANGER-4196:
-

Hi [~vikkumar],

Committed your patch in master branch.
https://github.com/apache/ranger/commit/f0ea284c5628ce30322245cbf07642cf5493b716

Thanks

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-24 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17758531#comment-17758531
 ] 

Vikas Kumar commented on RANGER-4196:
-

As per review comment, unit test cases added for the new source

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-22 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757841#comment-17757841
 ] 

Vikas Kumar commented on RANGER-4196:
-

[~bpatel] , Yes I will share this output from a test cluster.

Just to clarify, TOTAL_CALL_COUNT is the meter that counts all the requests 
coming to this KMS instance. You won't be able to exactly match exactly with 
other API call count as we don't count the health API calls plus  some other 
calls like many times, our request fails with 403 and then we get 200. Reason 
behind this is the Kerberos authentication.

But it can be matched with access logs.

 

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-22 Thread Bhavik Patel (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757796#comment-17757796
 ] 

Bhavik Patel commented on RANGER-4196:
--

Thanks [~vikkumar] .


{code:java}
"KMS": {
    "GET_CURRENT_KEY_COUNT": 0,
    "DELETE_KEY_ELAPSED_TIME": 0,
    "EEK_DECRYPT_ELAPSED_TIME": 0,
    "GET_KEYS_METADATA_ELAPSED_TIME": 0,
    "EEK_GENERATE_ELAPSED_TIME": 0,
    "GET_CURRENT_KEY_ELAPSED_TIME": 0,
    "EEK_REENCRYPT_ELAPSED_TIME": 0,
    "KEY_CREATE_COUNT": 0,
    "UNAUTHORIZED_CALLS_COUNT": 0,
    "KEY_CREATE_ELAPSED_TIME": 0,
    "GET_KEY_VERSION_COUNT": 0,
    "ROLL_NEW_VERSION_ELAPSED_TIME": 0,
    "REENCRYPT_EEK_BATCH_COUNT": 0,
    "REENCRYPT_EEK_BATCH_ELAPSED_TIME": 0,
    "GET_KEYS_METADATA_COUNT": 0,
    "GET_KEY_VERSIONS_COUNT": 0,
    "GET_KEY_VERSIONS_ELAPSED_TIME": 0,
    "GET_KEYS_COUNT": 0,
    "EEK_GENERATE_COUNT": 0,
    "INVALIDATE_CACHE_COUNT": 0,
    "GET_METADATA_COUNT": 0,
    "REENCRYPT_EEK_BATCH_KEYS_COUNT": 0,
    "EEK_REENCRYPT_COUNT": 0,
    "UNAUTHENTICATED_CALLS_COUNT": 3,
    "GET_KEY_VERSION_ELAPSED_TIME": 0,
    "INVALIDATE_CACHE_ELAPSED_TIME": 0,
    "ROLL_NEW_VERSION_COUNT": 0,
    "EEK_DECRYPT_COUNT": 0,
    "GET_KEYS_METADATA_KEYNAMES_COUNT": 0,
    "DELETE_KEY_COUNT": 0,
    "GET_KEYS_ELAPSED_TIME": 0,
    "GET_METADATA_ELAPSED_TIME": 0,
    "TOTAL_CALL_COUNT": 6
  }, {code}
Regarding the above output, can you perform some operations than get the 
metrics and then we can actually map operations with TOTAL_CALL_COUNT

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-22 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757463#comment-17757463
 ] 

Vikas Kumar commented on RANGER-4196:
-

New metrics added:
"RangerWebContainer": {
    "ActiveConnectionsCount": 2,
    "ConnectionTimeout": 6,
    "MaxWorkerThreadsCount": 200,
    "TotalWorkerThreadsCount": 10,
    "KeepAliveTimeout": 6,
    "ActiveWorkerThreadsCount": 0,
    "ConnectionAcceptCount": 100,
    "MinSpareWorkerThreadsCount": 10,
    "MaxConnectionsCount": 8192
  }
 

{*}Description{*}: A new segment "RangerWebContainer" added. And following 
metrics were added:
 # MaxConnectionsCount : {color:#505f79}Max configured tomcat connection count. 
{color}
 # ConnectionAcceptCount : {color:#505f79}The maximum queue length for incoming 
connection requests when all possible request processing threads are in use. 
Any requests received when the queue is full will be refused. The default value 
is 100.{color}
 # {color:#505f79}*ActiveConnectionsCount* : active connections count{color}
 # {color:#505f79}*ConnectionTimeout* : The number of milliseconds this 
*Connector* will wait, after accepting a connection, for the request URI line 
to be presented. Default is 60 sec.{color}
 # {color:#505f79}*KeepAliveTimeout* : The number of milliseconds this 
*Connector* will wait for another HTTP request before closing the connection. 
The default value is to use the value that has been set for the 
*connectionTimeout* attribute.{color}
 # {color:#505f79}*MaxWorkerThreadsCount* : The max worker(container) Threads 
allowed/configured. Default is 200 .{color}
 # {color:#505f79}*MinSpareWorkerThreadsCount:*  core pool size of the worker 
executor.{color}
 # {color:#505f79}T{*}otalWorkerThreadsCount:{*}  total number of worker/worker 
threads in the process, irrespective of their state. They might me sitting idle 
or processing any request.{color}
 # {color:#505f79}*ActiveWorkerThreadsCount* : active worker/worker threads 
count in the process. These number of workers are active and processing a 
request.{color}

{color:#505f79}I will also update the spreadsheet with more details.{color}

{color:#505f79}Requesting community to please review and provide your feedback. 
Thanks.{color}

{color:#505f79}CC: [~bpatel]  [~madhan] {color}

 

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-22 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17757450#comment-17757450
 ] 

Vikas Kumar commented on RANGER-4196:
-

Hi, 

Review request raised: [https://reviews.apache.org/r/74557/]

Testing: 
build is passed.
Patched the new jar on existing cluster and tried to fetch the kms metrics. 
Following is the output:

command: curl -ivk --negotiate -u : -H "Content-Type: application/json" -X GET 
[http://:9292/kms/metrics/json|http://%3Ckmsserver%3E:9292/kms/metrics/json]

Output:

{
  "KMS": \{
"GET_CURRENT_KEY_COUNT": 0,
"DELETE_KEY_ELAPSED_TIME": 0,
"EEK_DECRYPT_ELAPSED_TIME": 0,
"GET_KEYS_METADATA_ELAPSED_TIME": 0,
"EEK_GENERATE_ELAPSED_TIME": 0,
"GET_CURRENT_KEY_ELAPSED_TIME": 0,
"EEK_REENCRYPT_ELAPSED_TIME": 0,
"KEY_CREATE_COUNT": 0,
"UNAUTHORIZED_CALLS_COUNT": 0,
"KEY_CREATE_ELAPSED_TIME": 0,
"GET_KEY_VERSION_COUNT": 0,
"ROLL_NEW_VERSION_ELAPSED_TIME": 0,
"REENCRYPT_EEK_BATCH_COUNT": 0,
"REENCRYPT_EEK_BATCH_ELAPSED_TIME": 0,
"GET_KEYS_METADATA_COUNT": 0,
"GET_KEY_VERSIONS_COUNT": 0,
"GET_KEY_VERSIONS_ELAPSED_TIME": 0,
"GET_KEYS_COUNT": 0,
"EEK_GENERATE_COUNT": 0,
"INVALIDATE_CACHE_COUNT": 0,
"GET_METADATA_COUNT": 0,
"REENCRYPT_EEK_BATCH_KEYS_COUNT": 0,
"EEK_REENCRYPT_COUNT": 0,
"UNAUTHENTICATED_CALLS_COUNT": 3,
"GET_KEY_VERSION_ELAPSED_TIME": 0,
"INVALIDATE_CACHE_ELAPSED_TIME": 0,
"ROLL_NEW_VERSION_COUNT": 0,
"EEK_DECRYPT_COUNT": 0,
"GET_KEYS_METADATA_KEYNAMES_COUNT": 0,
"DELETE_KEY_COUNT": 0,
"GET_KEYS_ELAPSED_TIME": 0,
"GET_METADATA_ELAPSED_TIME": 0,
"TOTAL_CALL_COUNT": 6
  },
  "RangerWebContainer": \{
"ActiveConnectionsCount": 2,
"ConnectionTimeout": 6,
"MaxWorkerThreadsCount": 200,
"TotalWorkerThreadsCount": 10,
"KeepAliveTimeout": 6,
"ActiveWorkerThreadsCount": 0,
"ConnectionAcceptCount": 100,
"MinSpareWorkerThreadsCount": 10,
"MaxConnectionsCount": 8192
  },
  "RangerJvm": \{
"GcTimeTotal": 595,
"SystemLoadAvg": 10.21,
"ThreadsBusy": 5,
"GcCountTotal": 17,
"MemoryMax": 967311360,
"MemoryCurrent": 273806280,
"ThreadsWaiting": 17,
"ProcessorsAvailable": 4,
"GcTimeMax": 595,
"ThreadsBlocked": 0,
"ThreadsRemaining": 16
  }
}

Knowing the Tomcat connector type is also useful, so logged following on 
container startup.

2023-08-22 12:43:45,080 INFO  org.apache.ranger.server.tomcat.EmbeddedServer: 
[vktomcat-1.vktomcat.{*}_*_{*}*-startStop-1]: Selected Tomcat protocolHandler: 
"http-nio-9292"

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-08-16 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755043#comment-17755043
 ] 

Vikas Kumar commented on RANGER-4196:
-

Sorry [~bpatel] for the delay. Coding is completed, testing in-progress. Once 
done, I will upload the patch.

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-06-26 Thread Bhavik Patel (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737457#comment-17737457
 ] 

Bhavik Patel commented on RANGER-4196:
--

[~vikkumar] are you working on this?

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-04-21 Thread Vikas Kumar (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714927#comment-17714927
 ] 

Vikas Kumar commented on RANGER-4196:
-

No [~bpatel] . I explored the EmbeddedServer and Tomcat source code to obtain 
these details and I believe it should be doable.

 

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (RANGER-4196) Tomcat metrics collection

2023-04-20 Thread Bhavik Patel (Jira)


[ 
https://issues.apache.org/jira/browse/RANGER-4196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714631#comment-17714631
 ] 

Bhavik Patel commented on RANGER-4196:
--

[~vikkumar]  I think you might have gone through this: 
[https://www.ibm.com/docs/en/instana-observability/227?topic=technologies-monitoring-apache-tomcat]
 

> Tomcat metrics collection 
> --
>
> Key: RANGER-4196
> URL: https://issues.apache.org/jira/browse/RANGER-4196
> Project: Ranger
>  Issue Type: Improvement
>  Components: Ranger
>Reporter: Vikas Kumar
>Assignee: Vikas Kumar
>Priority: Major
>
> Like "JVM mterics" and other application metrics, Tomcat related metrics 
> would be very useful for following use cases:
> In case client gets "SoketTimeout" or Connection refused errors, having such 
> metrics at server end will really help triaging the issue.
> It should contain following metrics:
>  # maxAllowedConnection
>  # currentActiveConnectionCount
>  # ConnectionTimeout
>  # acceptCount
>  # maxContainerThreadsCount
>  # activeContainerThreadsCount
>  # minSpareThreadsCount // corePoolSize
> And other useful metrics.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)