Skip to content

Configuring the Lineai SQL Agent

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

Edit the agent configuration on the host where the agent is installed. On Linux, the primary configuration file is /opt/lineai/sql/application.yml. Restart the agent after saving changes.

The following settings are available in the agent configuration:

* **Agent ID** - The Agent ID is a unique identifier assigned by Lineai 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, update the name in the configuration file.
* **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.
:::caution[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`
:::caution[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[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 Lineai.
* **A list of applications** - Applications to be scanned.
  • Optionally, add an additional Agent Configuration section.
  • Logging
    • Logging is configured in the /opt/lineai/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

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

      Additional logging can be captured by replacing info with debug.