View and collect Files metrics 

Use the FilesMetricsService 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.


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 type and personal files type. Some data (for example, user counts) is the same for both of these types, but most data (for example, library sizes) is particular to a type. For information about enabling and disabling metrics collection see the scheduledTasks.MetricsDailyCollection.enabled section in Files 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>/files/app/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 Files Jython script interpreter using the following command:

      execfile("filesAdmin.py")

  3. Use the commands below to retrieve metrics.

      FilesMetricsService.browsePersonal(string startDate, string endDate, string filePathWithFilterKeys)

        Returns metrics about personal libraries. The same metrics are provided for each day in a specified period. A personal library is a set of files owned by one person.

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

          files.metric.personal.user.count
          files.metric.personal.user.created.today.count
          files.metric.personal.user.login.count

        For example:

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

      FilesMetricsService.browseCommunity(string startDate, string endDate, string filePathWithFilterKeys)

        Returns metrics about community libraries. The same metrics are provided for each day in a specified period. A community library is a set of files owned by a community.

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

          files.metric.community.user.count
          files.metric.community.user.created.today.count
          files.metric.community.user.login.count

        For example:

        FilesMetricsService.browseCommunity("2009-01-01", "2009-01-10", "C:/connections/files/metric_keys.txt")

      FilesMetricsService.savePersonalToFile(string filePath, string startDate, string endDate, string filePathWithFilterKeys, string append)

        Returns metrics about personal libraries and exports them to a local file. The same metrics are provided for each day in a specified period. A personal library is a set of files owned by one person.

        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 Files 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:
          files.metric.personal.user.count files.metric.personal.user.created.today.count files.metric.personal.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:

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

        Note: While the filePathWithFilterKeys parameter is optional you cannot leave it out completely, at least have empty quotes, for example:

        FilesMetricsService.savePersonalToFile("C:/connections/files/metrics.csv", "2009-01-01", "2009-01-10", "", "false")

      FilesMetricsService.saveCommunityToFile(string filePath, string startDate, string endDate, string filePathWithFilterKeys, string append)

        Returns metrics about community libraries and exports them to a local file. The same metrics are provided for each day in a specified period. A community library is a set of files owned by a community.

        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 Files 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:
          files.metric.personal.user.count files.metric.personal.user.created.today.count files.metric.personal.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:

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

      FilesMetricsService.getAvailablePersonalRange()

        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 personal libraries. Typically, the current day's data is not available until 12:01 A.M. the following day. A personal library is a set of files owned by one person.

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

      FilesMetricsService.getAvailableCommunityRange()

        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 community libraries. Typically, the current day's data is not available until 12:01 A.M. the following day. A community library is a set of files owned by a community.

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

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


Parent topic

Administer Files

Related concepts
Collecting metrics


Related tasks


Starting the wsadmin client
Importing statistics and metrics into a spreadsheet

Related reference
Roles


   

 

});

+

Search Tips   |   Advanced Search