You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2008/04/05 21:35:24 UTC
[jira] Created: (SHINDIG-178) Add monitoring module to java gadget
server
Add monitoring module to java gadget server
-------------------------------------------
Key: SHINDIG-178
URL: https://issues.apache.org/jira/browse/SHINDIG-178
Project: Shindig
Issue Type: New Feature
Components: Gadgets Server - Java
Reporter: Paul Lindner
>From the mailing list in January:
Hi all. I have written a somewhat simple infrastructure for monitoring
the java version of shindig. It assumes there's a monitoring client
application which can read and parse the variable values and if necessary
send out any alerts or extract relevant statistics - all variables are
counters, which at first may sound limiting, but with fancier counters it
allows gathering information like "how many times a certain gadget URL has
been fetched", "what's the average time spent in substitutions" (by having a
counter which stores both the total time sum and a count of increments),
"how many times have we failed serving a gadget in the last 30 minutes" (by
having that in time buckets), etc. Any other aggregation is left to
monitoring clients.
I'm attaching the source code for your appreciation - let me know if you
have any comments. (I think attachment is better than a diff since this
doesn't touch any existing files - I'm leaving up to the files' owners to
add their own calls to this code where they think it's more appropriate).
There are some TODOs for the future:
- a pretty HTML status page for manual examination
- some sort of eviction for certain variables, so that for instance we
don't keep counters for gadget URLs that were used only once - I intend to
use isEmpty() to determine deletable counters
- Implement XML output type (any suggestions for a schema that would be
more plug-and-play with some popular monitoring system?)
- Add tests
- PHP version? Not sure if this is possible, perhaps only with SRM or
memcached?
Btw, I added the servlet as:
<!-- Monitoring -->
<servlet>
<servlet-name>monitoring</servlet-name>
<servlet-class>
org.apache.shindig.monitoring.MonitorReportingServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>monitoring</servlet-name>
<url-pattern>/monitor</url-pattern>
</servlet-mapping>
Example usage:
MonitoringManager monitorManager = MonitoringManagerFactory.getInstance
();
SectionMonitor monitor = monitorManager.getSectionMonitor("processGadget",
CounterType.HISTORY);
monitor.start();
try {
// Do some stuff
} catch(Something e) {
monitor.abort();
return;
}
monitor.stop();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SHINDIG-178) Add monitoring module to java gadget
server
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner updated SHINDIG-178:
---------------------------------
Attachment: monitoring.zip
Monitoring code
> Add monitoring module to java gadget server
> -------------------------------------------
>
> Key: SHINDIG-178
> URL: https://issues.apache.org/jira/browse/SHINDIG-178
> Project: Shindig
> Issue Type: New Feature
> Components: Gadgets Server - Java
> Reporter: Paul Lindner
> Attachments: monitoring.zip
>
>
> From the mailing list in January:
>
> Hi all. I have written a somewhat simple infrastructure for monitoring
> the java version of shindig. It assumes there's a monitoring client
> application which can read and parse the variable values and if necessary
> send out any alerts or extract relevant statistics - all variables are
> counters, which at first may sound limiting, but with fancier counters it
> allows gathering information like "how many times a certain gadget URL has
> been fetched", "what's the average time spent in substitutions" (by having a
> counter which stores both the total time sum and a count of increments),
> "how many times have we failed serving a gadget in the last 30 minutes" (by
> having that in time buckets), etc. Any other aggregation is left to
> monitoring clients.
> I'm attaching the source code for your appreciation - let me know if you
> have any comments. (I think attachment is better than a diff since this
> doesn't touch any existing files - I'm leaving up to the files' owners to
> add their own calls to this code where they think it's more appropriate).
> There are some TODOs for the future:
> - a pretty HTML status page for manual examination
> - some sort of eviction for certain variables, so that for instance we
> don't keep counters for gadget URLs that were used only once - I intend to
> use isEmpty() to determine deletable counters
> - Implement XML output type (any suggestions for a schema that would be
> more plug-and-play with some popular monitoring system?)
> - Add tests
> - PHP version? Not sure if this is possible, perhaps only with SRM or
> memcached?
> Btw, I added the servlet as:
> <!-- Monitoring -->
> <servlet>
> <servlet-name>monitoring</servlet-name>
> <servlet-class>
> org.apache.shindig.monitoring.MonitorReportingServlet
> </servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>monitoring</servlet-name>
> <url-pattern>/monitor</url-pattern>
> </servlet-mapping>
> Example usage:
> MonitoringManager monitorManager = MonitoringManagerFactory.getInstance
> ();
> SectionMonitor monitor = monitorManager.getSectionMonitor("processGadget",
> CounterType.HISTORY);
> monitor.start();
> try {
> // Do some stuff
> } catch(Something e) {
> monitor.abort();
> return;
> }
> monitor.stop();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SHINDIG-178) Add monitoring module to java
gadget server
Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586050#action_12586050 ]
Kevin Brown commented on SHINDIG-178:
-------------------------------------
I think this is pretty good, but we should probably favor filters for actual monitoring value changes so that people who have their own monitoring infrastructure already can use that.
> Add monitoring module to java gadget server
> -------------------------------------------
>
> Key: SHINDIG-178
> URL: https://issues.apache.org/jira/browse/SHINDIG-178
> Project: Shindig
> Issue Type: New Feature
> Components: Gadgets Server - Java
> Reporter: Paul Lindner
> Attachments: monitoring.zip
>
>
> From the mailing list in January:
>
> Hi all. I have written a somewhat simple infrastructure for monitoring
> the java version of shindig. It assumes there's a monitoring client
> application which can read and parse the variable values and if necessary
> send out any alerts or extract relevant statistics - all variables are
> counters, which at first may sound limiting, but with fancier counters it
> allows gathering information like "how many times a certain gadget URL has
> been fetched", "what's the average time spent in substitutions" (by having a
> counter which stores both the total time sum and a count of increments),
> "how many times have we failed serving a gadget in the last 30 minutes" (by
> having that in time buckets), etc. Any other aggregation is left to
> monitoring clients.
> I'm attaching the source code for your appreciation - let me know if you
> have any comments. (I think attachment is better than a diff since this
> doesn't touch any existing files - I'm leaving up to the files' owners to
> add their own calls to this code where they think it's more appropriate).
> There are some TODOs for the future:
> - a pretty HTML status page for manual examination
> - some sort of eviction for certain variables, so that for instance we
> don't keep counters for gadget URLs that were used only once - I intend to
> use isEmpty() to determine deletable counters
> - Implement XML output type (any suggestions for a schema that would be
> more plug-and-play with some popular monitoring system?)
> - Add tests
> - PHP version? Not sure if this is possible, perhaps only with SRM or
> memcached?
> Btw, I added the servlet as:
> <!-- Monitoring -->
> <servlet>
> <servlet-name>monitoring</servlet-name>
> <servlet-class>
> org.apache.shindig.monitoring.MonitorReportingServlet
> </servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>monitoring</servlet-name>
> <url-pattern>/monitor</url-pattern>
> </servlet-mapping>
> Example usage:
> MonitoringManager monitorManager = MonitoringManagerFactory.getInstance
> ();
> SectionMonitor monitor = monitorManager.getSectionMonitor("processGadget",
> CounterType.HISTORY);
> monitor.start();
> try {
> // Do some stuff
> } catch(Something e) {
> monitor.abort();
> return;
> }
> monitor.stop();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.