[pax-web] jetty connection statistics in karaf?

85 views
Skip to first unread message

nino martinez wael

unread,
Aug 29, 2017, 7:56:01 AM8/29/17
to OPS4J
Hi 

How am I able to add this http://www.eclipse.org/jetty/documentation/9.4.6.v20170531/statistics-handler.html to all handlers.. In my project we are both using https and http, and I want to know the basic information such as number of requests et.

I've gotten so far that I can see that I can configure jetty here:


But I do not know what the handlers are called..

I tried this as the last thing in jetty.xml, and it did not work:

<Get name="handler">
   
<Call name="addBean">
          <Arg>
              <New id="ConnectionStatistics" class="org.eclipse.jetty.io.ConnectionStatistics"/>
          </Arg>
        </Call>
   
</Get>

nino martinez wael

unread,
Aug 29, 2017, 8:47:58 AM8/29/17
to op...@googlegroups.com
I tried adding this:

  <Get id="oldhandler" name="handler" />
<Set name="handler">
  <New id="StatsHandler" class="org.eclipse.jetty.server.handler.StatisticsHandler">
    <Set name="handler"><Ref refid="oldhandler" /></Set>
  </New>
</Set>

but that just breaks everything, webconsole or my applications does not startup.. I do get the nice view of stats in jmx.. 

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to a topic in the Google Groups "OPS4J" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ops4j/3F1AHyICa38/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ops4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards / Med venlig hilsen 
Nino Martinez

Achim Nierbeck

unread,
Aug 30, 2017, 12:19:34 AM8/30/17
to op...@googlegroups.com
Hi, 

did you try to follow the description on

in your case this would look like the following: 

<Get name="handler">
    <Call name="addHandler">
      <Arg>
    <New class="org.eclipse.jetty.server.handler.StatisticsHandler">
        </New>
      </Arg>
    </Call>
</Get>

regards, Achim

You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 

nino martinez wael

unread,
Aug 30, 2017, 12:43:37 AM8/30/17
to OPS4J
Good morning Achim

Thanks, it did work, you made my life a better place to be.. I tried a lot of variants but not your particular one..


regards Nino
To unsubscribe from this group and all its topics, send an email to ops4j+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best regards / Med venlig hilsen 
Nino Martinez

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages