Pandora sybase Plugin for monitoring a Sybase ASE database. Introduction Plugin for monitoring a Sybase ASE database. Compatibility matrix Systems where it has been tested Windows 10 Systems where it should work Windows 10 and later versions Any Linux system Prerequisites Have the Endpoint installed on the machine where Sybase is running. isql - Located inĀ  $SYBASE/$SYBASE_OCS/bin . Plugin configuration To connect to the database to be monitored, the following fields must be completed in the pandora_sybase.conf file: isql = Path to the interactive isql terminal mode=Tentacle by default tentacle_ip = IP address of the Pandora server tentacle_port = Tentacle port of the Pandora server, 41121 by default. numberdatabases = Number of databases to be monitored. For each database, the corresponding user , password , server , and name_agent must be configured. For example, if two databases need to be monitored, the configuration parameters would be user1 , password1 , server1 for the first database, and user2 , password2 , and server2 for the second. Example: user1=sa password1=p4assword server1=desktop12 name_agent1=sybase_desktop12 user2=sa password2=Fr4gile server2=desktop7 name_agent2=sybase_desktop7 * If the database can only be accessed via isql by specifying the port, it must be included in the configuration file, for example: desktop12:2083 numberqueries = Number of custom queries to be executed (each one will create a module). For each query, in addition to the query itself, a module name and a module type must be defined. The parameters for configuring each query are: query , namemodule , and typemodule . For example, if two modules are to be created, query1 , namemodule1 , and typemodule1 will define the first, while query2 , namemodule2 , and typemodule2 will define the second. Example: query1=select sum^(case when u.segmap != 4 then size - curunreservedpgs^(u.dbid, u.lstart, u.unreservedpgs^^^) end^^^)/1048576.*4096 as data_used from master..sysdatabases d, master..sysusages u where u.dbid = d.dbid and d.status != 256 and db_name^(u.dbid^^^) = 'test' namemodule1=data used database test typemodule1=generic_data query2=select sum^(case when u.segmap != 4 then size - curunreservedpgs^(u.dbid, u.lstart, u.unreservedpgs^^^) end^^^)/1048576.*4096 as data_used from master..sysdatabases d, master..sysusages u where u.dbid = d.dbid and d.status != 256 and db_name^(u.dbid^^^) = 'master' namemodule2=data used database master typemodule2=generic_data Example of .conf file isql=C:\SAP\OCS-16_0\bin\isql # number of databases numberdatabases=1 # database user user1=sa password1=pandorapass server1=DESKTOPDQN7L842 name_agent1=sybase_DESKTOPDQN7L842 mode=tentacle tentacle_ip=192.168.0.29 tentacle_port=41121 # number of queries numberqueries=2 # queries and modules query1=select sum^(case when u.segmap != 4 then size - curunreservedpgs^(u.dbid, u.lstart, u.unreservedpgs^^^) end^^^)/1048576.*4096 as data_used from master..sysdatabases d, master..sysusages u where u.dbid = d.dbid and d.status != 256 and db_name^(u.dbid^^^) = 'test' namemodule1=data used database test typemodule1=generic_data query2=select sum^(case when u.segmap != 4 then size - curunreservedpgs^(u.dbid, u.lstart, u.unreservedpgs^^^) end^^^)/1048576.*4096 as data_used from master..sysdatabases d, master..sysusages u where u.dbid = d.dbid and d.status != 256 and db_name^(u.dbid^^^) = 'master' namemodule2=data used database master typemodule2=generic_data Manual execution Manual execution Configuration in Pandora FMS To monitor with the plugin from Pandora FMS, it must be called from the Endpoint configuration file located at the following path: /etc/pandora/pandora_agent.conf It should be added on the last line of the configuration file using the module_plugin command, followed by the path to the plugin and the path to the pandora_sybase.conf file. module_plugin This can also be done from the console if remote configuration is enabled. Example using the sample execution described in the manual execution section: Modules generated by the plugin The plugin will create the following modules, in addition to any custom modules defined in the configuration file with the corresponding queries. Module Description Sybase ASE status Server status Sybase ASE Backup server status Backup server status Sybase CPU Busy Time the server was busy during the previous polling cycle Sybase Locks Remaining Number of locks available for use Sybase Memory Use Memory used in MB Sybase Mirror Devices Number of devices configured for mirroring but not currently being mirrored Sybase Suspect Databases Number of databases marked as suspect or unusable by the Adaptive Server Sybase_active_locks Number of active locks Sybase_total_locks Total number of locks Sybase_users_conected Number of connected users Sybase_version Version number Sybase all databases used size Used size of all databases