* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Configuring and Monitoring Database Servers
Database model wikipedia , lookup
Relational model wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Clusterpoint wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Team Foundation Server wikipedia , lookup
Configuring and Monitoring Database Servers eG Enterprise v5.6 Restricted Rights Legend The information contained in this document is confidential and subject to change without notice. No part of this document may be reproduced or disclosed to others without the prior permission of eG Innovations, Inc. eG Innovations, Inc. makes no warranty of any kind with regard to the software and documentation, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Trademarks Microsoft Windows, Windows NT, Windows 2000, Windows 2003 and Windows 2008 are either registered trademarks or trademarks of Microsoft Corporation in United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Copyright © 2012 eG Innovations, Inc. All rights reserved. Table of Contents CONFIGURING AND MONITORING AN MS SQL SERVER ..........................................................................................................1 1.1 CONFIGURING AN MS SQL SERVER .....................................................................................................................................................1 1.1.1 User Privileges Required for Monitoring an MS SQL Server ..........................................................................................1 1.1.2 Configuring the MS SQL Server to Communicate with the eG Manager via HTTP/HTTPS ...........................................1 1.2 ADMINISTERING THE EG MANAGER TO MONITOR AN MS SQL SERVER .............................................................................................4 1.3 MONITORING THE MS SQL SERVER .....................................................................................................................................................7 1.3.1 Troubleshooting .................................................................................................................................................................7 CONFIGURING AND MONITORING AN ORACLE SERVER ........................................................................................................9 2.1 ADMINISTERING THE EG MANAGER TO MONITOR AN ORACLE SERVER ..............................................................................................9 2.2 MONITORING THE ORACLE SERVER ....................................................................................................................................................15 2.2.1 Troubleshooting ...............................................................................................................................................................15 CONFIGURING AND MONITORING AN EXTERNAL ORACLE SERVER...............................................................................16 3.1 ADMINISTERING THE EG MANAGER TO WORK WITH AN EXTERNAL_ORACLE_SERVER ...................................................................16 3.2 MONITORING THE EXTERNAL ORACLE SERVER..................................................................................................................................19 CONFIGURING AND MONITORING THE ORACLE CLUSTER.................................................................................................20 4.1 ADMINISTERING THE EG MANAGER TO WORK WITH AN ORACLE CLUSTER .....................................................................................20 4.2 MONITORING THE ORACLE CLUSTER..................................................................................................................................................23 CONFIGURING AND MONITORING A DB2 DATABASE SERVER............................................................................................24 5.1 CONFIGURING A DB2 SERVER 6.0/7.X TO WORK WITH THE EG AGENT ............................................................................................24 5.1.1 Configuring a DB2 Server on Unix Environments..........................................................................................................24 5.1.2 Configuring a DB2 Server on Windows 2000 .................................................................................................................25 5.2 ADMINISTERING THE EG MANAGER TO MONITOR THE DB2 - 6/7 . X DATABASE SERVER................................................................26 5.3 MONITORING THE DB2 – 6.0/7.X DATABASE SERVER.......................................................................................................................28 5.3.1 Troubleshooting ...............................................................................................................................................................28 5.4 ADMINISTERING THE EG MANAGER TO MONITOR THE DB2 UDB SERVER – VERSION 8.0 AND ABOVE ..........................................28 5.5 MONITORING THE DB2 UDB SERVER VERSION 8.0 AND ABOVE ......................................................................................................31 5.6 ADMINISTERING THE EG MANAGER TO MONITOR A DB2 DPF SERVER ............................................................................................31 5.7 MONITORING THE DB2 DPF SERVER .................................................................................................................................................33 CONFIGURING AND MONITORING A SYBASE ADAPTIVE SERVER.....................................................................................34 6.1 CONFIGURING AND MONITORING A SYBASE ADAPTIVE SERVER USING THE MONITOR CLIENT LIBRARY .......................................34 6.1.1 Configuring a Sybase Adaptive Server on Unix ..............................................................................................................34 6.1.2 Configuring a Sybase Adaptive Server on Windows .......................................................................................................36 6.1.3 Administering the eG Manager to monitor the Sybase Adaptive Server ........................................................................37 6.1.4 Monitoring the Sybase Adaptive Server ..........................................................................................................................41 6.2 CONFIGURING AND MONITORING A SYBASE ADAPTIVE SERVER USING THE MDA TABLES ............................................................41 6.2.1 Configuring the eG Agent to Monitor the Sybase Adaptive Server Using the MDA Tables ..........................................41 6.2.2 Administering the eG Manager to Monitor the Sybase Adaptive Server Using the Sybase ASE 15 Model...................42 6.2.3 Monitoring using the Sybase ASE 15 Model ...................................................................................................................45 CONFIGURING AND MONITORING MYSQL SERVERS .............................................................................................................46 7.1 CONFIGURING A MYSQL SERVER ......................................................................................................................................................46 7.2 PRE-REQUISITES FOR MONITORING THE MYSQL SERVER .................................................................................................................48 7.2.1 Configuring the eG Agent with Access Privileges...........................................................................................................48 7.3 ADMINISTERING THE EG MANAGER TO WORK WITH THE MYSQL SERVER ......................................................................................49 7.4 MONITORING THE MYSQL SERVER....................................................................................................................................................52 CONFIGURING AND MONITORING SQL CLUSTERS .................................................................................................................53 8.1 ADMINISTERING THE EG MANAGER TO WORK WITH A SQL CLUSTER ..............................................................................................53 8.2 MONITORING THE SQL CLUSTER .......................................................................................................................................................55 CONFIGURING AND MONITORING A BACKUP SQL SERVER ................................................................................................56 9.1 ADMINISTERING THE EG MANAGER TO WORK WITH A BACKUP SQL SERVER .................................................................................56 9.2 MONITORING THE BACKUP SQL SERVER ...........................................................................................................................................58 CONFIGURING AND MONITORING INFORMIX DYNAMIC SERVERS..................................................................................60 10.1 ADMINISTERING THE EG MANAGER TO WORK WITH AN INFORMIX DYNAMIC SERVER ....................................................................60 10.2 MONITORING THE INFORMIX DYNAMIC SERVER ................................................................................................................................70 10.3 TROUBLESHOOTING .............................................................................................................................................................................70 CONFIGURING AND MONITORING AN INTERSYSTEMS CACHE DATABASE...................................................................77 11.1 CONFIGURING AN INTERSYSTEMS CACHE DATABASE TO WORK WITH THE EG AGENT ....................................................................77 11.2 ADMINISTERING THE EG MANAGER TO MONITOR THE INTERSYSTEMS CACHE DATABASE ..............................................................87 11.3 MONITORING THE CACHE DATABASE SERVER ...................................................................................................................................91 11.4 TROUBLESHOOTING .............................................................................................................................................................................91 CONFIGURING AND MONITORING A POSTGRESQL SERVER ...............................................................................................93 12.1 PRE-REQUISITES FOR MONITORING A POSTGRESQL SERVER .............................................................................................................93 12.2 ADMINISTERING THE EG MANAGER TO MONITOR A POSTGRESQL SERVER .....................................................................................95 12.3 MONITORING THE POSTGRESQL SERVER...........................................................................................................................................98 CONCLUSION..........................................................................................................................................................................................99 Table of Figures Figure 1.1: Opening the Client Network Utility...........................................................................................................................................2 Figure 1.2: Enabling Multiprotocol support using the SQL Client Network Utility ...................................................................................2 Figure 1.3: Opening the Server Network Utility ..........................................................................................................................................3 Figure 1.4: Enabling Multiprotocol support using the SQL Server Network Utility...................................................................................3 Figure 1.5: Selecting the component-type to be managed ...........................................................................................................................4 Figure 1.6: Managing / Unmanaging a Microsoft SQL Server ....................................................................................................................5 Figure 1.7: List of Unconfigured tests displaying the SQL Network test as unconfigured.........................................................................5 Figure 1.8: Configuring the SQL Network test ............................................................................................................................................6 Figure 2.1: Selecting the component-type to be managed .........................................................................................................................10 Figure 2.2: Managing / Unmanaging an Oracle Database server............................................................................................................10 Figure 2.3: A warning message prompting you to configure the Oracle server ........................................................................................11 Figure 2.4: The ADD/MODIFY page displaying the Oracle Database server to be configured...............................................................12 Figure 2.5: Specifying the SID of the Oracle server ..................................................................................................................................12 Figure 2.6: List of tests to be configured for an Oracle Database server ...................................................................................................13 Figure 2.7: Specifying the parameters to be configured for Oracle Tablespaces test................................................................................13 Figure 2.8: Adding a new database user through the eG user interface.....................................................................................................14 Figure 3.1: Adding an External Oracle Server ..................................................................................................................................17 Figure 3.2: The list of Unconfigured tests for an External Oracle server ..................................................................................................17 Figure 3.3: Configuring the Oracle SQL Network test for an External Oracle Server..............................................................................17 Figure 4.1: Adding an Oracle Cluster .........................................................................................................................................................20 Figure 4.2: The list of unconfigured tests for the Oracle Cluster...............................................................................................................21 Figure 4.3: Configuring the Oracle Session Module Waits test.................................................................................................................21 Figure 4.4: Configuring the Oracle SQL Network test ..............................................................................................................................22 Figure 5.1: Messages indicating that the default monitors have not been turned on .................................................................................24 Figure 5.2: Selecting the This Account option from the Log On tab .........................................................................................................26 Figure 5.3: Viewing the list of unmanaged DB2 UDB - 6/7 . x servers in the COMPONENTS - MANAGE / UNMANAGE page ...27 Figure 5.4: Managing a DB2 UDB - 6/7 . x server ...................................................................................................................................28 Figure 5.5: Adding the DB2UDB server ....................................................................................................................................................29 Figure 5.6: List of unconfigured tests for the DB2 UDB server ................................................................................................................29 Figure 5.7: Configuring the Db2 Activity test............................................................................................................................................30 Figure 5.8: Configuring the Db2Service test.............................................................................................................................................30 Figure 5.9: Adding the DB2 DPF server ....................................................................................................................................................32 Figure 5.10: List of unconfigured tests for the DB2 DPF server ...............................................................................................................32 Figure 5.11: Configuring the Db2 Locks test .............................................................................................................................................32 Figure 6.1: Configuring the Sybase Adaptive server .................................................................................................................................37 Figure 6.2: Viewing the list of unmanaged Sybase Adaptive servers........................................................................................................38 Figure 6.3: Managing a Sybase server........................................................................................................................................................39 Figure 6.4: A table displaying the List of Unconfigured Tests for the Sybase server ...............................................................................39 Figure 6.5: Configuring the parameters of the Sybase Responses test ......................................................................................................40 Figure 6.6: Configuring the SybaseNetwork test .......................................................................................................................................40 Figure 6.8: Adding Sybase ASE component ..............................................................................................................................................42 Figure 6.9: A table displaying the List of Unconfigured Tests for the Sybase ASE 15 ............................................................................43 Figure 6.10: Configuring Sybase long Running Queries test.....................................................................................................................43 Figure 6.11: Configuring Sybase Users test ...............................................................................................................................................44 Figure 7.1: The mysql.com home page.......................................................................................................................................................46 Figure 7.2: Clicking on the connector to be downloaded...........................................................................................................................47 Figure 7.3: Picking a mirror site .................................................................................................................................................................47 Figure 7.4: Picking a mirror site and downloading ....................................................................................................................................48 Figure 7.5: Selecting the MySQL server to be managed............................................................................................................................50 Figure 7.6: Managing the MySQL server...................................................................................................................................................51 Figure 7.7 Configuring the MySQL Network test......................................................................................................................................51 Figure 8.1: Adding the Microsoft SQL Cluster ..........................................................................................................................................54 Figure 8.2: A segment containing the cluster service and the MS SQL servers ........................................................................................54 Figure 8.3: A page listing the unconfigured tests for the Sql cluster service and individual Sql servers..................................................54 Figure 9.1: Selecting the Backup SQL server to be managed....................................................................................................................57 Figure 9.2: Managing the Backup SQL server ...........................................................................................................................................57 Figure 9.3: Configuring the Backup SQL test ............................................................................................................................................58 Figure 10.1: Selecting the Informix Dynamic server to be managed.........................................................................................................61 Figure 10.2: Managing the Informix Dynamic server................................................................................................................................61 Figure 10.3: Configuring the Informix Response test ................................................................................................................................62 Figure 10.4: Opening the Server Instance Manager ...................................................................................................................................63 Figure 10.5: Viewing the list of server instances .......................................................................................................................................63 Figure 10.6: Opening the database instance ...............................................................................................................................................64 Figure 10.7: Issuing the dbaccess command ..............................................................................................................................................64 Figure 10.8: The DBACCESS menu ..........................................................................................................................................................65 Figure 10.9: The CONNECTION menu.....................................................................................................................................................65 Figure 10.10: Selecting the Database server instance ................................................................................................................................66 Figure 10.11: Logging into the database server..........................................................................................................................................66 Figure 10.12: Specifying the admin password ...........................................................................................................................................67 Figure 10.13: Selecting the database to open .............................................................................................................................................67 Figure 10.14: A message stating that the database has been selected ........................................................................................................68 Figure 10.15: Granting connect permission to user john............................................................................................................................68 Figure 10.16: Configuring the Informix Sessions test................................................................................................................................69 Figure 10.17: Opening the database instance .............................................................................................................................................71 Figure 10.18: Issuing the dbaccess command ............................................................................................................................................71 Figure 10.19: The DBACCESS menu ........................................................................................................................................................72 Figure 10.20: The CONNECTION menu...................................................................................................................................................72 Figure 10.21: Selecting the Database server instance ................................................................................................................................73 Figure 10.22: Logging into the database server..........................................................................................................................................73 Figure 10.23: Specifying the admin password ...........................................................................................................................................74 Figure 10.24: Selecting the database to open .............................................................................................................................................74 Figure 10.25: A message stating that the database has been selected ........................................................................................................75 Figure 11.1: The Services page...................................................................................................................................................................78 Figure 11.2: Enabling service monitoring ..................................................................................................................................................79 Figure 11.3: Switching to a different namespace .......................................................................................................................................80 Figure 11.4: Specifying the Namespace to switch to .................................................................................................................................80 Figure 11.5: Executing the routine %MONAPPMGR ...............................................................................................................................81 Figure 11.6: Selecting the Manage Monitor Classes option.......................................................................................................................81 Figure 11.7: Choosing to activate/deactivate a monitor class ....................................................................................................................82 Figure 11.8: Specifying the name of the class to activate/deactivate.........................................................................................................82 Figure 11.9: Activating the Monitor Class .................................................................................................................................................83 Figure 11.10: Selecting another class for activation...................................................................................................................................83 Figure 11.11: Activating the Database, Processes, and SystemMetrics class............................................................................................84 Figure 11.12: The Monitor Settings page of the System Management Portal ...........................................................................................85 Figure 11.13: Enabling the SNMP Agent to start on system boot .............................................................................................................86 Figure 11.14: Managing a Cache Database server .....................................................................................................................................87 Figure 11.15: A table displaying the list of unconfigured tests for the Cache Database server ................................................................87 Figure 11.16: Configuring the parameters of the Cache Buffer test ..........................................................................................................88 Figure 11.17: Configuring the Cache Console Log test .............................................................................................................................89 Figure 11.18: Configuring the Cache Performance test .............................................................................................................................90 Figure 12.1: Locating the pg_hba.conf file.................................................................................................................................................93 Figure 12.2: The pg_hba.conf file...............................................................................................................................................................94 Figure 12.3: The Client Access Configuration pop up used for modifying the pg_hba.conf file .............................................................95 Figure 12.4: Adding a PostgreSQL Server .................................................................................................................................................96 Figure 12.5: List of Unconfigured tests to be configured for the PostgreSQL server ...............................................................................96 Figure 12.6: Configuring the PostgreSQL Access test...............................................................................................................................97 Configuring and Monitoring an MS SQL Server Chapter 1 Configuring and Monitoring an MS SQL Server This chapter discusses the procedure to configure and monitor an MS SQL server. 1.1 Configuring an MS SQL Server 1.1.1 User Privileges Required for Monitoring an MS SQL Server To monitor an MS SQL server 7.0/2000, all tests should be configured with the credentials of a SQL user with Sysadmin role. For monitoring an MS SQL server 2005/2008/2012, all tests should be configured with the credentials of a SQL user with CONNECT SQL, VIEW ANY DATABASE, and VIEW SERVER STATE roles. 1.1.2 Configuring the MS SQL Server to Communicate with the eG Manager via HTTP/HTTPS 1. The eG agent on the MS SQL server communicates with the eG manager via HTTP/HTTPS. However, some MS SQL server installations could, by default, support only TCP/IP connections. Under such circumstances, you might have to reconfigure the SQL installation to additionally support HTTP/HTTPS protocols, so that the eG agentmanager communication is not affected. To ensure this, do the following: 2. On the MS SQL server host, follow the menu sequence, Start -> Programs -> Microsoft SQL Server -> Client Network Utility, to open the MS SQL server's Client Network Utility (see Figure 1.1). 1 Configuring and Monitoring an MS SQL Server Figure 1.1: Opening the Client Network Utility In the General tab of Figure 1.2 that appears next, check whether the Multiprotocol option is available in the Enable protocols by order list. If not, then select it from the Disabled protocols list and select the Enable button to enable it. Figure 1.2: Enabling Multiprotocol support using the SQL Client Network Utility Finally, click the Apply and OK buttons in Figure 1.2 to register the changes. Next, follow the menu sequence depicted by Figure 1.3 to open the MS SQL server's Server Network Utility. 2 Configuring and Monitoring an MS SQL Server Figure 1.3: Opening the Server Network Utility When Figure 1.4 appears, check whether the Multiprotocol option is available in the Enable protocols by order list. If not, then select it from the Disabled protocols list and select the Enable button to enable it. Figure 1.4: Enabling Multiprotocol support using the SQL Server Network Utility Finally, click the Apply and OK buttons in Figure 1.4 to register the changes. 3 Configuring and Monitoring an MS SQL Server 1.2 Administering the eG Manager to monitor an MS SQL Server To configure eG to monitor a Microsoft SQL server, do the following: 1. First, login through the eG user interface. 2. If the Microsoft SQL Server is already discovered, use the menu sequence Infrastructure > Components -> Manage/Unmanage to manage it (see Figure 1.5 and Figure 1.6 for a pictorial representation of the server management procedure). Otherwise, manually add the target MS SQL server using the ADD / MODIFY COMPONENTS page. The components so added are automatically managed. Figure 1.5: Selecting the component-type to be managed 4 Configuring and Monitoring an MS SQL Server Figure 1.6: Managing / Unmanaging a Microsoft SQL Server 3. Next, sign out of the eG administrative interface. Along with other tests, you will be prompted to configure an MsSqlNet test (see Figure 1.7). This test emulates a user request to a Microsoft SQL Server and hence, requires the user name and password that it should use to be configured. Figure 1.7: List of Unconfigured tests displaying the SQL Network test as unconfigured 4. Click on the SQL Network test to configure it. Doing so, will reveal test parameters (see Figure 1.8). 5 Configuring and Monitoring an MS SQL Server Figure 1.8: Configuring the SQL Network test 5. Then, furnish the following information in the parameters section of Figure 1.8: a. TEST PERIOD – how often should the test be executed b. HOST – The IP address / host name of the MS SQL server c. PORT - The port number through which the Microsoft Sql Server communicates. The default port is 1433. d. INSTANCE - In this text box, enter the name of a specific MS SQL instance that is to be monitored. The default value of this parameter is "default". To monitor an MS SQL instance named "CFS", enter this as the value of the INSTANCE parameter. If a particular instance name is provided here, ensure that the PORT parameter specification is not modified. e. USER – The name of a SQL user who has privileges mentioned in Page 1. f. PASSWORD- The password corresponding to the above user. g. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. h. DOMAIN - By default, none is displayed in the DOMAIN text box. If the 'SQL server and Windows' authentication has been enabled for the server being monitored, then the DOMAIN can continue to be none. On the other hand, if 'Windows only' authentication has been enabled, then, in the DOMAIN text box, specify the Windows domain in which the managed MS SQL server exists. Also, in such a case, the USER name and PASSWORD that you provide should be that of a user authorized to access the monitored SQL server host. i. SSL- If the MS SQL Server being monitored is an SSL-enabled server, then set this flag to Yes. If not, set this flag to No. j. DATABASE - The name of the database to connect to. The default is “master”. k. QUERY – The select query master.dbo.spt_monitor”. to 6 execute. The default is “select * from Configuring l. 6. and Monitoring an MS SQL Server ISPASSIVE - If the value chosen is YES, then the MS SQL server under consideration is a passive server in a SQL cluster. No alerts will be generated if the server is not running. Measures will be reported as “Not applicable’ by the agent if the server is not up. This parameter will be available for every MS SQL server test uptill the Application Processes layer. Once the configuration is complete, click on the Update button to save the changes and then, sign out of the administrative interface. 1.3 Monitoring the MS SQL Server To monitor the Microsoft SQL server, do the following: 1. Login to the eG Enterprise system as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, select the Servers option from the Components menu, and click on the monitored MS SQL server in the Components page. This displays the layer model, tests and measurements of a Microsoft SQL Server. 1.3.1 Troubleshooting If the measurements of a Microsoft SQL Server are not showing up, check the following: Is the internal agent running on the MS SQL server? Is the user / password provided for the Microsoft SqlNet test valid? Does the user specified have the privileges mentioned in Page 180? eG agents use Windows perfmon counters to monitor MS SQL servers. If these perfmon counters are not enabled, then the eG agents monitoring the MS SQL server will not be able to generate measurements. In order to enable the perfmon counters of the MS SQL server, do the following: a. Stop the MSSQLSERVER service, if running. To do this, first, open the Services window using the menu sequence: Start -> Programs -> Administrative Tools -> Services. From the right panel of the window, select the MSSQLSERVER service, right-click on it and select Stop from the shortcut menu that pops out. b. Next, at the command prompt, move to the <MSSQL_HOME_DIR>\binn directory and then, type the command lodctr sqlctr.ini. This file contains information on all the counters that correspond to the MSSQLSERVER service. Loading this file activates the counters within. c. Finally, restart the machine. d. Upon restarting, all counters corresponding to the MSSQLSERVER service will be enabled. If the Network test alone is working, then it could be because the internal agent is not running. If the Network test is not gathering measurements, then check whether the external agent is running. If the SQL Network test is not reporting measurements, verify whether the username and password were configured via the admin interface. 7 Configuring and Monitoring an MS SQL Server If the SQL Network test shows that availability is 0, but the SQL server is up and running, then check whether the right user name and password were configured. 8 Configuring and Monitoring an Oracle Server Chapter 2 Configuring and Monitoring an Oracle Server 2.1 Administering the eG Manager to monitor an Oracle Server eG agents can collect a variety of statistics regarding Oracle database servers. To configure eG to monitor an Oracle Database server, do the following: 1. First, login through the eG user interface. 2. If the Oracle server is already discovered, use the menu sequence Infrastructure -> Components -> Manage /Unmanage to manage it (see Figure 2.1 and Figure 2.2 for a pictorial representation of the server-management procedure). Otherwise, manually add the target Oracle server using the ADD / MODIFY COMPONENTS page. The components so added are automatically managed. 9 Configuring and Monitoring an Oracle Server Figure 2.1: Selecting the component-type to be managed Figure 2.2: Managing / Unmanaging an Oracle Database server 10 Configuring 3. and Monitoring an Oracle Server The warning message displayed below will follow a manual Oracle server-management routine. Figure 2.3: A warning message prompting you to configure the Oracle server 4. Such a message appears, when the instances corresponding to the managed Oracle server are not configured. In order to configure the instances, first, switch to the ADD/MODIFY COMPONENTS page and then select Oracle Database server as the Component type. The Oracle Database server to be configured will then appear (as shown in Figure 2.4). 11 Configuring and Monitoring an Oracle Server Figure 2.4: The ADD/MODIFY page displaying the Oracle Database server to be configured 5. Click the Modify button corresponding to the Oracle server, to modify its properties. Doing so, will reveal the following screen: Figure 2.5: Specifying the SID of the Oracle server 6. Here, specify the instance (i.e. SID) of the Oracle server and click the Update button. 7. Next, try to sign out of the eG administrative interface. Along with other tests, you will be prompted to configure an Oracle Tablespaces test (see Figure 2.6). 12 Configuring and Monitoring an Oracle Server Figure 2.6: List of tests to be configured for an Oracle Database server 8. Click on the Oracle Tablespaces test in the above screen to configure its parameters. When this is done, the following parameters will show up: Figure 2.7: Specifying the parameters to be configured for Oracle Tablespaces test 9. To monitor an Oracle Database server, the eG Enterprise system requires that a special database user account be created in each Oracle database instance to be monitored. To create the user account, click on the Click here hyperlink in the parameters section above. Doing so will bring up a page as depicted by Figure 2.8 below. 13 Configuring and Monitoring an Oracle Server Figure 2.8: Adding a new database user through the eG user interface 10. The HOST NAME, PORT and the SID of the Oracle server to be configured appear in the corresponding location and cannot be changed. If the user chooses to monitor Oracle 7.x, it is mandatory to provide the password of the SYS user in the SYS PASSWORD text box (this field is exclusive to Oracle 7.x and will not appear if the choice of Oracle server is 8.x or 9.x). To add a new user, specify the DB ADMIN login and the DB ADMIN PASSWORD. You also need to provide the DB USER login and the DB USER PASSWORD. While creating a new user, the account has to be associated with a DEFAULT TABLESPACE where the user’s data is hosted and a TEMP TABLESPACE which is used for buffering, sorting etc. The identities of these tablespaces have to be input in the above page. After specifying the above, click the Add button to register the changes. 11. Alternatively, you can manually create the special database user. When doing so, ensure that this user is vested with the select_catalog_role and create session privileges. The sample script we recommend for user creation for eG monitoring is: create user oraeg identified by oraeg create role oratest; grant create session to oratest; grant select_catalog_role to oratest; grant oratest to oraeg; 12. Now, a page confirming the successful creation of the DB user will appear. Click on the link leading you back to the Add New Database User page and from there, click the << button to return to the OracleTablespaces test parameters page. Then, continue configuring the test parameters as follows: a. TEST PERIOD - how often should the test be executed b. HOST – the host name / IP address for which the test is to be configured c. PORT - the port number for which the test is to be configured d. USER - the database user name 14 Configuring and Monitoring an Oracle Server e. PASSWORD – password for the database user f. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. g. MODE – Set the MODE parameter to ALL to monitor all Oracle tablespaces regardless of their modes. By default, the ALL option will be selected from the MODE list box. To monitor only those Oracle tablespaces which are in read-only mode, select the READONLY option from the drop-down list. To monitor the Oracle tablespaces that are in the read-write mode, select the READ/WRITE option from the drop-down list. h. ISPASSIVE - If the value chosen is YES, then the Oracle server under consideration is a passive server in an Oracle cluster. No alerts will be generated if the server is not running. Measures will be reported as “Not applicable’ by the agent if the server is not up. This parameter will be available for every Oracle test uptill the Application Processes layer. 13. Finally, click the Update button to register the changes, and then, try signing out of the administrative interface. 2.2 Monitoring the Oracle Server To view the measurements gathered by the tests run on an Oracle server, do the following: 1. Login as a monitor / supermonitor user 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the independent Oracle server being monitored and view its measurements. 2.2.1 Troubleshooting • If the Network test alone is working, it indicates that the internal agent is not running. • If none of the Oracle tests are reporting measurements, check the following: • Did you remember to configure the user name and password for the Oracle tests in the eG admin interface? • Did you create the user account using the eG admin interface? For details on how to create an Oracle database user account, refer to steps 9 and 10 of Section 2.1 above. • The OraSqlNet test is reporting availability as 0, even though the Oracle server is running properly. In such a case, make sure that the user account exists in the Oracle database. 15 Configuring and Monitoring an External Oracle Server Chapter 3 Configuring and Monitoring an External Oracle Server Previously, we elaborately discussed how to configure and monitor an Oracle database server using an internal eG agent. However, some administrators might not have access to Oracle servers in their environment, and might hence be unable to install agents on them. Nevertheless, these administrators might still want to monitor external health indicators such as the availability and responsiveness of the Oracle server. In order to enable administrators to collect such external metrics in a non-intrusive manner, eG Enterprise offers the External Oracle Server model. To use this model, only a single eG external agent is required; this agent sits on a remote host and determines the health of the target Oracle server from an external perspective. 3.1 Administering the eG Manager to Work with an External_oracle_server To enable external monitoring of an Oracle server, do the following: 1. Login as an administrator to the eG administrative interface 2. Next, add Oracle server in your environment as the External Oracle using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify) (see Figure 3.1). Components manually added will be automatically managed by the eG Enterprise system (see Figure 3.1). 16 Configuring and Monitoring an External Oracle Server Figure 3.1: Adding an External Oracle Server 3. Next, try signing out of the administrative interface. You will then be prompted to configure the Oracle SQL Network test for the managed External Oracle server (see Figure 3.2). Figure 3.2: The list of Unconfigured tests for an External Oracle server 4. Click on the Oracle SQL Network test to configure it. This test emulates a user executing a query on an Oracle server instance to determine the availability of the server and the speed with which the server responds to the emulated request. Figure 3.3: Configuring the Oracle SQL Network test for an External Oracle Server 5. In Figure 3.3, specify the following: 17 Configuring and Monitoring an External Oracle Server TEST PERIOD - How often should the test be executed HOST – The host for which the test is to be configured PORT - The port on which the server is listening USER – In order to monitor an Oracle database server externally, a special database user account has to be created in the Oracle database instance that requires external monitoring. When creating the user account, ensure that the user is vested with the select_catalog_role and create session privileges. The sample script we recommend for user creation for eG monitoring is: create user oraeg identified by oraeg create role oratest; grant create session to oratest; grant select_catalog_role to oratest; grant oratest to oraeg; The name of this user has to be specified against USER. PASSWORD – Password of the specified database user CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. ORACLESID - The variable name of the oracle instance. This parameter will not be available while configuring this test for an Oracle Database server. However, it will be available for this test when monitoring an Oracle Cluster service or an External Oracle server. TIMEOUT - Specify the duration (in seconds) within which the SNMP query executed by this test should time out in the TIMEOUT text box. The default is 10 seconds. DETAILED DIAGNOSIS - To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: o The eG manager license should allow the detailed diagnosis capability o Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. ISPASSIVE – If the value chosen is YES, then the Oracle server under consideration is a passive server in an Oracle cluster. No alerts will be generated if the server is not running. Measures will be reported as “Not applicable’ by the agent if the server is not up. 6. Then, click the update button in Figure 3.3 to save the changes, and finally, exit the eG admin interface. 18 Configuring and Monitoring an External Oracle Server 3.2 Monitoring the External Oracle server To view the measurements pertaining to the External Oracle server, do the following: 1. Login as a monitor / supermonitor user 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the External Oracle Server being monitored and view its layer model, tests and measurements of the External Oracle server. 19 Configuring and Monitoring the Oracle Cluster Chapter 4 Configuring and Monitoring the Oracle Cluster This chapter explains in detail about how to administer and monitor the Oracle Cluster. 4.1 Administering the eG Manager to Work with an Oracle Cluster To achieve this, do the following: 1. Login as an administrator to the eG administrative interface 2. Next, add the Oracle cluster component type using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify) (see Figure 4.1). Components manually added will be automatically managed by the eG Enterprise system (see Figure 4.1). Figure 4.1: Adding an Oracle Cluster 3. Now, when you try to sign out of the eG administrative interface, the following screen will appear, prompting you to configure various tests. 20 Configuring and Monitoring the Oracle Cluster Figure 4.2: The list of unconfigured tests for the Oracle Cluster 4. Click on the Oracle Session Module Waits test to configure it. Upon clicking, this test, Figure 4.3 appears. Figure 4.3: Configuring the Oracle Session Module Waits test 5. To configure the test, specify the following in Figure 4.3: TEST PERIOD - How often should the test be executed HOST – The host for which the test is to be configured PORT - The port on which the server is listening USERNAME – In order to monitor an Oracle cluster, a special database user account has to be created. When doing so, ensure that this user is vested with the select_catalog_role and create session privileges. The sample script we recommend for user creation for eG monitoring is: create user oraeg identified by oraeg create role oratest; grant create session to oratest; grant select_catalog_role to oratest; grant oratest to oraeg; The name of this user has to be specified here. PASSWORD – Password of the specified database user CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. ORACLESID - The variable name of the oracle instance. ISPASSIVE – If this parameter is set to YES, then it means that, by default, all Oracle servers being monitored by the eG system are the passive servers of an 21 Configuring and Monitoring the Oracle Cluster Oracle cluster. No alerts will be generated if the servers are not running. Measures will be reported as "Not applicable" by the agent if the servers are not up. 6. Then click the Update button. Now when you try to sign out, you will be prompted to configure the Oracle SQL Network test. Click on this test to configure it. Figure 4.4 will then appear. Figure 4.4: Configuring the Oracle SQL Network test 7. To configure this test, specify the following in Figure 4.4: TEST PERIOD - How often should the test be executed HOST – The host for which the test is to be configured PORT - The port on which the server is listening USER – In order to monitor an Oracle cluster, a special database user account has to be created. When doing so, ensure that this user is vested with the select_catalog_role and create session privileges. The sample script we recommend for user creation for eG monitoring is: create user oraeg identified by oraeg create role oratest; grant create session to oratest; grant select_catalog_role to oratest; grant oratest to oraeg; The name of this user has to be specified here. PASSWORD – Password of the specified database user CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. ORACLESID - The variable name of the oracle instance. This parameter will not be available while configuring this test for an Oracle Database server. However, it will 22 Configuring and Monitoring the Oracle Cluster be available for this test when monitoring an Oracle Cluster service or an External Oracle server. TIMEOUT - Specify the duration (in seconds) within which the SNMP query executed by this test should time out in the TIMEOUT text box. The default is 60 seconds. DETAILED DIAGNOSIS - To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: o The eG manager license should allow the detailed diagnosis capability o Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. ISPASSIVE – In case of an Oracle cluster service, the status of this flag has no significance. Therefore, leave it as is. 8. Then, click the Update button in the Figure 4.4 to update the configuration. 9. Finally, sign out of the administrative interface. 4.2 Monitoring the Oracle Cluster 1. Login as a Monitor / Supermonitor user to the eG monitor user interface 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. In the COMPONENT LIST page, click on the Oracle Cluster component for which you wish to view measurements. 23 Configuring and Monitoring a DB2 Database Server Chapter 5 Configuring and Monitoring a DB2 Database Server A DB2 database server may have multiple server instances each with different databases. eG Enterprise's agents can monitor the individual instances and databases. 5.1 Configuring a DB2 Server 6.0/7.X to work with the eG Agent 5.1.1 Configuring a DB2 Server on Unix Environments To monitor a specific DB2 instance on Unix environments, login as the owner of the database instance and go to the /opt/egurkha/bin directory. From this directory, run the start_egdb2mon script. This script, checks the default monitors of the DB2 server that are required by eG agents for monitoring this database server. If the DB2 default monitors are not started (by default, they will not be started), then the start_egdb2mon script generates the messages as shown in Figure 5.1 Figure 5.1: Messages indicating that the default monitors have not been turned on 24 Configuring and Monitoring a DB2 Database Server Now, use the script egdb2monswitch from the directory /opt/egurkha/bin, to switch on all the necessary default monitors. This script can be run only by the DB2 instance owner. Alternately, the same can be manually achieved by issuing the following commands at the command prompt: [db2inst1@lin15 bin]$ db2 update database manager config using DFT_MON_BUFPOOL on DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed successfully. DB21025I Client changes will not be effective until the next time the application is started or the TERMINATE command has been issued. Server changes will not be effective until the next DB2START command. [db2inst1@lin15 bin]$ Use the same method to start all the following default monitors. • DFT_MON_BUFPOOL • DFT_MON_LOCK • DFT_MON_TABLE • DFT_MON_UOW • DFT_MON_SORT • DFT_MON_STMT After all the default monitors have been started, remember to restart the database or else the changes will not take effect. 1. To stop the DB2 instance, issue the command db2stop. To restart the instance, use the command db2start at the command prompt. These can normally be found under the $INSTANCE/sqllib/adm directory of the instance that is being monitored. Sometimes, the DB2 database may not stop completely and instead, may send out a message stating that as some applications are already active, the DB2 instance could not be stopped. In that case, make sure that every required action is complete in that instance and then issue the following command to force the shutdown: db2 force application all Now, try stopping the database and restart it. This will ensure that the DB2 Server has been completely configured to work with eG. 5.1.2 Configuring a DB2 Server on Windows 2000 Here again, create the eG DB2 PerfMonitor service following the same procedure as explained in Section 3.2 Once the service is created, follow the steps given below to start the service (Steps 35 are to be executed for the first time only): 25 Configuring and Monitoring a DB2 Database Server 1. Go to Control Panel > Administrative Tools -> Services 2. In the list of services, click on eGDB2<port number>. For example, if 50000 is the port number, then the name of the service will be eGDB250000. 3. Click the Properties button available in the Services panel to open the Service panel for the selected service. 4. Click on the Log On tab and choose the This Account selection. Figure 5.2: Selecting the This Account option from the Log On tab 5. Enter the username of the DB2 admin user in the This Account text box and the corresponding password against the Password text box. 6. Confirm the password by retyping it in the Confirm password text box. Then, click on the OK button at the bottom of the panel. 7. Start the selected service by clicking the Start button in the Services panel. If the DB2 server is not configured with the performance monitors turned on, execute the command <EG_INSTALL_DIR>\lib\egdb2switch.bat. 5.2 Administering the eG Manager to monitor the DB2 6/7 . x Database Server 1. Once configuration is complete, the DB2 UDB - 6/7 . x server will be available to be discovered, managed and finally, monitored by eG. While the DISCOVERY page accessed using the menu sequence Infrastructure -> Components -> Discover facilitates automatic discovery of the server, the COMPONENTS - MANAGE / UNMANAGE page (Infrastructure -> Components -> Manage/Unmanage) is where you should go to manually manage the discovered DB2 - 6/7 . x server. 26 Configuring 2. and Monitoring a DB2 Database Server The screens below (Figure 5.3 and Figure 5.4) will help you perform the servermanagement operation. For a more elaborate description on how to manage components, please refer to Configuring and Monitoring Web Servers document. Figure 5.3: Viewing the list of unmanaged DB2 UDB - 6/7 . x servers in the COMPONENTS - MANAGE / UNMANAGE page 27 Configuring and Monitoring a DB2 Database Server Figure 5.4: Managing a DB2 UDB - 6/7 . x server 3. Once you are done managing the DB2UDB-6/7.x server, sign out of the administrative interface. 5.3 Monitoring the DB2 – 6.0/7.X Database Server To monitor a DB2 server, login as a monitor / supermonitor user. Click on the Components option in the menu bar, select the Servers option from the Components menu, and then, click on the DB2 server in the Components page. The layer model , tests and measurements of the DB2 UDB server then appears. 5.3.1 Troubleshooting If a DB2 server is in an unknown state, then do the following: 1. Execute the eG internal agent on the DB2 server’s host. 2. In addition, a separate DB2 performance monitor script has to be started. One instance of this script has to be executed for each DB2 instance to be monitored. This script uses the DB2 snapshot-monitoring interface to extract and report performance data to the agent. This script should be executed from a user account that belongs to the DB2 administrator group. Please refer to Section 5.1 above for more details on the DB2 performance monitor script 5.4 Administering the eG Manager to monitor the DB2 UDB Server – Version 8.0 and above 1. Log into the eG administrative interface. 28 Configuring and Monitoring a DB2 Database Server 2. eG Enterprise cannot automatically discover the DB2 UDB server. You need to manually add the eDirectory netware using the ADD/MODIFY COMPONENTS page (see Figure 5.5) that appears when the Infrastructure -> Components -> Add/Modify menu sequence is followed. Remember that components manually added are managed automatically. For more details on adding components, refer to Configuring and Monitoring Web Servers document. Figure 5.5: Adding the DB2UDB server 3. When you attempt to sign out, a list of unconfigured tests appears (see Figure 5.6) Figure 5.6: List of unconfigured tests for the DB2 UDB server 4. Click on the Db2 Activity test in Figure 5.6 to configure it. Figure 5.7 then appears. 29 Configuring and Monitoring a DB2 Database Server Figure 5.7: Configuring the Db2 Activity test 5. To configure the test, specify the following in Figure 5.7. TEST PERIOD – How often should the test be executed HOST – The IP address of the DB2 server PORT – The port number through which the DB2 server communicates. The default port is 50000. USER - Specify the name of the user who has any of the following privileges to the specified DATABASE: SYSADM or SYSCTRL or SYSMAINT or SYSMON. PASSWORD - Enter the password of the specified USER in the PASSWORD text box. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. DATABASE - Specify the name of the database on the monitored DB2 server to be used by this test 6. Now click on Update to save the changes in the Figure 5.7 . 7. Now try to signout, it will prompt to configure the Db2Service test. (see Figure 5.8). Figure 5.8: Configuring the Db2Service test 8. To configure the test, specify the following in Figure 5.8. TEST PERIOD – How often should the test be executed 30 Configuring and Monitoring a DB2 Database Server HOST – The IP address of the DB2 server PORT – The port number through which the DB2 server communicates. The default port is 50000. USER - Specify the name of the user who has any of the following privileges to the specified DATABASE: SYSADM or SYSCTRL or SYSMAINT or SYSMON. PASSWORD - Enter the password of the specified USER in the PASSWORD text box. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. DATABASE - Specify the name of the database on the monitored DB2 server to be used by this test. QUERY - The test emulates a user executing a query on the specified DATABASE, and thus determines the availability and responsiveness of the database server. In the QUERY text box, specify the select query to execute. 9. Finally, click the Update button to register the changes, and then try signing out of the admin interface. This time it will prompt to configure the Processes test for the Informix Dynamic server. Refer to Configuration and Monitoring Web servers for details on configuring the Processes test and specifying the PROCESSPATTERN. 5.5 Monitoring the DB2 UDB Server Version 8.0 and above To monitor a DB2 UDB server, 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, select the Servers option from the Components menu, and then, click on the DB2 server in the Components page. 3. The layer model, tests and measurements of the DB2 UDB server then appears. 5.6 Administering the eG Manager to monitor a DB2 DPF Server 1. Login into the eG administrative interface. 2. eG Enterprise cannot automatically discover the DB2 DPF server. You need to manually add the eDirectory netware using the ADD/MODIFY COMPONENTS page (see Figure 5.9) that appears when the Infrastructure -> Components -> Add/Modify menu sequence is followed. Remember that components manually added are managed automatically. For more details on adding components, refer to Configuring and Monitoring Web Servers document. 31 Configuring and Monitoring a DB2 Database Server Figure 5.9: Adding the DB2 DPF server 3. When you attempt to sign out, a list of unconfigured tests appears (see Figure 5.10) Figure 5.10: List of unconfigured tests for the DB2 DPF server 4. Click on the Db2 Locks test in Figure 5.10 to configure it. Figure 5.11 then appears. Figure 5.11: Configuring the Db2 Locks test 5. To configure the test, specify the following in Figure 5.11. TEST PERIOD – How often should the test be executed HOST – The IP address of the DB2 DPF server 32 Configuring and Monitoring a DB2 Database Server PORT – The port number through which the DB2 DPF server communicates. The default port is 50000. USER - Specify the name of the user who has any of the following privileges to the specified DATABASE: SYSADM or SYSCTRL or SYSMAINT or SYSMON. PASSWORD - Enter the password of the specified USER in the PASSWORD text box. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. DATABASE - Specify the name of the database on the monitored DB2 server to be used by this test 6. Now click on Update to save the changes in the Figure 5.11 . 7. Now, try signing out of the admin interface. This time it will prompt to configure the Processes test for the Informix Dynamic server. Refer to Configuration and Monitoring Web servers for details on configuring the Processes test and specifying the PROCESSPATTERN. 5.7 Monitoring the DB2 DPF Server To monitor a DB2 DPF server, 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, select the Servers option from the Components menu, and then, click on the DB2 server in the Components page. 3. The layer model, tests and measurements of the DB2 DPF server then appears. 33 Configuring and Monitoring a Sybase Adaptive Server Chapter 6 Configuring and Monitoring a Sybase Adaptive Server This section briefly discusses the procedures involved in: Configuring a Sybase Adaptive server to work with the eG agent Administering the eG manager to monitor the Sybase Adaptive server Monitoring the Sybase Adaptive server 6.1 Configuring and Monitoring a Sybase Adaptive Server Using the Monitor Client Library In order to extract performance data from a Sybase server using the Monitor Client Library, eG Enterprise provides the Sybase monitoring model. This section discusses how to use the Sybase monitoring model. 6.1.1 Configuring a Sybase Adaptive Server on Unix To configure the Sybase Adaptive server for monitoring by an eG agent, you can use either the setup_agent command or the setup_sybase.sh command. Both these commands are available in the /opt/egurkha/bin directory. The setup_agent command is primarily used to configure the eG agent. The Sybase Adaptive server configuration is a part of this process. To configure the Sybase Adaptive server after configuring the agent, do the following: 1. At the command prompt, move to the /opt/egurkha/bin directory and run the setup_sybase.sh command. 2. Upon execution, the command will request for the following inputs: The IP address of the host on which the Sybase server has been installed The port at which the Sybase server listens The password of the Sybase administrative user (who holds the “sa_role” privilege). 34 Configuring and Monitoring a Sybase Adaptive Server Please enter the details of the Sybase Adaptive server which is running on this machine. IP address : 192.168.10.88 Port number : 4100 Password for sa login 3. : By default, the eG Sybase Monitor extracts the measures of interest by executing stored procedures on the 'master' database on the Sybase server. If, for some reason, you decide not to use the 'master' database, then you can create a special database for this purpose using this setup procedure. To achieve this, first, type y when setup prompts you for your confirmation to create a new database. Do you want to create a new database to store eG System Procedures and Tables? [y/n]: y 4. If you press y at step 2, you will be prompted for the new database name: Please enter the new Database name: john After you specify the name of the new database, setup will lead you step 4 where the special database user is to be created. On the other hand, if you press n at step 2 above, it means that you will be using the default 'master' database. In which case again, you will be lead to step 4 where a new database user is to be created. 5. eG Enterprise requires a special Sybase database user account for monitoring a Sybase server. This user should possess the “sa_role” privilege and the “sybase_ts_role” privilege. Setup will now request your confirmation for creating this user account. To monitor a Sybase Adaptive server, the eG Agent requires a user account with the sa_role and sybase_ts_role privilege. Do you want me to create a user with sa_role and sa_ts_role privilege in the database? [y/n]:y Enter y to proceed with the new user creation, or n if you do not wish to create a new database user. 6. If you enter y in step 2, you will be required to provide the following inputs: User : john Password : **** Retype Password : **** 35 Configuring and Monitoring a Sybase Adaptive Server Specify the name of the new user and his/her password in the space provided. Also, confirm the password by retyping it. 7. Once user creation is successful, the following message will appear: The user has been created successfully in the database. Please use this user name and password to configure the Sybase related tests using the eG Admin UI. 8. The /opt/egurkha/lib directory (in Windows, this will be <EG_INSTALL_DIR>/lib directory) in an agent host, consists of a file named sybmon.sql. This file comprises of 3 stored procedures, namely: sp_egmonitor, sp_eglockdetails, sp_egmonitor_dd. When these procedures are executed on the Sybase server, they enable the Sybase-specific tests to collect the required measures from the server. Towards this end, the setup will now perform the following tasks: Pick the three procedures from the /opt/egurkha/lib directory Log into the Sybase server using the sa login password provided earlier Install the procedures on the Sybase server The following messages indicate the installation attempts: Installing the procedure sp_egmonitor. . . Granting permissions. . Installing the procedure sp_eglockdetails. . . Granting permissions. . Installing the procedure sp_egmonitor_dd... Granting permissions. . 9. Once all the three procedures are successfully installed, setup will display the following message: Installation has succeeded 10. Subsequently, when the Sybase related tests are configured (using the special user’s name and password) and executed, the tests in turn, will run the installed procedures on the Sybase server, and collect the necessary statistics. 6.1.2 Configuring a Sybase Adaptive Server on Windows In Windows environments, eG provides a special Sybase configuration tool. To execute the tool, follow the menu sequence depicted by Figure 6.1. 36 Configuring and Monitoring a Sybase Adaptive Server Figure 6.1: Configuring the Sybase Adaptive server Once the configuration process begins, follow steps 2-9 of Section 6.1.1. 6.1.3 Administering the eG Manager to monitor the Sybase Adaptive Server 1. Login to the eG administrative interface as an administrator (admin). 2. Check whether the Sybase server has been auto-discovered. If not, run discovery using the DISCOVERY page (Infrastructure -> Components -> Discover) or manually add the Sybase server using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). The eG Enterprise system automatically manages the manually added components. 3. The discovered components however, need to go through a manual management exercise, using the COMPONENTS - MANAGE/UNMANAGE page (Infrastructure -> Components -> Manage/Unmanage). This process is depicted by Figure 6.2 and Figure 6.3 below. 37 Configuring and Monitoring a Sybase Adaptive Server Figure 6.2: Viewing the list of unmanaged Sybase Adaptive servers 38 Configuring and Monitoring a Sybase Adaptive Server Figure 6.3: Managing a Sybase server 4. Now, if you try to sign out of the user interface, you will be prompted to configure a series of tests for the managed Sybase server (see Figure 6.4). Figure 6.4: A table displaying the List of Unconfigured Tests for the Sybase server 5. Click on Sybase Responses test to configure it. Doing so, will reveal the following page, wherein the parameters of the Sybase Responses test needs to be configured. 39 Configuring and Monitoring a Sybase Adaptive Server Figure 6.5: Configuring the parameters of the Sybase Responses test 6. 7. The parameters to be configured are as discussed hereunder: a. TEST PERIOD – how often should the test be executed b. HOST – the IP address / host name of the Sybase Adaptive server c. PORT – the port number for which the test is to be configured d. USER – A Sybase user who has “sa_role” and “sybase_ts_role” e. PASSWORD – The password corresponding to the above user f. CONFIRM PASSWORD – Confirm the password by retyping it here. Finally, click the Update button to register the changes and try signing out of the admin interface once again. 8. This time you will be prompted to configure the SybaseNetwork test for the Sybase server. The SybaseNetwork test reports the network I/O statistics for a Sybase database server. Click on the test name to configure it. Figure 6.6: Configuring the SybaseNetwork test 9. Provide the USER name and PASSWORD that was specified while configuring the Sybase Responses test, and confirm the password by retyping it in the CONFIRM PASSWORD text box. Finally, click the Update button to register the changes. 10. Finally, sign out of the administrative interface. 40 Configuring 6.1.4 and Monitoring a Sybase Adaptive Server Monitoring the Sybase Adaptive Server 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the Sybase server from the list of Independent Components and view measurements. its 6.2 Configuring and Monitoring a Sybase Adaptive Server Using the MDA Tables Starting Sybase ASE 12.5.3, users have the option of installing MDA tables on the Sybase server for accessing critical performance statistics pertaining to the server. If MDA tables are installed on a Sybase server, then, you can use the Sybase ASE 15 monitoring model (see Figure 5.9) offered by eG Enterprise to monitor that Sybase server. This section discusses how to configure, administer, and use the Sybase ASE 15 model. 6.2.1 Configuring the eG Agent to Monitor the Sybase Adaptive Server Using the MDA Tables To use the Sybase ASE 15 model, the following pre-requisites need to be fulfilled: MDA tables should be installed on the Sybase server to be monitored; The eG agent should be configured with the user privileges required for monitoring. These privileges may differ across tests. While most tests need to be configured with the privileges of a user who has the "mon_role", the Sybase Database Space Usage test and the Sybase Database Stats test require the privileges of a user with the "mon_role" and "sa_role", and the Sybase System Processes test requires the "mon_role" and "sybase_ts_role". The test-specific documentation will shed more light on this. However, for best results, its recommended that you configure all tests with the credentials of a user with all three roles - "mon_role", "sa_role", and "sybase_ts_role". The following configuration parameters have to be enabled on the target Sybase server: o enable monitoring o sql text pipe active o sql text pipe max messages o statement pipe active o statement pipe max messages o errorlog pipe active o errorlog pipe max messages o deadlock pipe active o deadlock pipe max messages 41 Configuring 6.2.2 and Monitoring a Sybase o wait event timing o process wait events o object lockwait timing o SQL back capture o statement statistics active o per obect statistics active o enable stmt cache monitoring o max SQL text monitored o performance monitoring option Adaptive Server Administering the eG Manager to Monitor the Sybase Adaptive Server Using the Sybase ASE 15 Model 1. Login to the administrative interface as an administrator (admin). 2. Specify SYBASE ASE 15 as a new component in the Component type list box (see Figure 6.7) that appears in the New Component Details Page. Also, provide the Host IP and the nickname for the component that is to be added. Then click on the Add button so that the new component will be added. Figure 6.7: Adding Sybase ASE component 3. Then proceed to signout of the page. A list of unconfigured tests (see Figure 6.8) for the Sybase ASE 15 component will then appear. 42 Configuring and Monitoring a Sybase Adaptive Server Figure 6.8: A table displaying the List of Unconfigured Tests for the Sybase ASE 15 4. Click on Sybase Long Running Queries test to configure it. Doing so, will reveal the following page, wherein the parameters of the Sybase Long Running Queries test needs to be configured (see Figure 6.9). Figure 6.9: Configuring Sybase long Running Queries test 5. The parameters to be configured are as discussed hereunder: TEST PERIOD – how often should the test be executed HOST – the IP address / host name of the Sybase Adaptive server PORT – the port number for which the test is to be configured USER – To enable this test to connect to the Sybase server and collect the required metrics, it is enough if you configure the test with the name of a Sybase user who has the “mon_role”. However, for best results, it is recommended that you configure all Sybase tests with the credentials of a Sybase user who has the "mon_role", "sa_role', and "sybase_ts_role". PASSWORD – The password corresponding to the above user CONFIRM PASSWORD – Confirm the password by retyping it here. ELAPTIME – Specify the duration (in seconds) for which a query should have executed for it to be regarded as a long running query. The default value is 5. DDROWCOUNT – Specify the number of long running queries for which details will 43 Configuring and Monitoring a Sybase Adaptive Server be available in the detailed diagnosis page. By default, this parameter is set to 5. This indicates that even if the total number of long running queries is, say 10, the detailed diagnosis of this test will provide information pertaining to only 5 queries by default. For information related to more number of queries, you should increase the DDROWCOUNT. DETAILED DIAGNOSIS – To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enabled/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: o The eG manager license should allow the detailed diagnosis capability o Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. 6. Finally, click the Update button to register the changes and try signing out of the admin interface once again. 7. This time you will be prompted to configure the Sybase Users test for the Sybase ASE 15 component. Click on the test name to configure it. Figure 6.10: Configuring Sybase Users test 8. The parameters to be configured for the Sybase Users test (see Figure 6.10)are as discussed hereunder: a. TEST PERIOD – How often should the test be executed b. HOST – The IP address / host name of the Sybase Adaptive server c. PORT – The port number for which the test is to be configured d. USER – To enable this test to connect to the Sybase server and collect the required metrics, it is enough if you configure the test with the name of a Sybase user who has the “mon_role”. However, for best results, it is recommended that you configure all Sybase tests with the credentials of a Sybase user who has the "mon_role", "sa_role', and "sybase_ts_role". 44 Configuring and Monitoring a Sybase Adaptive Server e. PASSWORD – The password corresponding to the above user f. CONFIRM PASSWORD – Confirm the password by retyping it here. g. EXCLUDEUSER – Specify a comma-separated list of user names to be exclude from the monitoring scope of this test in the EXCLUDEUSER text box. h. DETAILED DIAGNOSIS – To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enabled/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: The eG manager license should allow the detailed diagnosis capability Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. 9. Then, click the Update button to register the changes and try signing out of the admin interface once again. 10. Here, you will be prompted to configure the Processes test for the Sybase ASE 15 component. Click on the test name to configure it. Refer to Configuration and Monitoring Web servers for details on configuring the Processes test and specifying the PROCESSPATTERN. 6.2.3 Monitoring using the Sybase ASE 15 Model 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the Sybase ASE 15 from the list of Independent Components and view its measurements. 45 Configuring and Monitoring MySQL Servers Chapter 7 Configuring and Monitoring MySQL Servers This section will discuss how to configure and monitor a MySQL server. 7.1 Configuring a MySQL Server An eG agent can monitor a MySQL database server and return performance metrics only when a MySQL connector is available in the <EG_INSTALL_DIR>/lib directory (in Unix, this would be /opt/egurkha/lib directory). To obtain this web connector, do the following: Go to the URL: http://www.mysql.com/. Click on the Downloads tab at the top of the page that appears (see Figure 7.1). Figure 7.1: The mysql.com home page The page that appears next lists the recent downloads of the current release. Click on MySQL Connector/J3.0 – production release to download the same (see Figure 7.1). 46 Configuring and Monitoring MySQL Servers Figure 7.2: Clicking on the connector to be downloaded The next page allows you to choose between downloading the tar form of the connector and the zip form (see Figure 7.2). You can download the connector in any of the forms by clicking on the corresponding Download link. However, to download faster, you can pick a mirror site that is close to your destination, and download from there. To view the list of mirror sites to choose from, click on the Pick a mirror link (see Figure 7.3) against any of the given forms. Figure 7.3: Picking a mirror site 47 Configuring and Monitoring MySQL Servers Upon identifying a destination from the list that appears, click on the HTTP or the FTP link against the destination (see Figure 7.4). The file will be downloaded accordingly. Figure 7.4: Picking a mirror site and downloading When downloading is complete, a mysql-connector-java-3.0.8-stable.tar.gz file will be available to you. Untar (or unzip, as the case may be) the downloaded file, and copy the mysqlconnector-java-3.0.8-stable-bin.jar file that is included in the tar to the <EG_INSTALL_DIR>/lib directory (in Unix, this would be /opt/egurkha/lib directory), and rename this file as mysql-connector.jar. Restart the agent. 7.2 Pre-requisites for Monitoring the MySQL Server An eG agent can monitor a MySQL database server and return performance metrics only when a MySQL connector is available in the <EG_INSTALL_DIR>/lib directory (in Unix, this would be /opt/egurkha/lib directory). To achieve this, refer to the procedure discussed in Section 7.1 of the Configuring and Monitoring Database Servers document. The eG agent should be configured with the credentials of a user who has server-wide PROCESS and SELECT privileges. For the related procedure, refer to Section 6.1.1 of this document. The MySQL server should be added/managed in the eG administrative interface using its IP address only, and not its host name. 7.2.1 Configuring the eG Agent with Access Privileges The MySQL tests should be configured with the credentials of a user who has server-wide PROCESS and SELECT privileges on the target MySQL server. 48 Configuring and Monitoring MySQL Servers If such a user does not pre-exist, then, in the user table of the mysql database of the target MySQL server, you need to manually create a user account with the aforesaid privileges. To achieve this, follow the procedure discussed below: a. To create a new user account, you must connect to the MySQL server as the MySQL root user. For that, first login to the MySQL host, and at the command prompt, issue the following command: mysql -u root If you have assigned a password to the root account, you will also need to supply a -password or -p option, as shown below: mysql -u root -pegurkha b. After successfully logging into the MySQL server, issue the following statement to access the mysql database, which holds the user table: use mysql c. Then, at the MySQL prompt, issue the following command to create a user: CREATE USER '<password>'; '<username>'@'<IP_address_of_eG_agent>' IDENTIFIED BY GRANT PROCESS,SELECT ON *.* TO '<username>'@'<IP_address_of_eG_agent>'; For instance, to ensure that user john (with password john) is able to connect to the MySQL server (being monitored) from the eG agent host, 192.168.8.91, the following command is to be issued: CREATE USER 'john'@'192.168.8.91' IDENTIFIED BY 'john'; GRANT PROCESS,SELECT ON *.* TO 'john'@'192.168.8.91'; Note: The CREATE and GRANT commands are case-sensitive; therefore, take care while specifying the user name, password, and privileges. Only the IP address of the eG agent's host can be provided as part of the CREATE command's syntax; the host name of the eG agent cannot be provided instead. d. Once the above-mentioned command executes successfully, the user table will be updated with a record for the user account that was newly created. Then, proceed to configure the tests. While doing so, remember to configure the USER name and PASSWORD parameters with the name and password (respectively) that corresponds to the eG agent's IP address in the user table. 7.3 Administering the eG Manager to work with the MySQL Server 1. Login to the administrative interface as an administrator (admin). 49 Configuring 2. and Monitoring MySQL Servers Check whether the MySQL server has been auto-discovered. If not, run discovery using the DISCOVERY page (Infrastructure -> Components -> Discover) or manually add the server using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). The eG Enterprise system automatically manages the manually added components. The discovered components however, need to go through a manual management exercise, using the COMPONENTS - MANAGE/UNMANAGE page (Infrastructure -> Components -> Manage/unmanage). This process is depicted by Figure 7.5 and Figure 7.6 below. Figure 7.5: Selecting the MySQL server to be managed 50 Configuring and Monitoring MySQL Servers Figure 7.6: Managing the MySQL server 3. Now, if you try to sign out of the user interface, you will be prompted to configure a series of tests for the managed MySQL server. Click on MySQL Network test to configure it. The following parameters will then be displayed. Figure 7.7 Configuring the MySQL Network test 4. In Figure 7.7, specify the following: TEST PERIOD – How often should the test be executed HOST – The IP address of the MySQL server PORT – The port on which the server is listening DB – the name of a database on the server 51 Configuring and Monitoring MySQL Servers USERNAME – a valid user name to login to the specified database PASSWORD – The password corresponding to the above user CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here. 5. Finally, click the Update button to register the changes and signout of the admin interface. 7.4 Monitoring the MySQL Server 1. Login as a monitor / supermonitor user. 2. Click on the components option in the menu bar, and select the Servers option from the components menu. 3. Select the MySQL server from the list of Independent Components and view its layer model, tests and measurements of MySQL server. 52 Configuring and Monitoring SQL Clusters Chapter 8 Configuring and Monitoring SQL Clusters 1. When two or more MS SQL servers exist in an environment, they can be grouped together to form a SQL cluster. Requests to a cluster are routed through a virtual cluster server that is assigned a cluster IP address and TCP port. Requests to this server can be handled by any of the individual nodes in the cluster at any given point in time, depending on which node is active at that time. 2. Since clusters are deployed in environments where 24*7 availability and responsiveness are critical, it is imperative that the performance of the clusters is monitored all the time. 8.1 Administering the eG Manager to work with a SQL Cluster To monitor an MS SQL Cluster, an eG external agent is deployed, which emulates a user executing a query on the cluster to determine the availability of the cluster and the speed with which the cluster responds to the emulated request. The emulated requests are directed at the virtual cluster server. Therefore, you need to manage the virtual cluster server as an SQL Cluster using the eG administrative interface. To achieve the same, do the following: 1. Login to the administrative interface as an administrator (admin). 2. Add the virtual cluster server in your environment as the SQL cluster service using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). This process is depicted by Figure 8.1 below. 53 Configuring and Monitoring SQL Clusters Figure 8.1: Adding the Microsoft SQL Cluster 3. Next, manage/manually add the individual MS SQL servers that form part of the cluster. Please refer to section 1.2 above for a more elaborate discussion on how to manage an MS SQL server. 4. Then, configure a new segment, where the SQL Cluster shares a USES relationship with all the individual MS SQL servers in the cluster (see Figure 8.2). The cluster service is deemed healthy if the user requests are served by at least one of the servers in the cluster. Figure 8.2: A segment containing the cluster service and the MS SQL servers 5. Ensure that an external agent monitors the SQL Cluster, and internal agents are deployed on the individual MS SQL servers in the cluster to monitor their internal operations. 6. Now, when you try to sign out, the following screen will appear, prompting you to configure various tests. Figure 8.3: A page listing the unconfigured tests for the Sql cluster service and individual Sql servers 54 Configuring 7. and Monitoring SQL Clusters Configure the tests specific to each of the Sql servers in the cluster, in the manner discussed in section 1.2 Note: While configuring the tests for a passive SQL server in the cluster, set the IS PASSIVE flag to YES. Doing so ensures that no alerts are generated if the server is not running. Measures will be reported as “Not applicable’ by the agent if the server is not up. However, the internal agent executing on the stand-by server will continue to alert the administrator of operational issues with the server such as too many open sessions to the server, unusual lock behavior, etc. While configuring the tests for an active SQL server in the cluster, set the ISPASSIVE flag to NO. This ensures that as soon as the server becomes unavailable, eG Enterprise sends out an alert. 8. 8.2 Finally, signout of the administrative interface. Monitoring the SQL Cluster 1. Login as a monitor / supermonitor user. 2. Select the SEGMENTS option from the eG monitor menu, and click on the segment representing the Sql cluster that you had previously configured; then, click on the Sql_cluster_service component in the segment to view its measurements , Layer model and tests of the SQL Cluster . For an in-depth discussion on eG Enterprise's Cluster Monitoring capabilities and to understand the implications of cluster availability on service performance, refer to the Monitoring Clusters Using eG Enterprise chapter (Chapter 7) in the eG User Manual. 55 Configuring and Monitoring a Backup SQL Server Chapter 9 Configuring and Monitoring a Backup SQL Server In an active/passive cluster, one of the SQL clusters acts as the active server, while another server acts as the backup server. The backup server becomes active only when the primary server stops functioning. This section describes how to configure and manage a backup SQL server. 9.1 Administering the eG Manager to work with a Backup SQL Server 1. Login to the administrative interface as an administrator (admin). 2. Check whether the Backup SQL server has been auto-discovered. If not, run discovery using the DISCOVERY page (Infrastructure-> Components -> Discover) or manually add the server using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). The eG Enterprise system automatically manages the manually added components. The discovered components however, need to go through a manual management exercise, using the COMPONENTS - MANAGE/UNMANAGE page (Infrastructure -> Components -> Manage/Unmanage). This process is depicted by Figure 9.1 and Figure 9.2 below. 56 Configuring and Monitoring a Backup SQL Server Figure 9.1: Selecting the Backup SQL server to be managed Figure 9.2: Managing the Backup SQL server 57 Configuring 3. and Monitoring a Backup SQL Server Now, if you try to sign out of the user interface, you will be prompted to configure Backup SQL test for the Backup SQL server. Click on it to configure it. The following parameters will then be displayed: Figure 9.3: Configuring the Backup SQL test 4. Here, specify the following in Figure 9.3: TEST PERIOD – How often should the test be executed HOST – The IP address of the server PORT – The port on which the server is listening USER – A database user name. PASSWORD- The password associated with the above user name (can be ‘NULL’). Here, ‘NULL’ means that the user does not have any password. CONFIRM PASSWORD – Confirm the PASSWORD (if any) by retyping it here. DATABASE - The name of the database to connect to. The default is “master”. QUERY – The select query to execute. The default is master.dbo.spt_monitor”. “select * from CASE – Takes the value “upper” or “lower” depending upon the case-sensitivity of the SQL server installation. CLUSTERNAME – The IP/hostname of the primary MS SQL server in a cluster CLUSTERPORT – The port number at which the primary MS SQL server listens 5. Finally, click the Update button to register the changes and signout of the admin interface. 9.2 Monitoring the Backup SQL Server 1. Login as a monitor / supermonitor user. 58 Configuring 2. and Monitoring a Backup SQL Server Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the Backup SQL server from the list of components and view its layer model, tests and measurements of the Backup SQL Server. 59 Configuring and Monitoring Informix Dynamic Servers Chapter 10 Configuring and Monitoring Informix Dynamic Servers This chapter deals with the procedures to be followed for configuring and monitoring Informix Dynamic servers. 10.1 Administering the eG Manager to work with an Informix Dynamic Server To achieve the above, do the following: 1. Login to the administrative interface as an administrator (admin). 2. Check whether the Informix Dynamic server has been auto-discovered. If not, run discovery using the DISCOVERY page (Infrastructure -> Components -> Discover) or manually add the server using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). The eG Enterprise system automatically manages the manually added components. The discovered components however, need to go through a manual management exercise, using the COMPONENTS MANAGE/UNMANAGE page (Infrastructure -> Components -> Manage/Unmanage). This process is depicted by Figure 10.1 and Figure 10.2 below. 60 Configuring and Monitoring Informix Dynamic Servers Figure 10.1: Selecting the Informix Dynamic server to be managed Figure 10.2: Managing the Informix Dynamic server 61 Configuring 3. and Monitoring Informix Dynamic Servers Now, if you try to sign out of the user interface, you will be prompted to configure a list of tests for the Informix Dynamic server. Click on the Informix Response test to configure it. This test reports the availability and response time of an Informix database server. The following test parameters will then be displayed: Figure 10.3: Configuring the Informix Response test 4. Here, specify the following: a. TEST PERIOD – How often should the test be executed b. HOST – The IP address of the server c. PORT – The port on which the server is listening d. INSTANCE – The Informix server instance being monitored. To know the names of the available instances, do the following: Open the Server Instance Manager of the Informix server by following the menu sequence depicted by Figure 10.4: 62 Configuring and Monitoring Informix Dynamic Servers Figure 10.4: Opening the Server Instance Manager The Server Instances list of Figure 10.5 that appears displays the available instances. Figure 10.5: Viewing the list of server instances In the INSTANCE parameter of Figure 10.3, specify any one of the instances listed in Figure 10.5. e. DB - The name of the database to be monitored f. USER - A valid database user vested with ‘select’ permissions to the SMI tables in the sysmaster database. You do not need to explicitly create users for the Informix database server, as the server recognizes all the users of the system it is installed on. However, you need to explicitly GRANT the users permission to access the sysmaster database. For example, to grant user ‘john’ permission to access the database ‘sysmaster’, do the following: 63 Configuring and Monitoring Informix Dynamic Servers In a Windows environment, follow the menu sequence depicted by Figure 10.6. Figure 10.6: Opening the database instance Next, from the command prompt, issue the command: dbaccess (see Figure 10.7). To issue the same command in Unix environments, first switch to the install directory of the Informix Dynamic server from the command prompt, and then issue the command. Figure 10.7: Issuing the dbaccess command 64 Configuring and Monitoring Informix Dynamic Servers Figure 10.8 will then appear. Figure 10.8: The DBACCESS menu From the DBACCESS menu that appears in Figure 10.9, select the Connection option. For that, first, navigate to that Connection option using the right arrow button on the keyboard. Then, click the Enter key. The CONNECTION menu is the next to open (see Figure 10.9). Figure 10.9: The CONNECTION menu Select the Connect option from the CONNECTION menu. You will then be requested to choose a database server instance (see Figure 10.10). 65 Configuring and Monitoring Informix Dynamic Servers Figure 10.10: Selecting the Database server instance A list of server instances will also be available in Figure 10.10 to choose from. Select a server instance from the list. Then, proceed to login to the chosen database server as an administrative user. This because only an administrator can grant permissions to a user. As a first step, provide the admin user name against USER NAME (see Figure 10.11). Informix is the default admin user of an Informix Dynamic server. Figure 10.11: Logging into the database server Next, specify the PASSWORD of the administrative user (see Figure 10.12). 66 Configuring and Monitoring Informix Dynamic Servers Figure 10.12: Specifying the admin password Upon successful login, a Connected message will appear (see Figure 10.13). Then, select the database to open (see Figure 10.13) from the list of databases displayed. Figure 10.13: Selecting the database to open Since our example seeks to work with the sysmaster database, select the same as depicted by Figure 10.13. Figure 10.14 will then appear. 67 Configuring and Monitoring Informix Dynamic Servers Figure 10.14: A message stating that the database has been selected Next, exit the CONNECTION menu of Figure 10.14 by choosing the Exit option. Continue selecting the Exit option until the menu of Figure 10.8 appears. Select the Query-language option from the menu, and then choose the New option from the SQL menu. Figure 10.15 will then appear, wherein the command to grant ‘connect’ permission to user ‘john’ needs to be issued (see Figure 10.15). The syntax of the command is: grant connect to <user_name>. Figure 10.15: Granting connect permission to user john Then, click on the ESC key on the keyboard to indicate that the command is complete. The SQL menu will reappear, but this time select the Run option to execute the command (see Figure 10.15). If the command executes successfully, a ‘Permission granted’ message will appear as shown by Figure 10.15. Once the ‘connect’ permission is granted, the users will automatically be assigned to the default PUBLIC account. The PUBLIC account is authorized to perform ‘select’ operations on the SMI tables of the sysmaster database. Since all Informix users are assigned to the PUBLIC account by default, they will automatically inherit the ‘select’ privilege to the sysmaster database. g. PASSWORD- The password corresponding to the above user 68 Configuring 5. and Monitoring Informix Dynamic Servers h. CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here i. QUERY – The select query to execute. The default query is 'select * from sysprofile'. j. DBLOCALE - Specify the language/locale in which your database is installed. This will allow you to return the query in the language supported by your database. By default this attribute is set to "none", which means that by default, queries are returned in the English locale. k. CLIENTLOCALE - Specify the language/locale in which the eG agent is running. Normally, when you use an internal agent to monitor Informix, the CLIENTLOCALE and DBLOCALE will be same. However, the CLIENTLOCALE may differ when you are monitoring the Informix tests using a remote agent (agentless monitoring). By default, the CLIENTLOCALE is set to "none", indicating that the eG agent runs in the English locale, by default. Finally, click the Update button to register the changes, and then try signing out of the admin interface. From the list of unconfigured tests that then appears, select the Informix Sessions test by clicking on it. 6. The Informix Sessions test reports the session related information of an Informix database server. Upon clicking the test name, the following parameters will be displayed: Figure 10.16: Configuring the Informix Sessions test 7. Using Figure 10.16, provide the following: TEST PERIOD – How often should the test be executed HOST – The IP address of the server PORT – The port on which the server is listening INSTANCE – The Informix server instance being monitored USER - A valid user name to login to the server PASSWORD- The password corresponding to the above user CONFIRM PASSWORD – Confirm the PASSWORD by retyping it here DBLOCALE - Specify the language/locale in which your database is installed. This 69 Configuring and Monitoring Informix Dynamic Servers will allow you to return the query in the language supported by your database. By default this attribute is set to "none", which means that by default, queries are returned in the English locale. CLIENTLOCALE - Specify the language/locale in which the eG agent is running. Normally, when you use an internal agent to monitor Informix, the CLIENTLOCALE and DBLOCALE will be same. However, the CLIENTLOCALE may differ when you are monitoring the Informix tests using a remote agent (agentless monitoring). By default, the CLIENTLOCALE is set to "none", indicating that the eG agent runs in the English locale, by default. DETAILED DIAGNOSIS - To make diagnosis more efficient and accurate, the eG Enterprise system embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option against DETAILED DIAGNOSIS. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: o The eG manager license should allow the detailed diagnosis capability o Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. 8. After configuring the Processes test, signout of the eG administrative interface. 10.2 Monitoring the Informix Dynamic Server 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the Informix server from the list of Components and view its layer model, tests and measurements of the Informix Dynamic Server. 10.3 Troubleshooting If the USERNAME and PASSWORD parameter of the Informix tests are not properly configured, then the tests will not be able to execute. Therefore, it is recommended that you check the validity of the username and password before providing them as values of the parameters. For example, let us check the validity of the user ‘john’ with password ‘egurkha’. To achieve this, do the following: 1. In a Windows environment, follow the menu sequence depicted by Figure 10.17. 70 Configuring and Monitoring Informix Dynamic Servers Figure 10.17: Opening the database instance 2. Next, from the command prompt, issue the command: dbaccess (see Figure 10.18). In Unix environments though, first switch to the install directory of the Informix Dynamic server from the command prompt, and then issue the command. Figure 10.18: Issuing the dbaccess command 3. Figure 10.19 will then appear. 71 Configuring and Monitoring Informix Dynamic Servers Figure 10.19: The DBACCESS menu 4. From the DBACCESS menu that appears in Figure 10.19, select the Connection option. For that, first, navigate to that Connection option using the right arrow button on the keyboard. Then, click the Enter key. The CONNECTION menu is the next to open (see Figure 10.20). Figure 10.20: The CONNECTION menu 5. Select the Connect option from the CONNECTION menu. You will then be requested to choose a database server instance (see Figure 10.21). 72 Configuring and Monitoring Informix Dynamic Servers Figure 10.21: Selecting the Database server instance 6. A list of server instances will also be available in Figure 10.21 to choose from. Select a server instance from the list. 7. Then, proceed to login to the chosen database server as user john by providing john as the USER NAME (see Figure 10.22). Figure 10.22: Logging into the database server 8. Next, specify the PASSWORD of the user (see Figure 10.23). 73 Configuring and Monitoring Informix Dynamic Servers Figure 10.23: Specifying the admin password 9. Upon successful login, a Connected message will appear (see Figure 10.24). This clearly indicates that the username and password are valid. If the login fails, then a message to that effect will appear. Then, select the database to open (see Figure 10.24) from the list of databases displayed. Figure 10.24: Selecting the database to open 10. Then, select the sysmaster database as depicted by Figure 10.24. If user john is allowed access to the sysmaster database, then Figure 10.25 will appear. If not, a message to the effect will appear. 74 Configuring and Monitoring Informix Dynamic Servers Figure 10.25: A message stating that the database has been selected 11. At any point in time while monitoring the Informix Dynamic server, you can issue the onstat –p command at the command prompt (from the <INFORMIX_HOME> directory) to check whether the server is available or not. 12. If the server is available, the following message will appear: Informix Dynamic Server 2000 Version 9.21.UC4 -- On-Line -- Up 01:01:17 -1654784 Kbytes Profile dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached 86923 isamtot 101304 open commit 2585879 3116565 97.21 start 1651 15022 read write 26196 rewrite 93.70 delete rollbk 118500 286631 1032967 1972 914 2 0 gp_read gp_write gp_rewrt gp_del gp_alloc gp_free gp_curs 0 0 0 0 ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes 0 0 478.11 71.63 13 0 0 0 75 0 26 2 Configuring bufwaits and Monitoring lokwaits lockreqs Informix deadlks Dynamic dltouts Servers ckpwaits compress seqscans 3502 0 7065882 0 0 0 ixda-RA idx-RA da-RA RA-pgsused lchwaits 10120 51 69387 79557 1266 11280 482 13. If the server is not available, then the following message will appear: Shared memory not initialized for INFORMIXSERVER 'cassprod_shm' 76 Configuring and Monitoring Intersystems Cache Database Chapter 11 Configuring and Monitoring an Intersystems Cache Database This chapter briefly discusses the procedures involved in: Configuring an Intersystems Cache Database to work with the eG agent Administering the eG manager to monitor the Cache database Monitoring the Intersystems Cache Database 11.1 Configuring an Intersystems Cache Database to work with the eG Agent While the eG agent extracts some of the critical database statistics from the SNMP MIB of Cache (eg., metrics related to free space in the database, buffer usage, ECP application and data servers, etc.), for a few other key metrics (eg., metrics related to the console log, resource seizes, lock counts, etc.) the agent executes the cstat utility that is provided with Caché. This utility, which is available in the install directory of a Cache instance, provides a wealth of information about the running Caché system. Where the eG agents needs to contact the SNMP MIB for performance data, make sure that the Windows SNMP service is installed and started either automatically or manually on the Cache host. In addition, ensure the following: Enable the Cache Monitoring Service Activate critical SNMP base classes, so that eG agent can monitor some of the most significant aspects of Cache performance Configure the Cache SNMP agent to start automatically at Cache startup 1. Follow the steps given below to enable the Cache Monitoring Service: Navigate to the Home -> Security Management -> Services page of the System Management Portal. Click the %System_Monitor service in the Services page (see Figure 11.1). 77 Configuring and Monitoring Intersystems Cache Database Figure 11.1: The Services page Figure 11.2then appears. The Service enabled check box will be deselected, by default. Click on the check box to select it and click the Save button to register the changes. 78 Configuring and Monitoring Intersystems Cache Database Figure 11.2: Enabling service monitoring You will then return to the Services page, where you can verify whether the %System_Monitor service is enabled or not. 2. To enable the SNMP base classes that monitor critical aspects of Cache performance, do the following: Start the Cache Terminal From the command prompt of the Terminal, issue the command, DO ^%CD, to switch to a different namespace. 79 Configuring and Monitoring Intersystems Cache Figure 11.3: Switching to a different namespace You will now be prompted for a namespace. Type %SYS therein. Figure 11.4: Specifying the Namespace to switch to Execute the routine %MONAPPMGR as indicated by Figure 11.5. 80 Database Configuring and Monitoring Intersystems Cache Database Figure 11.5: Executing the routine %MONAPPMGR Upon execution, the routine requests you to select from 4 options. Select the Manage Monitor Classes option, by pressing 2. Figure 11.6: Selecting the Manage Monitor Classes option You will now be prompted to choose the action that you want to perform on the Monitor Classes. Since we need to activate a monitoring capability (i.e., Freespace monitoring), select the Activate/Deactivate a Monitor Class option, by pressing 1 (see Figure 11.7). 81 Configuring and Monitoring Intersystems Cache Database Figure 11.7: Choosing to activate/deactivate a monitor class When prompted for the monitor class to activate/deactivate, specify %Monitor.System.Freespace as indicated by Figure 11.8. This class monitors the free space on every Cache database. Figure 11.8: Specifying the name of the class to activate/deactivate Then, choose to Activate the %Monitor.System.Freespace class by pressing A (see Figure 11.9). 82 Configuring and Monitoring Intersystems Cache Database Figure 11.9: Activating the Monitor Class Upon successful activation, a message to that effect will be displayed, followed by a list of options. Press 1 this time to activate another class. Figure 11.10: Selecting another class for activation This time, activate the %Monitor.System.Database class so as to enable Cache database monitoring (see Figure 11.11). 83 Configuring and Monitoring Intersystems Cache Database Figure 11.11: Activating the Database, Processes, and SystemMetrics class %Monitor.System.Processes and Subsequently, activate the %Monitor.System.SystemMetrics classes (see Figure 11.11), so that the eG agent is able to extract Cache process-related metrics and system-related metrics. Finally, exit the Cache Terminal by selecting option number 4 as indicated by Figure 11.11. 3. To configure the SNMP sub-agent to start automatically on startup, do the following: Navigate to the Home -> Configuration -> Monitor Settings page of the System Management Portal (see Figure 11.12). 84 Configuring and Monitoring Intersystems Cache Database Figure 11.12: The Monitor Settings page of the System Management Portal Set the Start SNMP Agent at System Startup flag to Yes (see Figure 11.13), and click the Save button to register the changes. 85 Configuring and Monitoring Intersystems Cache Database Figure 11.13: Enabling the SNMP Agent to start on system boot Next, start the Cache Terminal. From the command prompt of the Terminal, issue the command, DO ^%CD, to switch to a different namespace. You will now be prompted for a namespace. Type %SYS therein, as only this namespace is vested with the right to start the SNMP agent service. NAMESPACE: %SYS The namespace then changes to %SYS. Default directory is d:\cache\cachesys\mgr\ %SYS> Next, execute the routine that would start the SNMP agent. DO start^SNMP(705,20) Once the SNMP agent starts successfully, the eG agent gathers the required statistics from the SNMP MIB, and reports the performance data so collected to the eG manager. 86 Configuring and Monitoring Intersystems Cache Database On the other hand, where the eG agent needs to execute cstat for collecting the required metrics, you need to ensure that the corresponding tests are configured with the exact Cache instance name and the correct path to that instance's home directory. 11.2 Administering the eG Manager to monitor the Intersystems Cache Database 1. Login to the administrative interface as an administrator (admin). 2. Manually add the Cache Database server using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). The eG Enterprise system automatically manages the manually added components. Figure 11.14: Managing a Cache Database server 3. Now, if you try to sign out of the user interface, you will be prompted to configure a series of tests for the managed Cache server (see Figure 11.15). Figure 11.15: A table displaying the list of unconfigured tests for the Cache Database server 4. Click on Cache Buffer test to configure it. Doing so, will reveal the following page, wherein the parameters of the Cache Buffer test need to be configured. 87 Configuring and Monitoring Intersystems Cache Database Figure 11.16: Configuring the parameters of the Cache Buffer test 5. The Cache Buffer test monitors the usage of the buffer pool of every database instance of the Cache database server. The parameters to be configured are as discussed hereunder: TEST PERIOD – How often should the test be executed HOST – The IP address of the Cache database server PORT – The port on which the server is listening SNMPPORT - The port number through which the target server exposes its SNMP MIB. The default value is 161. TIMEOUT – Specify the duration (in seconds) beyond which the SNMP query issues by this test should time out. The default period is 10 seconds. SNMPVERSION – By default, the eG agent supports SNMP version 1. Accordingly, the default selection in the SNMPVERSION list is v1. However, if a different SNMP framework is in use in your environment, say SNMP v2 or v3, then select the corresponding option from this list. SNMPCOMMUNITY – The SNMP community name that the test uses to communicate with the target server. This parameter is specific to SNMP v1 and v2 only. Therefore, if the SNMPVERSION chosen is v3, then this parameter will not appear. USERNAME – This parameter appears only when v3 is selected as the SNMPVERSION. SNMP version 3 (SNMPv3) is an extensible SNMP Framework which supplements the SNMPv2 Framework, by additionally supporting message security, access control, and remote SNMP configuration capabilities. To extract performance statistics from the MIB using the highly secure SNMP v3 protocol, the eG agent has to be configured with the required access privileges – in other words, the eG agent should connect to the MIB using the credentials of a user with access permissions to be MIB. Therefore, specify the name of such a user against the USERNAME parameter. AUTHPASS – Specify the password that corresponds to the above-mentioned USERNAME. This parameter once again appears only if the SNMPVERSION selected is v3. CONFIRM PASSWORD – Confirm the AUTHPASS by retyping it here. AUTHTYPE – This parameter too appears only if v3 is selected as the SNMPVERSION. From the AUTHTYPE list box, choose the authentication algorithm using which SNMP v3 converts the specified USERNAME and 88 Configuring and Monitoring Intersystems Cache Database PASSWORD into a 32-bit format to ensure security of SNMP transactions. You can choose between the following options: • MD5 – Message Digest Algorithm • SHA – Secure Hash Algorithm ENCRYPTFLAG – This flag appears only when v3 is selected as the SNMPVERSION. By default, the eG agent does not encrypt SNMP requests. Accordingly, the ENCRYPTFLAG is set to NO by default. To ensure that SNMP requests sent by the eG agent are encrypted, select the YES option. ENCRYPTTYPE – If the ENCRYPTFLAG is set to YES, then you will have to mention the encryption type by selecting an option from the ENCRYPTTYPE list. SNMP v3 supports the following encryption types: • DES – Data Encryption Standard • AES – Advanced Encryption Standard ENCRYPTPASSWORD – Specify the encryption password here. CONFIRM PASSWORD – Confirm the encryption password by retyping it here. TIMEOUT – Specify the duration (in seconds) beyond which the SNMP query issues by this test should time out. The default period is 10 seconds. 6. Finally, click the Update button to register the changes and try signing out of the admin interface once again. 7. This time you will be prompted to configure the Cache Console Log test for the server. The primary information source for monitoring cache is the console log (cconsole.log). Cache reports general messages, system errors, certain operating system errors, and network errors through an operator console facility. The console log file is a plain text file and may be viewed with any editor or text viewer. It is found in the MGR subdirectory of the location where cache was installed. The Cache Console Log test periodically monitors the console log of every configured cache instance to report the number of normal, severe, and fatal errors encountered by the Cache database server. Figure 11.17: Configuring the Cache Console Log test 8. To configure the test, provide the following information in Figure 11.17: TEST PERIOD – How often should the test be executed HOST – The IP address of the Cache database server PORT – The port on which the server is listening INSTANCEDIRECTORY - Typically, the Cache console log file will be available in 89 Configuring and Monitoring Intersystems Cache Database the install directory of a Cache instance. Therefore, in the INSTANCEDIRECTORY text box, specify the name of the instance being monitored and the install directory that holds the Cache console log file of that instance, in the following format: InstanceName:InstallDirectory. In case you want to monitor the console log files pertaining to multiple Cache instances, then provide a comma-separated list of InstanceName:InstallDirectory pairs in the INSTANCEDIRECTORY text box. For example: CACHEWEB:d:\Intersystems\CacheWeb,CACHE2:d:\Intersystems\Cache2. DETAILED DIAGNOSIS - To make diagnosis more efficient and accurate, the eG Enterprise system embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option against DETAILED DIAGNOSIS. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled: 9. o The eG manager license should allow the detailed diagnosis capability o Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0. To save the test configuration, click the Update button in Figure 11.17, and then proceed to sign out yet again. This time, when the LIST OF UNCONFIGURED TESTS reappears, choose to configure the Cache Performance test. Figure 11.18 will then appear: Figure 11.18: Configuring the Cache Performance test 10. The Cache Performance test monitors the critical determinants of the performance of a Cache database server. This includes: Code processing speed Routine loads and saves Global jobs Logical block accesses Journal entries 90 Configuring and Monitoring Intersystems Cache Database Locking activity 11. To configure the Cache Performance test, specify the following in Figure 11.18: TEST PERIOD – How often should the test be executed HOST – The IP address of the Cache database server PORT – The port on which the server is listening SNMPPORT - The port number through which the target server exposes its SNMP MIB. The default value is 161. TIMEOUT – Specify the duration (in seconds) beyond which the SNMP query issues by this test should time out. The default period is 10 seconds. SNMPVERSION – By default, the eG agent supports SNMP version 1. Accordingly, the default selection in the SNMPVERSION list is v1. However, if a different SNMP framework is in use in your environment, say SNMP v2 or v3, then select the corresponding option from this list. INSTANCENAME – By default, this is set to All, indicating that all Cache instances will be monitored. To monitor specific instances, provide a comma-separated list of Cache names. 12. Update the test configuration, and finally, sign out the eG administrative interface. 11.3 Monitoring the Cache Database Server 1. Login as a monitor / supermonitor user. 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the Cache database server from the list of Components and view its Layer model, tests and measurements of the Cache Database Server. 11.4 Troubleshooting If all the SNMP-based tests pertaining to the Cache database server are in an UNKNOWN state, then do the following: Check whether the eG agent is up and running Ensure that there are no issues in the agent-manager communication Check whether the Windows SNMP service has been installed and started on the Cache host Verify whether the Cache Monitoring Service has been enabled (refer to Section 11.1 for details) Verify whether the Cache SNMP Agent has been set to start automatically at Cache startup (refer to Section 11.1 for more details) Check whether the critical SNMP base classes such as %Monitor.System.Freespace, %Monitor.System.Database, %Monitor.System.Processes, and %Monitor.System.SystemMetrics were activated from the Cache Terminal. If one/more SNMP-based tests pertaining to the Cache database server are not reporting measures, then go to the command prompt of the eG agent host, and execute the following command from the <EG_AGENT_INSTALL_DIR>\bin directory, to 91 Configuring and Monitoring Intersystems Cache Database see if the desired statistics are being retrieved from the SNMP MIB of the Cache database server: snmpwalk nfq -O 161 <SNMP_community_string_configured_for_the_tests> <IP/hostname_of_the_CacheDB> <OID_of_the_measure> For instance, to view the value of a particular measure reported by the CacheBufferTest for a Cache database server with IP 192.16.10.51 (community string: public), your command would be: snmpwalk nfq -O 161 public 192.168.10.51 .1.3.6.1.4.1.16563.1.1.7.1.2 Given below are the details of OIDs that are associated with the tests mapped to the Cache database server model. You will find that most tests are associated with a wide range of OIDs, one for every measure reported by the test. To check whether a test is reporting measures or not, it would suffice to run the abovementioned command using any one of the OIDs in the given range, and not each one of them. • For the Cache Buffer test, use the OIDs in the .1.3.6.1.4.1.16563.1.1.7.1.2 to .1.3.6.1.4.1.16563.1.1.7.1.17 • For the Cache Database test, use any of the following OIDs: • .1.3.6.1.4.1.16563.1.1.3.1.5 • .1.3.6.1.4.1.16563.1.1.3.1.6 • .1.3.6.1.4.1.16563.1.1.3.1.7 • For the Cache Performance test, use the OIDs in the .1.3.6.1.4.1.16563.1.1.2.1.2 to .1.3.6.1.4.1.16563.1.1.2.1.18 • For the Cache Resource test, use the OID, .1.3.6.1.4.1.16563.1.1.6.1.3 • For the Cache Systems test, use the OIDs in the .1.3.6.1.4.1.16563.1.1.1.1.6 to .1.3.6.1.4.1.16563.1.1.1.1.11 range • For the Ecp Application Server test, use the OIDs in the .1.3.6.1.4.1.16563.1.1.4.1.1 to .1.3.6.1.4.1.16563.1.1.4.1.3 range, • For the Ecp Data Server test, use the OIDs in the .1.3.6.1.4.1.16563.1.1.5.1.1 to .1.3.6.1.4.1.16563.1.1.5.1.5 range, range, range Similarly, if one/more tests using the cstat utility are not reporting measures, then issue the cstat command from the command prompt to see if it returns a valid output. For that, follow the steps given below: • Go to the command prompt on the Cache host. • Switch to the <CACHE_INSTALL_DIR>. • Issue the command: cstat –s <CACHE_INSTALL_DIR>\mgr -e2 –m-1 –n3 –j5 –g1 –m3 – L1 –u-1 –v1 –p-1 –c-1 –q1 –w2 –S –1 For example, if the Cache instance being monitor is installed in c:\CacheSys, then the command would be: cstat –s C:\CacheSys\mgr -e2 –m-1 –n3 –j5 –g1 –m3 –L1 –u-1 –v1 –p-1 –c-1 –q1 –w2 –S –1 92 Configuring and Monitoring a PostgreSQL Server Chapter 12 Configuring and Monitoring a PostgreSQL Server 12.1 Pre-requisites for monitoring a PostgreSQL Server In PostgreSQL, client authentication is controlled by a configuration file, which traditionally is named pg_hba.conf and is stored in the database cluster's data directory. HBA stands for host –based authentication. A default pg_hba.conf file is installed when the data directory is initialized by initdb. It is also possible to place the authentication configuration file elsewhere in the directory. For an eG agent to communicate with the PostgreSQL database server, the eG agent must be deployed within the IP address range specified for the PostgreSQL server in the pg_hba.conf file. To ensure this criteria is satisfied, you have to first goto the pg_hba.conf file as shown in Figure 12.1. Figure 12.1: Locating the pg_hba.conf file 93 Configuring and Monitoring a PostgreSQL Server Upon clicking the pg_hba.conf from the PostgreSQL data directory, a Backend Access Configuration Editor (see Figure 12.2) page will open up showing the pg_hba.conf details. Figure 12.2: The pg_hba.conf file The general format of the pg_hba.conf file (see Figure 12.2) is a set of records, one per line. Blank lines are ignored, as is any text after the # comment character. A record is made up of a number of fields which are separated by spaces and/or tabs. Fields can contain white space if the field value is quoted. Records cannot be continued across lines. Each record specifies a connection type, a client IP address range (if relevant for the connection type), a database name, a user name, and the authentication method to be used for connections matching these parameters. The first record with a matching connection type, client address, requested database, and user name is used to perform authentication. There is no "fall-through" or "backup": if one record is chosen and the authentication fails, subsequent records are not considered. If no record matches, access is denied. Now, to verify if the eG agent is deployed within the IP address range specified for the PostgreSQL server, click on the records that you have enabled for this PostgreSQL server in Figure 12.2. Doing so, the Client Access Configuration pop up window will open up as shown in Figure 12.3 where you can modify the records of the pg_hba.conf file in case the eG agent is not deployed within the IP address range of the PostgreSQL server. 94 Configuring and Monitoring a PostgreSQL Server Figure 12.3: The Client Access Configuration pop up used for modifying the pg_hba.conf file If the eG agent is not deployed in the IP address range of the PostgreSQL server, you can either modify the IP address range in the existing record of the pg_hba.conf file (as shown in Figure 12.3) or add a new record in the pg_hba.conf file to include the IP address on which the eG agent is deployed. This IP address range contains an IP address in standard dotted decimal notation and a CIDR (Classless Inter-Domain Routing) mask length. (IP addresses can only be specified numerically, not as domain or host names.) The mask length indicates the number of high-order bits of the client IP address that must match. Bits to the right of this must be zero in the given IP address. There must not be any white space between the IP address, the /, and the CIDR mask length. Typical examples of an IP address to be specified here are 172.20.143.89/32 for a single host, or 172.20.143.0/24 for a small network, or 10.6.0.0/16 for a larger one. To specify a single host, use a CIDR mask of 32 for IPv4 or 128 for IPv6. In a network address, do not omit trailing zeroes. te: An IP address given in IPv4 format will match IPv6 connections that have the corresponding address, for example 127.0.0.1 will match the IPv6 address ::ffff:127.0.0.1. An entry given in IPv6 format will match only IPv6 connections, even if the represented address is in the IPv4-in-IPv6 range. Note that entries in IPv6 format will be rejected if the system's C library does not have support for IPv6 addresses. This field only applies to the following Type of records in the pg_hba.conf file: host, hostssl, and hostnossl records. 12.2 Administering the eG Manager to monitor a PostgreSQL Server To configure eG to monitor a PostgreSQL Server, do the following: 1. First, login through the eG administrative interface. 95 Configuring 2. and Monitoring a PostgreSQL Server The eG Enterprise suite does not automatically discover the PostgreSQL Server component in an environment. So,manually add the component using the ADD/MODIFY COMPONENTS page (Infrastructure -> Components -> Add/Modify). Remember that components manually added are managed automatically. Discovered components, however, are managed using the COMPONENTS - MANAGE/UNMANAGE page. Figure 12.4 clearly illustrates the process of adding the PostgreSQL Server. Figure 12.4: Adding a PostgreSQL Server 3. After adding the PostgreSQL server, try to signout of the eG administrative interface. A list of unconfigured tests that needs to be configured will appear as shown in Figure 12.5. Figure 12.5: List of Unconfigured tests to be configured for the PostgreSQL server 4. Click on the PostgreSQL Access test to configure it. 96 Configuring and Monitoring a PostgreSQL Server Figure 12.6: Configuring the PostgreSQL Access test 5. To configure the test, specify the following in Figure 12.6: TEST PERIOD - How often should the test be executed HOST - The host for which the test is to be configured PORT – Mention the port at which the specified HOST listens. The default port is 5432. USERNAME - In order to monitor a PostgreSQL server, a special database user account has to be created in every PostgreSQL database instance that requires monitoring i.e., you can manually create the special database user. When doing so, ensure that this user is vested with the superuser privileges. The sample script we recommend for user creation for eG monitoring is: CREATE ROLE eguser LOGIN ENCRYPTED PASSWORD {‘eguser password’} SUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE; The name of this user has to be specified here. Alternately you can alter the role of an existing user to be vested with the superuser privileges. The sample script we recommend for altering the role of the user during eG monitoring is: ALTER Role eguser SUPERUSER; PASSWORD - Enter the password corresponding to the above user here. CONFIRM PASSWORD – Confirm the password by retyping it here. DBNAME – Specify the name of the database to connect to in this text box. The default is “postgres”. SSL – If the PostgreSQL server being monitored is SSL-enabled, set this flag to Yes. If not set this flag to No. 6. Click on the Update button to configure the test and finally, signout of the eG administrative interface. 97 Configuring 12.3 and Monitoring a PostgreSQL Server Monitoring the PostgreSQL Server To monitor a PostgreSQL server, do the following: 1. Login as a monitor / supermonitor user 2. Click on the Components option in the menu bar, and select the Servers option from the Components menu. 3. Select the PostgreSQL server being monitored and view its measurements. 98 Conclusion Chapter 13 Conclusion This document has described in detail the steps for configuring and monitoring the Database Servers. For details of how to administer and use the eG Enterprise suite of products, refer to the user manuals. We will be adding new measurement capabilities into the future versions of the eG Enterprise suite. If you can identify new capabilities that you would like us to incorporate in the eG Enterprise suite of products, please contact [email protected]. We look forward to your support and cooperation. Any feedback regarding this manual or any other aspects of the eG Enterprise suite can be forwarded to [email protected]. 99