Home
View and collect Blogs metrics
Enter a URL to view a standard set of Blogs metrics, or use administrative commands to collect metrics for the Blogs feature and write them to a file. No file check out or server restart is required when using these commands.
There are two ways to view and collect metrics. The simplest way is to enter the following URL and view the full set of metrics available for the feature.http://<servername.com:port>/blogs/roller-ui/servermetrics.dowhere <servername.com:port> is the appropriate host name and port number for your server, and then go to this Web address. 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.
Description wsadmin metric key Total number of published blogs blogs.metric.total.blogs Total number of group blogs (more than one author) blogs.metric.group.blogs Total number of bloggers blogs.metric.total.users Total number of comments blogs.metric.total.comments Total number of tags blogs.metric.total.tags Total number of entries blogs.metric.entrycount Total number of notifications blogs.metric.total.notifications Number of entries with at least one recommendation blogs.metric.total.recommendations Number of comments with at least one recommendation blogs.metric.total.recommendation.comments Number of new blogs created today blogs.metric.total.blogs.today Number of new blogs created last week blogs.metric.total.blogs.week Number of new entries created today blogs.metric.total.entries.today Number of new comments today blogs.metric.total.comments.today Number of users logged into Blogs today blogs.metric.users.authenticated.today Number of users logged into Blogs in the last week blogs.metric.users.authenticated.last.7.days Number of users logged into Blogs in the last month blogs.metric.users.authenticated.last.30.days Number of users posting today blogs.metric.total.posting.users.today Number of users posting last week blogs.metric.total.posting.users.week Number of users commenting today blogs.metric.total.commenting.users.today Number of users commenting last week blogs.metric.total.commenting.users.week Number of users posting on community blogs today blogs.metric.total.community.posting.users.today Number of users posting on community blogs last week blogs.metric.total.community.posting.users.week Number of users commenting on community blogs today blogs.metric.total.community.commenting.users.today Number of users commenting on community blogs last week blogs.metric.total.community.commenting.users.week Number of community blogs blogs.metric.total.community.blogs Number of entries for community blogs blogs.metric.total.community.entries Number of comments for community blogs blogs.metric.total.community.comments Number of active blogs (more than 10 entries in the last 3 months) blogs.metric.total.active.blogs Number of active community blogs (more than 10 entries in the last 3 months) blogs.metric.total.active.community.blogs Number of new community blogs created today blogs.metric.total.community.blogs.today Number of new community blogs created last week blogs.metric.total.community.blogs.week Number of new entries on community blogs created today blogs.metric.total.community.entries.today Number of new comments on community blogs created today blogs.metric.total.community.comments.today
The metrics are cached for one hour. Within that hour, if you access the Blogs metrics, using the URL or via the wsadmin command, the metrics numbers will be the same – because they are read from the cache. Once the cache expires, then the next time you request metrics data, the database is queried for the updated information, and you will see updated numbers.
To edit configuration files, use wsadmin. See Start the wsadmin client for details.
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:
- Open a command window and start the wsadmin command line tool. See Starting wsadmin for more details.
- Start the Blogs Jython script interpreter by entering the following command:
- Single server:
execfile("blogsAdmin.py")
- Cluster:
execfile("WAS_HOME/blogs/DMGR/config/bin_lc_admin/blogsAdmin.py")
- 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")
- Use one of the following commands:
- 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:
- Define an ArrayList java object variable named fldkeys.
- 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")
- Use the following command to write the subset of metrics to a file:
BlogsMetricsService.saveMetricsToFile(“C:/Connections/metrics/AllBlogs.txt”,40,fldkeys)
Administer Blogs using the wsadmin Client
Related tasks