Sybase Agent version 220.127.116.11 monitoring a Sybase database that is 12.5.3. Each time the database server is restarted the agent drops and recreates all of the Stored Procedures that are owned by Foglight.
The Foglight Agent’s Sybase user did not have ‘sybsystemprocs’ set as the default database. This should be the default database.
When the agent DB login is not configured properly (its default database is not set to sybsystemprocs), the agent could not detect its store procedures installed on the DB. This causes the agent to install them again and again.
To set this, log into your Sybase database and run the following command:
exec sp_modifylogin USERNAME , defdb, 'sybsystemprocs'
Replace USERNAME with the name of the Foglight Sybase User that the agent uses.
An enhancement SDB-726 has been added to the 18.104.22.168 and higher releases of the Foglight cartridge for Sybase. The agent now discovers installed procedures even if the login user has other than sybsytemprocs default database.
As of the 22.214.171.124 Sybase cartridge some new functionality was added to the Sybase cartridge.
On each start the agent checks that its stored procedures exist in the monitored DB. If the stored procedures do not exist or their version does not suit to the agent version, the agent attempts to install new store procedures. The stored procedures definitions are contained in appropriate scripts in the deployed package. The agent prepares an isql command with the script as the input and passes the command to the system function.
If the agent cannot collect the necessary information from the DB or it cannot install the stored procedures, the failure is logged with detailed information and the agent stops running. In that case the Fglam will try to start the agent again (a fixed number of times).
When the agent runs ISQL installing the stored procedures, the ISQL creates an output file. This output file may contain messages that may help to analyze the installation process. If the output file is not created, the agent considers that the installation fails.