Metrics administrative commands
We can manage the Metrics services by using wsadmin.sh to perform administrative commands that allow you to check files in and out and modify settings. Administrative commands do not require a server restart to take effect.
MetricsConfigService
- MetricsConfigService.checkOutConfig("/tmp", "cell_name")
Checks Metrics configuration files out to temporary directory.
- /tmp
- Temporary working directory to which configuration files are copied.
- cell_name
- Name of the WAS cell hosting the application. If we do not know the cell name, type the following command in wsadmin processor:
print AdminControl.getCell()
For example:
- IBM i, AIX, or Linux: MetricsConfigService.checkOutConfig("/tmp", "CommServerNode01Cell")
- Windows: MetricsConfigService.checkOutConfig("c:/temp","foo01Cell01")
- MetricsConfigService.showConfig()
Display current configuration settings. Check out configuration files with MetricsConfigService.checkOutConfig() before running MetricsConfigService.showConfig().
- MetricsConfigService.updateConfig("quick_config_property", "new_value")
Update configuration properties.
- quick_config_property
- Property in the metrics-config.xml configuration file expressed as a quick config command.
For example, the quick config value for following property:
<databaseCleanup> <eventLifetimeInMonths>12</eventLifetimeInMonths> </databaseCleanup>is eventLifetimeInMonths. See Metrics configuration properties for configuration properties and descriptions.
- new_value
- The new value for the property. Property values can be restricted, for example, to either true or false. e Metrics configuration properties for configuration properties and descriptions.
For example, to set the scheduledTasks.ReportGenerator.enabled property to false:
MetricsConfigService.updateConfig("scheduledTasks.ReportGenerator.enabled", "false")
- MetricsConfigService.checkInConfig()
Check in Metrics configuration files.
MetricsMemberService
- MetricsMemberService.syncAllMembersByExtId( {"updateOnEmailLoginMatch": ["true" | "false"] } )
- MetricsMemberService.syncMemberByExtId("currentExternalId"[, {"newExtId" : "id-string" [, "allowExtIdSwap" : ["true" | "false"] ] } ] )
- MetricsMemberService.inactivateMemberByEmail("email")
- MetricsMemberService.inactivateMemberByExtId("externalID")
- MetricsMemberService.getMemberExtIdByEmail("email")
- MetricsMemberService.getMemberExtIdByLogin("login")
- MetricsMemberService.syncBatchMemberExtIdsByEmail("emailFile" [, {"allowInactivate" : ["true" | "false"] } ] )
- MetricsMemberService.syncBatchMemberExtIdsByLogin("loginFile" [, {"allowInactivate" : ["true" | "false"] } ] )
- MetricsMemberService.syncMemberExtIdByEmail("email" [, { "allowInactivate" : ["true" | "false"] } ])
- MetricsMemberService.syncMemberExtIdByLogin("name" [, {"allowInactivate": ["true" | "false"] } ])
See Sync user data with administrative commands.
MetricsUsersService
MetricsUsersService.reloadUsersAttributes()
Synchronize user information with Profiles immediately.
User synchronization runs periodically by the "DataSynchronization" scheduler task to get detailed information of users captured in Metrics raw data.
By default, user synchronization runs daily. Use MetricsUsersService.reloadUsersAttributes() to run synchronization ahead of the scheduled time.
MetricsSchedulerService
- MetricsSchedulerService.pauseSchedulingTask(string taskName)
Suspend scheduling of a task. This has no effect on currently running tasks. Paused tasks remain paused until you explicitly resume them, even if the server is stopped and restarted.
- taskName
- A string value containing one of the following:
- ReportGenerator
- MetricsDBCleanup
- DataSynchronization
For example: MetricsSchedulerService.pauseSchedulingTask("ReportGenerator")
- MetricsSchedulerService.resumeSchedulingTask(string taskName)
Resumes the start of a paused task.
- taskName
- A string value containing one of the following:
- ReportGenerator
- MetricsDBCleanup
- DataSynchronization
For example: MetricsSchedulerService.resumeSchedulingTask("ReportGenerator")
- MetricsSchedulerService.forceTaskExecution(string taskName string executeSynchronously)
Runs a task.
Property settings in the metrics-config.xml configuration properties file specify whether tasks are enabled to run automatically, and how often. This command allows you to run tasks manually, for example, if you disabled a task but want to run it at specified times.
- taskName
- A string value containing one of the following:
- ReportGenerator
- MetricsDBCleanup
- DataSynchronization
- executeSynchronously
- Takes the string values true or false. Specifying this value is optional, and the default value is false. If this value is false, then the task executes asynchronously, meaning that if the taskId is valid, the command returns immediately and execution continues in the background. If this value is true, the command does not return until the task completes. For example: MetricsSchedulerService.forceTaskExecution("ReportGenerator")
- MetricsSchedulerService.getTaskDetails(string taskName)
Display the status of a task and returns a detailed status message.
- taskName
- A string value containing one of the following:
- ReportGenerator
- MetricsDBCleanup
- DataSynchronization
For example: MetricsSchedulerService.getTaskDetails("ReportGenerator")
Parent topic:
Run Metrics administrative commands