View and collect Wikis metrics 

Use the WikisMetricsService commands and Server Metrics page in the product 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.

Many commands ask for IDs as input parameters, such as library IDs, user IDs, policy IDs, and file IDs. You can use commands that take parameters you do know to return data including the ID you are looking for. For example, run WikisMemberService.getByEmail(string email) providing a user's email address and among the data returned is the user's ID. You can also find IDs using feeds. See the Lotus Connections API documentation for information on getting ID information using feeds.


About this task

Metrics are frequency data that are recorded about the database state. Unlike other IBM Connections applications, Files and Wikis have a task to record metrics data nightly and store it in the Stat table. The database isolates data by day (one row per day) and by “type.” An application can have multiple types, for example Files has a community files and personal files type. Some data (for example, user counts) is the same for both of these types, but most of the other data (for example, library sizes) is particular to that set of data. For information about enabling and disabling metrics collection see the scheduledTasks.MetricsDailyCollection.enabled section in Wikis configuration properties.

There are two ways to view and collect metrics. The simplest way is to enter the URL below or click the Server Metrics link in the footer to see some of the most relevant metrics available for the application:

http://<servername.com:port>/wikis/home/statistics

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

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

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.


Procedure

  1. Start the wsadmin client.

  2. Start the Wikis Jython script interpreter using the following command:

      execfile("wikisAdmin.py")

  3. Use the commands below to retrieve metrics.

      WikisMetricsService.browse(string startDate, string endDate, string filePathWithFilterKeys)

        Returns metrics about wikis stored in the database. The same metrics are provided for each day in a specified period.

        If you do not specify dates, then the command uses the first available day with data for startDate, and the last available day with data for endDate.

        See the topic Wikis metrics for metrics and their descriptions.

        Parameters:

        startDate

          The start date for the period, in YYYY-MM-DD format. This date is included in the returns, for example a start date of "2009-01-01" will include metrics from January 1, 2009. It must be in quotes, for example "2009-01-01".

        endDate

          The end date for the period, in YYYY-MM-DD format. This date is included in the returns, for example an end date of "2009-01-10" will include metrics from January 10, 2009. It must be in quotes, for example "2009-01-10".

        filePathWithFilterKeys

          Optional: The full path to a text file in which each line contains a statistical key. If you specify a file, only metrics listed in the file are returned. If you do not specify a file, all data is returned.

        For example:

        WikisMetricsService.browse("2009-01-01", "2009-01-10", "C:/connections/files/metrics.txt")

      WikisMetricsService.saveToFile(string filePath, string startDate, string endDate, string filePathWithFilterKeys, string append)

        Returns metrics about wikis and exports them to a local file. The same metrics are provided for each day in a specified period.

        If you do not specify dates, then the command uses the first available day with data for startDate, and the last available day with data for endDate.

        See the topic Wikis metrics for metrics and their descriptions.

        Parameters:

        filePath

          Path to a file in which to export the metrics. Metrics are exported in comma separated value (CSV) format. If you specify a file name with a .csv extension, it is possible to open it as a spreadsheet. See Importing statistics and metrics into a spreadsheet.

        startDate

          The start date for the period, in YYYY-MM-DD format. This date is included in the returns, for example a start date of "2009-01-01" will include metrics from January 1, 2009. It must be in quotes, for example "2009-01-01".

        endDate

          The end date for the period, in YYYY-MM-DD format. This date is included in the returns, for example an end date of "2009-01-10" will include metrics from January 10, 2009. It must be in quotes, for example "2009-01-10".

        filePathWithFilterKeys

          Optional: The full path to a text file in which each line contains a metric key. If you specify a file, only metrics listed in the file are returned. If you do not specify a file, all data is returned. For example, if the file lists these three keys, then only these metrics are returned:
          wikis.metric.user.count wikis.metric.user.created.today.count wikis.metric.user.login.count

        append

          String whose default value is "true". Change to "false" to have the command overwrite the existing file instead of appending the data in the existing file.

        For example:

        WikisMetricsService.saveToFile("C:/connections/files/metrics.csv", "2009-01-01", "2009-01-10", "C:/connections/files/metric_keys.txt", "false")

      WikisMetricsService.getAvailableRange()

        Returns a string array where the first element is the first day data is available and the second element is the last day that data is available for wiki libraries. Typically, the current day's data is not available until 12:01 A.M. the following day.

        If metrics collection was disabled or did not occur because of some issue, there may be gaps in data available.

      Wikis metrics
      The Wikis application provides metrics that you can use to monitor product usage, and to make configuration adjustments when necessary.


Parent topic

Administer Wikis

Related concepts
Collecting metrics


Related tasks


Starting the wsadmin client
Importing statistics and metrics into a spreadsheet

Related reference
Roles


   

 

});

+

Search Tips   |   Advanced Search