Setting an initial count for Metrics

After you migrate to IBM® Connections, set the initial count of metrics data for the Metrics application.

Before you begin

The task offers two methods of setting the initial count: the first method retrieves global, community, and user metrics in a single process. If your deployment has a large number of communities and users, this method might take a long time to complete. The second method retrieves the same metrics in separate process. If you use the second method, you must create files with the IDs of your communities and users:
  1. Run the following SQL command on the Communities database:

    SELECT COMMUNITY_UUID FROM SNCOMM.COMMUNITY

    Each line in the output contains one community UUID, in the following format:

    00000000-0000-0000-0000-000000000000
    11111111-0000-0000-0000-000000000000
  2. Save the output to a text file.
  3. Run the following SQL command on the Profiles database:

    SELECT PROF_KEY FROM EMPINST.EMPLOYEE

    Each line in the output contains one Profiles ID, in the following format:

    00000000-0000-0000-0000-000000000000
    11111111-0000-0000-0000-000000000000
  4. Save the output to a text file.

About this task

Before you start using the Metrics application, you must establish a starting point for metrics data. This starting point is used by the application as basis for comparing subsequent changes to the data. You can capture metrics at the global, community, and user levels by running the relevant administrative commands.

You can capture the following metrics data:

Table 1. Global metrics
Application Metric
Activities Number of activities
Blogs Number of blogs
Blogs Number of entries
Blogs Number of entry comments
Bookmarks Number of bookmarks
Communities Number of communities
Communities Number of status updates
Files Number of files
Forums Number of forum topics
Forums Number of forums
Forums Number of topic replies
Home page Number of status updates
Moderation Number of rejected items
Profiles Number of status updates
Wikis Number of wiki pages
Wikis Number of wikis
Table 2. User metrics
Application Metric
Profiles Number of followers
Table 3. Community metrics

These metrics apply to each community in your deployment.

Application Metric
Activities Number of activities
Blogs Number of entries
Blogs Number of entry comments
Bookmarks Number of bookmarks
Communities Number of members
Communities Number of people who are following the community
Communities Number of status updates
Files Number of files
Forums Number of forum topics
Forums Number of topic replies
Ideation blog Number of graduated ideas
Ideation blog Number of ideas
Moderation Number of rejected items
Moderation Number of rejected items
Wikis Number of wiki pages

To capture data for the Metrics application, complete the following steps:

Procedure

  1. Start the wsadmin client. For more information, see the Starting the wsadmin client topic.
  2. Start the Metrics Jython script interpreter by entering the following command:

    execfile("metricsGetInitCount.py")

  3. Choose one of the following options:
    • Global metrics: Get the initial count for global metrics, including the metrics for every community and every user.

      Enter the following command:

      MetricsAppsMetricsService.fetchInitialBalanceStartFrom(CommunityThreads, ConnectionsThreads, StartDate)

      where
      CommunityThreads
      is the number of concurrent threads that the Communities application allocates for this command. The command starts these threads concurrently and sends requests to the Communities application to retrieve the initial count for all communities.
      ConnectionsThreads
      is the number of threads that all IBM® Connections applications allocate for this command. The command starts these threads concurrently and sends requests to all IBM® Connections applications to process the initial count for all communities. Adjust the number of threads in this parameter to match your server capacity.
      StartDate
      is the date that the Metrics application started to collect data. Input the value in the yyyy-mm-dd format, enclosed in double quotation marks. To configure the Metrics application to automatically calculate the start date, enter None as the value.
      Tip: If your IBM® Connections deployment has large number of communities and users, this command might take a long time to complete. In that case, select the next option instead.

      Examples:

      MetricsAppsMetricsService.fetchInitialBalanceStartFrom(5, 20, None)

      MetricsAppsMetricsService.fetchInitialBalanceStartFrom(5, 20, "2012-12-01")

    • Retrieve the initial count in separate steps for global, community, and user metrics. Select this option when your deployment has a large number of communities and users.
      1. Enter the following command to retrieve the initial count for global metrics only:

        MetricsAppsMetricsService.fetchInitialBalanceForGlobalMetricsStartFrom(StartDate)

        where
        StartDate
        is the date that the Metrics application started to collect data. Input the value in the yyyy-mm-dd format, enclosed in double quotation marks. To configure the Metrics application to automatically calculate the start date, enter None as the value.

        Examples:

        MetricsAppsMetricsService.fetchInitialBalanceForGlobalMetricsStartFrom(None)

        MetricsAppsMetricsService.fetchInitialBalanceForGlobalMetricsStartFrom("2012-12-01")

      2. Enter the following command to retrieve the initial count for Communities metrics:

        MetricsAppsMetricsService.fetchInitialBalanceForCommunitiesStartFrom(CommunityThread, ConnectionsThread, CommunityUuidFile, StartDate)

        where
        CommunityThreads
        is the number of concurrent threads that the Communities application allocates for this command. The command starts these threads concurrently and sends requests to the Communities application to retrieve the initial count for all communities.
        ConnectionsThreads
        is the number of threads that all IBM® Connections applications allocate for this command. The command starts these threads concurrently and sends requests to all IBM® Connections applications to process the initial count for all communities. Adjust the number of threads in this parameter to match your server capacity.
        CommunityUuidFile
        is the file that contains the UUIDs of all the communities in your deployment. Enter the full path and name of the file, enclosed in double quotation marks.
        StartDate
        is the date that the Metrics application started to collect data. Input the value in the yyyy-mm-dd format, enclosed in double quotation marks. To configure the Metrics application to automatically calculate the start date, enter None as the value.

        Examples:

        MetricsAppsMetricsService.fetchInitialBalanceForCommunitiesStartFrom(5, 20, "C:\communityUUIDs.txt", None)

        MetricsAppsMetricsService.fetchInitialBalanceForCommunitiesStartFrom(5, 20, "C:\communityUUIDs.txt", "2012-10-01")

      3. Retrieve the initial metrics data for users by using one of the following methods:
        • Enter the following command to retrieve the initial metrics data for all users:

          MetricsAppsMetricsService.fetchInitialBalanceForAllPersonFollower(1)

          Tip: If your IBM® Connections deployment has a large number of users, this command might take a long time to complete. In that case, skip this step and run the next command instead.
        • Enter the following command to retrieve the initial metrics data for users that are specified in the input file:

          MetricsAppsMetricsService.fetchInitialBalanceForPersonFollower(1, ProfilesIdFile)

          where
          ProfilesIdFile
          is the file that contains the IDs of all the users in your deployment. Enter the full path and name of the file, enclosed in double quotation marks.

          Example:

          MetricsAppsMetricsService.fetchInitialBalanceForPersonFollower(1, "C:\profileBaseKeys.txt")