特定管理 > 網站維護 > Using Java Management Extensions (JMX) > Setting Up Your JMX Environment
  
Setting Up Your JMX Environment
The basic JMX features include the ability to automatically send email notifications for defined events. To use this feature, you must:
Ensure that your mail server is setup to send the email notifications. Check with your site IT department to verify the mail host is setup for the environment where Windchill is running. By default, Windchill sends all electronic mails anonymously to the SMTP host defined in the wt.mail.mailhost property.
If some restrictions exist on server access (such as 'relaying prohibited' or 'anonymous connection denied'), the messages sent by Windchill are rejected by the mail server. To configure Windchill to authenticate to the SMTP server, the following properties should be manually added in a file outside of the Windchill codebase (For example, <Windchill>/mail.properties).
wt.mail.smtp.username=<mail-user>
wt.mail.smtp.password=<mail-user-password>
Additionally, wt.mail.properties must be set in wt.properties to the mail.properties file as follows:
xconfmanager -s "wt.mail.properties=$(wt.home)$(dir.sep)mail.properties" -t "codebase/wt.properties"
Configure your master server and File Server sites to receive email notifications on failure of the file upload operation. The site administrator should configure the wt.mail.mailhost property manually in wt.properties file and add his email address in JMX to receive automatic email notifications. For configuring email address on JMX client, open Jconsole and navigate to the below path and update administrator’s email address.
com.ptc > Emailer > EmailLists > JMX-Administrators > Attributes > AddressList
To persist the modified configuration, navigate to the below path from Jconsole and click save().
com.ptc > Loader > Operations > save()
Determine if the default threshold values for sending notifications are appropriate for your site.
Establish the group of users who receive the automatic JMX email notifications and the error report emails sent by users. By default, the JMX-Administrators list is used for this purpose.
Users added to the JMX-Administrators list usually require system monitoring privileges. Users have system monitoring privileges when they are either:
Members of the site Administrators group.
Selecting Site > Administrators displays the Site Administrators table. From this table, you can add users to the Administrators group.
Included in the list of users specified in the wt.util.jmx.AccessUtil.siteAdministrators property. These users have access to the System Configuration Collector, Server Status, and Monitoring Tools pages.
By default, the wt.util.jmx.AccessUtil.siteAdministrators property is not included in the wt.properties file. You can add the wt.util.jmx.AccessUtil.siteAdministrators property. For example, to give monitoring privileges to users with names auser135 and buser246 without making the users site administrators, enter (on one line) the following xconfmanager command from a windchill shell:
xconfmanager -s wt.util.jmx.AccessUtil.siteAdministrators=auser135,buser246
-t wt.properties -p
Checking the Notification Threshold Values and Error Levels
Each JVM has a set of threshold values and error levels that are set by default for notification activities that can occur. For example an email notification is sent whenever the server manager starts. The setup for notifications is handled by the NotificationHandlers MBeans that are available in each JVM. Each MBean identifies who receives the email in the EmailRecipientList Name attribute. By default, the value is JMX-Administrators.
For additional information, see Accessing Windchill MBeans from JConsole and the NotificationHandlers section in Windchill MBeans.
Populating the JMX-Administrators List
The JMX-Administrators list is the group of users who receive the automatic JMX email notifications and the error report emails sent by users.
To populate the JMX-Administrators list for the servlet engine, server manager, method servers, and Windchill Directory Server on a specific system, you can use the following ant script. From a windchill shell, navigate to Windchill codebase directory and enter the following command:
ant -f modifyMBeanConfig.xml setEmailList -DemailAddresses=<comma-delimited list of email addresses>
The email addresses specified in the script command are added to each JMX-Administrators list.
When the Windchill Configuration Assistant is run at installation, the administrator entered during the installation is used to populate the JMX-Administrators lists for the servlet engine, server manager, method servers, and Windchill Directory Server. The Windchill Configuration Assistant uses the ant script described in this topic when propagating the lists.
When running the Windchill Configuration Assistant manually, propagating Windchill values includes applying the contents of the JMX-Administrators list that is stored in the intermediate copy of the method server MBean configuration file that the assistant maintains to all JMX-Administrators lists. The initial list of administrators that the Windchill Configuration Assistant starts with is the one stored in the method server MBean. If you run the Windchill Configuration Assistant in interactive mode, you can update the intermediate copy. The Windchill Configuration Assistant always applies the intermediate copy to all JMX-Administrators lists.
To manage the JMX-Administrators lists individually after the Windchill Configuration Assistant has propagated its changes, use the MBean interface. From a JMX client (such as JConsole or VisualVM), navigate to the Emailer > EmailLists > JMX-Administrators MBean from an individual connection. Use the corresponding methods available from the Operations node to add and remove addresses. Refresh the attributes to view your additions and deletions.
For additional information about email lists, see the section Emailer in Windchill MBeans.
For information about user error report emails, see Understanding the End User Error Email.