Home

 

View and collect Communities metrics

Enter a URL to view a standard set of Communities metrics, or use administrative commands to collect metrics for the Communities feature and write them to a file. No file check out or server restart is required when using these commands.

To use administrative commands, use wsadmin. See Start wsadmin for details.

There are two ways to view and collect metrics for Communities. You can either enter a URL into your Web browser or use administrative commands. For performance reasons, the metrics are cached for one hour. Within that hour, if you try to gather metrics using the Metrics URL or the wsadmin command, the metrics numbers remain the same because they are read from the cache. After the cache expires, then the next time you request metrics data, the database is queried for the updated information, and the updated numbers are displayed. The user interface reports an "As of:" time to show when the data was last collected.

The simplest way to collect metrics is to enter the following URL and view the full set of metrics available for the feature:

where <servername.com:port> is the appropriate host name and port number for your server. The metrics in the first two columns display. The third column is the corresponding wsadmin command that you can use to retrieve individual commands or aggregate metrics in a file, as described below.

Total number of Description wsadmin metric key
Public communities Number of public communities. communities.metric.public.communities
Public invite only communities. Number of public communities where membership is by invitation only. communities.metric.publicinvite.communities
Private communities Number of private communities. communities.metric.private.communities
Communities Number of all communities (public, public invite, and private). communities.metric.totals.communities
Distinct owners Number of people who are owners of one or more communities. communities.metric.distinct.owners
Distinct members Number of people who are members of one or more communities. This number helps you to determine how many people are regular community members versus owners. communities.metric.distinct.users
Users logged in today Total number of distinct logged-in users in the last 24 hours. communities.metric.login24hr.users
Users logged in the last week Total number of distinct logged-in users in the last 7 days. communities.metric.login7days.users
User logged in the last month Total number of distinct logged-in users in the last 30 days. communities.metric.login30days.users

To exercise greater control over what metrics you want to view, or to write them to a file, follow these steps to use wsadmin commands for managing metrics:

  1. Start wsadmin so that you can access the Communities configuration files.

    1. Access the Communities configuration files:

      If you are asked to select a server, you can select any server.

  2. Enter one of the following commands to collect the current metrics:

    • To collect all of the metrics in a single operation, and have them returned as a hash table:

      CommunitiesMetricsService.fetchMetrics()

    • To collect one or a subset of metrics:

      CommunitiesMetricsService.fetchMetric("<metric_to_fetch>")

      where the <metric_to_fetch> is one of the metrics defined in the table above.

      For example:

        CommunitiesMetricsService.fetchMetric("communities.metric.public.communities")
        CommunitiesMetricsService.fetchMetric("communities.metric.publicinvite.communities")
        CommunitiesMetricsService.fetchMetric("communities.metric.private.communities")
        CommunitiesMetricsService.fetchMetric("communities.metric.totals.communities")
        CommunitiesMetricsService.fetchMetric("communities.metric.distinct.owners")
        CommunitiesMetricsService.fetchMetric("communities.metric.distinct.users")
        CommunitiesMetricsService.fetchMetric("communities.metric.login24hr.users")
        CommunitiesMetricsService.fetchMetric("communities.metric.login7days.users")
        CommunitiesMetricsService.fetchMetric("communities.metric.login30days.users")

  3. Use one of the following commands:

    • To write all of the metrics to a file:

      CommunitiesMetricsService.saveMetricToFile("<file_name>", <number>,"all")

      where you provide values for the following variables:

      • <file_name>. Full path to a text file in which to store the metric information.

      • <number>. The number of entries to persist in the file. If you specify 20, and add one new entry to the file, the file retains the last 19 entries and adds your new entry. Any older entries are deleted.

      For example:

        CommunitiesMetricsService.saveMetricToFile(“C:/Connections/metrics/AllComms.txt,40,all)

    • To write one metric to a file:

      CommunitiesMetricsService.saveMetricToFile("<file_name>", <number>,"<metric_to_save>")

      where you provide values for the following variables:

      • <file_name>. Full path to a text file in which to store the metric information.

      • <number>. The number of entries to persist in the file. If you specify 20, and add one new entry to the file, the file retains the last 19 entries and adds your new entry. Any older entries are deleted.

      • <metric_to_save>. Metric that you want to write to the file.

        For example:

          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/PubComm.txt, 40, communities.metric.public.communities)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/PubCommInvite.txt, 40, communities.metric.publicinvite.communities)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/PrivComm.txt, 40, communities.metric.private.communities)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/TotComm.txt, 40, communities.metric.totals.communities)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/DistOwn.txt, 40, communities.metric.distinct.owners)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/DistUsr.txt, 40, communities.metric.distinct.users)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/UsrToday.txt, 40, communities.metric.login24hr.users)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/UsrThisWeek.txt, 40, communities.metric.login7days.users)
          CommunitiesMetricsService.saveMetricToFile(C:/Connections/metrics/UsrThisMonth.txt, 40, communities.metric.login30days.users)

    • To write a subset of metrics to a file:

      1. Define an ArrayList Java object variable named fldkeys.

      2. Add the subset of metrics that you want to write to a file to the array. For example:

          from java.util import ArrayList fldkeys=ArrayList() fldkeys.add("communities.metric.totals.communities") fldkeys.add("communities.metric.distinct.owners") fldkeys.add("communities.metric.distinct.users")

      3. Use the following command to write the subset of metrics to a file:

        CommunitiesMetricsService.saveMetricsToFile(“C:/Connections/metrics/MetList.txt,60,fldkeys)


Administer Communities
Collect metrics

+

Search Tips   |   Advanced Search