View and collect Blogs metrics 

Use the BlogsMetricsService commands and Server Metrics page to monitor product usage, and to make configuration adjustments when necessary.


Before starting

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.

Metrics are frequency data that are recorded about the database state. There are two ways to view and collect metrics. The simplest way is to enter the URL below or select Server Metrics from the site footer to see some of the most relevant metrics available for the application:

http://<servername.com:port>/blogs/roller-ui/servermetrics.do

where <servername.com:port> is the appropriate host name and port number for your server.

You can also follow these steps to return metrics using administrative commands. No file check out or server restart is required when using these commands.

Whichever method you use, the results are cached for one hour. If you attempt to collect metrics data again within that hour, the same numbers are displayed because they are read from the cache. After the cache expires and you request metrics data, the database is queried and the numbers are updated.

Note: Administrators can restrict access to metrics by specifying the metrics-reader role. For information, see the topic Roles.


About this task

The metrics indicated with an asterisk (*) were added in the IBM Connections 3.0 release.

Table 1. Metrics for public blogs

Metric Description
blogs.metric.entrycount Total number of entries
blogs.metric.group.blogs Total number of group blogs (more than one author)
blogs.metric.total.active.blogs Number of active blogs (more than 10 entries in the last 3 months)
blogs.metric.total.bloggers Total number of bloggers
blogs.metric.total.blogs Total number of published blogs
blogs.metric.total.blogs.today Number of new blogs created today
blogs.metric.total.blogs.week Number of new blogs created last week
blogs.metric.total.comments Total number of comments
blogs.metric.total.comments.today Number of new comments today
blogs.metric.total.entries.today Number of new entries created today
blogs.metric.total.notifications Total number of notifications
blogs.metric.total.recommendations Number of entries with at least one recommendation
blogs.metric.total.recommendation.comments Number of comments with at least one recommendation
blogs.metric.total.tags.blogs * Total number of blog tags
blogs.metric.total.tags.entries* Total number of entry tags
blogs.metric.total.users Total number of users

Table 2. Metrics for blog users

Metric Description
blogs.metric.total.commenting.users.today Number of users commenting today
blogs.metric.total.commenting.users.week Number of users commenting last week
blogs.metric.total.community.commenting.users.today Number of users commenting on community blogs today
blogs.metric.total.community.commenting.users.week Number of users commenting on community blogs last week
blogs.metric.total.community.posting.users.today Number of users posting on community blogs today
blogs.metric.total.community.posting.users.week Number of users posting on community blogs last week
blogs.metric.total.posting.users.today Number of users posting today
blogs.metric.total.posting.users.week Number of users posting last week
blogs.metric.users.authenticated.last.7.days Number of users logged into Blogs in the last week
blogs.metric.users.authenticated.last.30.days Number of users logged into Blogs in the last month
blogs.metric.users.authenticated.today Number of users logged into Blogs today

Table 3. Metrics for community blogs

Command name Metric
blogs.metric.total.active.community.blogs Number of active community blogs (more than 10 entries in the last 3 months)
blogs.metric.total.community.blogs Number of community blogs
blogs.metric.total.community.blogs.today Number of new community blogs created today
blogs.metric.total.community.blogs.week Number of new community blogs created last week
blogs.metric.total.community.comments Number of comments for community blogs
blogs.metric.total.community.comments.today Number of new comments on community blogs created today
blogs.metric.total.community.entries Number of entries for community blogs
blogs.metric.total.community.entries.today Number of new entries on community blogs created today


Public Blogs

Table 4. Metrics for public blogs

Metric Description
blogs.metric.most.popular.blog.tags* 5 most popular entry tags of all time
blogs.metric.most.popular.entry.tags* 5 most popular blog tags of all time


Follow these steps to use wsadmin commands for managing metrics:


Procedure

  1. Start the wsadmin client following the steps in Administer Blogs using the wsadmin Client.

  2. Start the Blogs Jython script interpreter by entering the following command:

      execfile("blogsAdmin.py")

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

    • To collect all of the metrics at once, and have them returned as a hashtable:

        BlogsMetricsService.fetchMetrics()

    • To collect one or a subset of metrics:

        BlogsMetricsService.fetchMetric("<metric_to_fetch>")

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

        For example:

        BlogsMetricsService.fetchMetric("blogs.metric.total.blogs")
        BlogsMetricsService.fetchMetric("blogs.metric.group.blogs")   
        BlogsMetricsService.fetchMetric("blogs.metric.total.users") 

  4. Use one of the following commands to write the current metrics:

    • To write all of the metrics to a file:

        BlogsMetricsService.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. If the file does not exist, one will be created.

      • <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:

        BlogsMetricsService.saveMetricToFile(“C:/Connections/metrics/AllBlogs.txt”,40,“all”)

    • To write one metric to a file:

        BlogsMetricsService.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. If the file does not exist, one will be created.

      • <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. See the metrics table above for a list of options.

          For example:

          BlogsMetricsService.saveMetricToFile(“C:/Connections/metrics/AllBlogs.txt”,40,“all”)
          BlogsMetricsService.saveMetricToFile(“C:/Connections/metrics/TotBlogs.txt”,40,“blogs.metric.total.blogs”)
          BlogsMetricsService.saveMetricToFile(“C:/Connections/metrics/GrpBlogs.txt”,40,“blogs.metric.group.blogs”)

    • 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("blogs.metric.total.blogs")
          fldkeys.add("blogs.metric.total.comments")
          fldkeys.add("blogs.metric.total.tags") 

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

          BlogsMetricsService.saveMetricsToFile(“C:/Connections/metrics/AllBlogs.txt”,40,fldkeys)


Parent topic

Administer Blogs using the wsadmin Client

Related concepts
Collecting metrics


Related tasks


Starting the wsadmin client


   

 

});

+

Search Tips   |   Advanced Search