Monitoring PostgreSQL / UniVerse / Informix / Sybase

Monitoring PostgreSQL / UniVerse / Informix / Sybase

You can monitor PostgreSQL / UniVerse / Informix / Sybase from Applications Manager using Script Monitor.

We have a sample script ( script.zip ) which can check the availability of the database server by establishing a JDBC connection to the database, execute query in the database server and collect information from that query ( we have also attached the java program in the zip file, so you can modify it to meet your requirements ).

You can also use this script for executing your own queries in Oracle / MySQL / DB2 / MsSQL database servers and monitor information from the query using script monitor.

Initializing the script file

1. Download the script.zip attached along with this forum and extract it under the AppManager7 directory ( AppManager7 - C:\Program Files\AdventNet\ME\AppManager7 or /opt/AppManager7 ). The same script can be used for applications manager installed on windows and linux.

2. The queries to be executed should be present in the AppManager7\script\query.txt file. Each query should be present in a single line in that file.

3. Edit the script.bat / script.sh file present under AppManager7\script\ directory. In that file update the HostName ( Hostname of the database server which you want to monitor ), PortNumber, DatabaseType ( Oracle / MySQL / DB2 / MsSQL / PostgreSQL / UniVerse / Informix / Sybase ) , Username, Password and Database ( Database / Host string - to which applications manager will connect ).

If you want to monitor PostgreSQL / UniVerse / Informix databases you have to place the corresponding JDBC driver jar files from the database installation directories under the AppManager7\script\ directory. For PostgreSQL database you have to use any corresponding JDBC 3 driver file ( postgresql-8.1-410.jdbc3.jar - If you use a different file, change the name in the script.bat / script.sh files ). For UniVerse database you have use unijdbc.jar and asjava.zip files. For Informix database you to use the ifxjdbc.jar file.

Once you have provided all the details execute the script.bat / script.sh file present under AppManager7\script\ directory. You should get a proper output in the AppManager7\script\output.txt file. In the output.txt file the availability of that database server will be present in parameter availability, time taken to connect to the database server will be present in database_connection_time parameter and the time taken to execute the query will be present in the parameter query1_execution_time. In addition to this, the parameters from the queries output will be also present.

Creating the Script Monitor

Click on the New Monitor link and choose script monitor from the menu. You can look at the scriptmonitor.gif file attached along with this forum for the details to be provided. For filling up the additional attributes, open the output.txt file and provide the attribute names from there. After you have filled all the details, you will be able to add a script monitor. You can also refer the following link for details regarding script monitor,
manageengine.adventnet.com/products/applications_manager/help/managing-business-applications/script-monitor.html
manageengine.adventnet.com/products/applications_manager/help/monitors/script-monitoring.html

For more detailed monitoring of Sybase database server refer the below forum,
forums.adventnet.com/viewtopic.php?p=163691#163691

Kindly get back to us for any clarifications.

- Arun




























                New to ADSelfService Plus?