Skip to content

Configuring the CodeLogic SQL Agent

Your CodeLogic agent needs to be configured in order to scan your unique environment.

Note

MySQL Databases 5.5 or older may experience lengthy scan times.

  • From a web browser on your system, log in to the CodeLogic Server.

  • Click Admin and then select the Agents tab.
  • Click the more menu icon in the Actions column and select View/Edit/Delete.
    • The Edit window opens.
  • Edit the configuration file.

    • Agent ID - The Agent ID is a unique identifier assigned by CodeLogic and is not configurable.
    • Agent Type - The Agent Type is the type of agent you have installed and is not configurable.
    • Agent Name - The Agent Name is the name you entered during installation. If you did not enter a descriptive name, the default name is used. To rename the agent, replace the text and click Save.
    • Agent Description - The Agent Description is a text field where you can enter a description for the agent.
    • Databases - The Databases section lists the credentials for SQL databases to be examined.
      • Important

        You must use credentials that can read metadata about the databases being scanned.

      • JDBCURL - A JDBC string provides a programmatic way to access a database. For example: jdbc:mysql://mysqlserver:3306/test
        • Important

          The IP address should not be 127.0.0.1, the hostname should not be localhost.

      • Username - Enter the username for the JDBCconnection.
      • Password - Enter the password for the JDBCconnection.
      • Database Name Override - The Database Name Override is a list of databases to be overridden.
        • Note

          The Database Name Override value is required for Oracle databases.

    • Schedule - The schedule for scanning is configurable using a cron‑style entry. The default schedule is every four hours, every day, starting at 00:00.

      The scan is scheduled using a cron-like definition based upon the CronTrigger class. It is similar to entries specified in man -S 5 crontab but the fields and allowed characters differ slightly to allow for more powerful scheduling.

      Field Name Allowed Values Allowed Special Characters
      Seconds 0-59 , - * /
      Minutes 0-59 , - * /
      Hours 0-23 , - * /
      Day of Month 1-31 , - * ? / L W
      Month 1-12 or JAN-DEC , - * /
      Day of Week 1-7 or SUN-SAT , - * ? / L W

      Special characters

      • * (“all values”)
      • ? (“no specific value”) – for example, when the scan should take place on the 10th day of the month any day of the week is acceptable
      • -- used to specify ranges – for example, 1-3 in the day of the month field means the 1st, 2nd, and 3rd day of the month
      • ,- used to specify additional values – for example, “TUES, THUR” in the Day of Week field means Tuesday and Thursday
      • /- used to specify the starting value and an increment – for example, 0/10 in the Minutes field means “the minutes 0, 10, 20, 30, 40, and 50”
      • L(“last”) – the meaning of this character changes depending upon which field it is in, for example, “L” in the Day of Week field means Saturday but it can be combined for a specification like 5L, which means the last Thursday of the month
      • W(“weekday”) - the weekday nearest specified day, for example, 20W is the weekday closest to the 20th day of the month
      • #- used to specify “the nth” NNN day of the month, for example, “5#1” = the first Thursday of the month and “4#3” = the third Wednesday of the month

      Scheduling examples

      • Scan every half hour starting at the top of the hour, every weekday

        0 0/30 * * * MON-FRI

      • Scan every half hour, between the hours of 9 AM and 5 PM (0900 and 1700), every weekday

        0 0/30 9-17 ? * MON-FRI

      • Scan at 9:40 PM (2140) every day

        0 40 21 ? * *

    • Batch Size - The Batch Size is the combined number of nodes and relationships to reach before sending information to the CodeLogic Server.

    • A list of applications - Click + to add applications to be scanned.
  • Optionally, click + to enter an additional Agent Configuration.

  • Click Save to save your changes and close the Edit window.
  • Logging

    • Logging is configured in the /opt/codelogic/sql/application.yml file.
    • Standard syslog keywords are used to specify the agent logging level. For details on the keywords, please see the man pages for syslog or rsyslog, depending upon which is installed on your system.

    • Commands

              $ man -S 5 syslog.conf  
              $ man -S 5 rsyslog.conf
      
              \# Modify the amount of logging output by specifying a package name and then pass a given log level.  
              logging:  
              level:  
              root: info  
              com.codelogic: info
      

    • Additional logging can be captured by replacing info with debug.