|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |
By default, TIBCO Hawk installer bundles Apache Tomcat 7.0 web server and deploys TIBCO Hawk WebConsole web-application in it. All the required libraries for TIBCO DataGrid and persistence are already available at appropriate locations.If you want to use a different standalone Tomcat server to deploy TIBCO Hawk WebConsole, you need to follow these manual steps:
1.
2. If TIBCO DataGrid is used as the transport, copy the jar (as-common.jar) to the lib folder of Tomcat (<CATALINA_HOME>/lib)
3. If H2 database is used, copy H2 driver jar (h2*.jar) to the lib folder of Tomcat (<CATALINA_HOME>/lib).
4. If TIBCO Rendezvous is used as the transport, copy the following JAR to the lib folder of Tomcat (<CATALINA_HOME>/lib):
− RV_HOME/lib/tibrvj.jar
5. If TIBCO Enterprise Message Service is used as the transport, copy the following JARs to lib folder of Tomcat (<CATALINA_HOME>/lib):
− EMS_HOME/lib/tibrvjms.jar
− EMS_HOME/lib/tibjms.jar
− EMS_HOME/lib/TIBCrypt.jar
−
6. Make sure that TIBCO DataGrid, TIBCO EMS (when required) and TIBCO Rendezvous shared libraries are in
− PATH (Windows)
− LD_LIBRARY_PATH (Linux, Solaris)
− SHLIB_PATH (HP-UX)
− LIBPATH (AIX)
− DYLD_LIBRARY_PATH (MacOS)
If you want to use any web server other than Tomcat, then you need to copy the above mentioned libraries (JAR/WAR) into appropriate locations specific to the web server.TIBCO Hawk WebConsole can monitor multiple domains configured for different or same transports.
TIBCO Hawk WebConsole can monitor multiple transports at the same time. Each of those transports supports multiple domain configurations.The configuration file used to configure the domains is specified in web.xml under the 'main_servlet' definition.This file DomainTransportCfg.xml is available in the HAWK_HOME/webconsole/tomcat/webapps/hawkwebconsole/WEB-INF/conf folder.It follows the xml schema defined as per DomainTransportCfg.xsd as explained in TIBCO Hawk WebConsole User’s Guide. Also, refer to the following examples on how to configure Hawk Domains and their respective transports. One or more Hawk domains can be managed. You require one DomainTransport section per managed domain as follows.
Configure a security policy for each domain independently using the <hk:SecurityPolicy> as shown in the preceding section. For more Information on Security Configuration, refer to Chapter 4, TIBCO Hawk Security Model.
The security policy of a domain is an optional tag. If the <hk:SecurityPolicy> tag is not present in the Domain configuration or is empty, the domain is initialized with no security policy.The WebConsole Server may or may not be configured to use a database. Persistence mode enabled refers to when a database is used for configuration and storage. The WebConsole Server uses the persistence mode by default. You can disable the persistence mode in web.xml. Depending on the selected mode, different aspects of the web applications are configured differently. The following sections cover these configuration options.The persistence mode can be enabled or disabled in web.xml as shown:<!-- Accepted values are either true or false, default value is true-->With persistence mode enabled, you can save/restore configuration objects and user created dashboards across multiple sessions.
TIBCO Hawk bundles a H2 database (http://www.h2database.com) for data persistence. You may choose to connect to an external database that is JDBC compliant
1. Define database resource in the hawkwebconsole web application's META-INF/context.xml as follows:
2. Define the resource reference in its web.xml as follows:Hawk WebConsole can be configured to authenticate Hawk users against the following types of user repositories and these authentication types need to be set in the following section of web.xml.<!-- Hawk Users Authentication provider type, supported types are FILE or LDAP or DATABASE -->Default auth_type is FILE, that is, File based user repository is used.
To use auth_type as DATABASE, make sure persistence mode is enabled and Database configuration is done appropriately.For example, to add a new user (admin/admin), Administrator needs to run the following SQL script:INSERT INTO hawk_users (user_name, password) VALUES ('admin', '232f297a57a5a743894a0e4a801fc3');
In the File based configuration, the users and passwords are stored in the hawkusers.xml file. To configure file based authentication:
1.
2. Configure the hawkusers.xml file as follows:Store the Hawk users file in the location HAWK_HOME\webconsole\tomcat\webapps\WEB-INF\conf. It has the following format:<user username="<username>" password="<MD5 hashed password or Plain text password>" roles="<user role>"/>WebConsole uses log4j for application logging. By default, the WebConsole logs are generated under CONFIG_FOLDER/logs/hawkwebconsole.log.You can modify the default log4j config file WEB-INF/conf/log4j_webconsole.properties or use your own properties file.You can configure the location of logs using the log4j.appender.RFileApp.File property in the log4j config file (WEB-INF/conf/log4j_webconsole.properties).log4j.appender.RFileApp.File=C:/ProgramData/HK510v11/tibco/cfgmgmt/hawk/logs/hawkwebconsole.logBy default, Tomcat server logs are generated at HAWK_HOME/webconsole/logs.Perform the filtering of agents in the WebServer layer. When enabled, authenticated users can be authorized to access specific domains or agents.To configure the filtering of domains and agents in the User Agent Config file, use one of the following ways:
• Use a File Path: add the following entry in web.xml under the 'main_servlet' definition.Example of hawk_user_agent_cfg.txt is as follows:
# This file is used by agent running with "COM.TIBCO.hawk.security.trusted.Trusted" security model.# This doesn't include microagent and methods level authorization, even if the microagent and methods are defined, then those will be ignored.# Examples# 1. admin will have access to all agents/nodes and domains# 2. user1 will have access to agent1 under domain1 with dns dns1.# 3. user2 will have access to all agents/nodes under domain domain2 and any dns.# 4. user3 will have access to agent3 if agent3 doesn't belong to domain3admin *user1 "agent1 dns1 domain1"user2 "* * domain2"!user3 "* * domain3"
The WebConsole is hosted inside the Tomcat web container, thus, enable the SSL for the Tomcat Web container to enable the SSL for WebConsole. Follow the steps mentioned in the Tomcat documentation at the following URL to configure SSL in the Tomcat Web container:Alternatively, you can also follow these steps to quickly enable SSL over HTTP for the Tomcat Web container:
2. Run the following command to create a keystore file to store the server's private key and self-signed certificate:JAVA_HOME\bin\keytool -genkey -alias tomcat -keyalg RSA
3. When prompted, specify the password string, for example, "hawkwebconsole". The password could be any string, the same password needs to be specified in the server.xml configuration file (see step 6).
4. When prompted, specify general information about the certificate, such as company, contact name, and so on. This information helps users to validate the authenticity of the certificate, as this information is displayed to users who attempt to access a secure page in your application.The .keystore file with the Certificate is created in the same JDK installation folder.
5. Now, browse to the configuration folder of Hawk WebConsole and open server.xml for editing.HAWK_HOME/webconsole/tomcat/conf/server.xml
6. keystoreFile="<path of .keystore file>"To verify, type the URL "https://localhost:8443/hawkwebconsole/" in a web browser and press Enter. Web browser should display Hawk WebConsole.If persistence mode is disabled, the agent information is saved in an xml file, which does not require any configuration. By default, the application stores the agent information under <CATALINA_HOME>/AppData/hawk_agents.xml.It is possible to bootstrap the application with a predefined set of Hawk Agents by directly adding entries to this file or to the corresponding table in the database.The user preferences at global level can be configured in the WebConsole Server. These preferences are applicable across all users.The following example shows how the depth of alert/subscription caches in the browser (default=1000) can be set in web.xml:<!-- Configure the Max limit of the items (Alerts/subscription)to be cached on browser -->The rendering frequency of heatmaps in Hawk WebConsole can be controlled using the following parameters in web.xml:heatmap_update_type — Specifies if the heatmap can be updated automatically or at the specified time interval. Set the value to one of the following:
− auto —Updates heatmap automatically for optimal performance
− timer— Gives control to specify the rendering rate using the parameter "heatmap_render_rate"
− heatmap_render_rate— Specifies how often the heatmap is updated. Default value 10 seconds. The minimum value is 5 seconds.All configuration object changes made via the WebConsole UI are propagated to all connected user sessions. However, the changes made through Hawk Display or any other mechanism is not notified.When the persistence mode is enabled, the objects that are local to a user (that is, the objects that are not yet deployed to an agent) are versioned.A version check is performed when you try to save a local object. The save operation succeeds only if the version is the latest. Otherwise, you get an exception that asks you to refresh your copy. It can happen only if the same user logs in from two sessions.For agent deployed objects or common objects, versioning is not maintained. This is because Agents do not support versioning and version based deployment of configuration objects.By default, the session persistence is disabled for WebConsole application with Tomcat restart. You can enable or disable the session persistence with Tomcat restart for Hawk WebConsole application. It is configurable in tomcat/webapps/hawkwebconsole/META-INF/context.xml.
The above configuration for user session persistence is specific to Tomcat. If you are deploying Hawk WebConsole on any other web server, follow equivalent steps for that web server.
|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |