The SQL Anywhere Extension Agent can monitor one or more databases. The databases to be monitored are stored in the sasnmp.ini file with the following format:
[SAAgent] TrapPollTime=time-in-seconds [DBn] ConnStr=connection-string UtilDbPwd=utility-database-password CacheTime=time-in-seconds DBSpaceCacheTime=time-in-seconds Trapt=trap-information Disabled=1 or 0
By default, your SQL Anywhere installation places the sasnmp.ini file in the install-dir\bin32 directory.
The SAAgent section of the sasnmp.ini file contains information about the SQL Anywhere Extension Agent. If the TrapPollTime field is not required, you can omit the entire section.
TrapPollTime This value specifies the poll frequency for dynamic traps if they are specified. The SQL Anywhere SNMP Extension Agent polls the values every 5 seconds by default. Setting this value to 0 disables dynamic traps. This field is optional.
Each DBn section of the sasnmp.ini file describes a database, how to connect to it, and any dynamic traps that exist for the database. The fields in this section are case sensitive.
The value for n is a number that identifies the database. The numbers must start with 1, and numbers cannot be skipped. For example, if the sasnmp.ini file contained entries for [DB1], [DB2], and [DB4], the [DB4] entry would be ignored because the file is missing the entry for [DB3].
ConnStr The connection string used to connect to the database. You must supply enough information to be able to connect to the database. This field is required.
ASTART=NO;IDLE=0;CON=SNMP;ASTOP=NOis prepended to the connection string. This string does the following:
If you specify any of these values in the connection string in the sasnmp.ini file, the values in the sasnmp.ini file will override the default settings.
UtilDbPwd When setting
sa.agent.saStarted to start a database, the SQL Anywhere SNMP Extension Agent attempts to connect to the database with the DBF parameter, which
tells the database server where to find the database file. However, if the permission required to start the database is DBA
(the default for the network server, which can also be set using the -gd dba option for both the personal and network servers),
then the server will not allow the connection.
To start a database on such a server, the SQL Anywhere SNMP Extension Agent must connect as a user with DBA authority to a database already running on the same server. This can be done by connecting to the utility database. If you specify the utility database password (specified by the -su server option) in the sasnmp.ini file, then to start a database, the SQL Anywhere Extension Agent connects to the utility database on the same server, executes the START DATABASE statement, and then disconnects. This field is optional.
CacheTime When data is retrieved from the database, it can be cached inside the SQL Anywhere SNMP Extension Agent, so that subsequent retrievals of the same type of data (for example, server properties or database statistics) do not require communication with the database. While caching the data means that you can obtain the data more quickly on subsequent retrievals, the data may be out of date. The CacheTime field can be used to change the cache time, or disable the cache by setting the value to 0. By default, the cache time is 0 seconds. When the CacheTime parameter is set to 0, the data retrieved is always up-to-date because data is retrieved from the database for every request. This field is optional.
DBSpaceCacheTime The rdbmsDbLimitedResourceTable in the RDBMS MIB contains information about dbspaces. When this information is retrieved from the database, it can also be cached inside the SQL Anywhere Extension Agent. The default cache time for dbspace information is 600 seconds (10 minutes). This field can be used to change the cache time (or disable the cache by setting the value to 0). This field is optional. See rdbmsDbLimitedResourceTable.
Trapt Creates a dynamic trap. The value t must be a positive integer starting at 1. Skipping numbers is not allowed. This field is optional. See Creating dynamic traps.
Disabled If set to 1, this database entry is skipped by the SQL Anywhere SNMP Extension Agent. This is useful for temporarily removing one database from the list of databases managed by the SQL Anywhere SNMP Extension Agent, without renumbering the rest. This field is optional.
Once you edit this file, you must restart the SNMP service or reset the SQL Anywhere SNMP Extension Agent so that the new settings are used by the Agent.
To restart the SNMP service (Command line)
Run the following command:
net stop snmp
This stops the SNMP service.
Execute the following command:
net start snmp
This starts the SNMP service.
To restart the SQL Anywhere SNMP Extension Agent
Using your SNMP management tool, change the value of the saAgent.saRestart property,
184.108.40.206.4.1.8220.127.116.11, to 1.
You can obfuscate the contents of the sasnmp.ini file with simple encryption using the File Hiding utility (dbfhide). See Hiding the contents of .ini files.
The following is a sample sasnmp.ini file for the SQL Anywhere SNMP Extension Agent.
[SAAgent] [DB1] ConnStr=UID=DBA;PWD=sql;ENG=server1;DBN=sales;DBF=sales.db Trap1=1.1.5 > 50000 UtilDbPwd=test [DB2] ConnStr=UID=DBA;PWD=sql;ENG=server1;DBN=field;DBF=field.db UtilDbPwd=test Disabled=1 [DB3] ConnStr=UID=DBA;PWD=sql;LINKS=tcpip;ENG=server2;DBN=hq;DBF=hq.db UtilDbPwd=test
Because there are no parameters specified in the SAAgent section, the SQL Anywhere SNMP Extension Agent will poll values every 5 seconds.
The SQL Anywhere SNMP Extension Agent is monitoring 3 different databases running on two different servers. Database 3 is running on a different computer, so the LINKS connection parameter is required to specify the protocol. A trap is specified for DB1, which fires when the number of bytes sent by the database server is greater than 50000.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|