Skip to content

Commit

Permalink
Troubleshooting instructions for clidriver errror (#15882)
Browse files Browse the repository at this point in the history
* add troubleshooting instruction

* Update ibm_db2/README.md

Co-authored-by: Bryce Eadie <[email protected]>

* Update ibm_db2/README.md

Co-authored-by: Bryce Eadie <[email protected]>

* Update ibm_db2/README.md

Co-authored-by: Bryce Eadie <[email protected]>

* Update ibm_db2/README.md

Co-authored-by: Bryce Eadie <[email protected]>

* Update ibm_db2/README.md

Co-authored-by: Bryce Eadie <[email protected]>

---------

Co-authored-by: Bryce Eadie <[email protected]>
  • Loading branch information
steveny91 and buraizu authored Sep 27, 2023
1 parent e225a8b commit 9244f07
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ibm_db2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ See [service_checks.json][11] for a list of service checks provided by this inte

## Troubleshooting

### CLI Driver SQL1531N error

If you encounter an issue that produces error logs like the following:

```
2023-08-10 23:34:47 UTC | CORE | ERROR | (pkg/collector/python/datadog_agent.go:129 in LogMessage) | ibm_db2:c051131490335a94 | (ibm_db2.py:563) | Unable to connect to database `datadog` as user `db2inst1`: [IBM][CLI Driver] SQL1531N The connection failed because the name specified with the DSN connection string keyword could not be found in either the db2dsdriver.cfg configuration file or the db2cli.ini configuration file. Data source name specified in the connection string: "DATADOG". SQLCODE=-1531
```

Then it's most likely caused by one of the following scenarios:
- The configuration (conf.yaml) is missing a host and port configuration
- The CLI Driver isn't able to locate the database due to the absence of `db2cli.ini` and `db2dsdriver.cfg`

The Agent requires the information in both of the above scenarios to determine where to properly connect to the database. To solve this issue, you can either include a host and port parameter for every instance of the `ibm_db2` check experiencing this issue. Alternatively, if you want to use the DSNs defined in either the `db2cli.ini` or `db2dsdriver.cfg` files, you can copy those files over to the `clidriver` directory that the Agent uses. Under normal circumstances, that directory is located at `/opt/datadog-agent/embedded/lib/python3.9/site-packages/clidriver/cfg` for Linux.
-

### Installing `ibm_db` client library offline

If you're in an air gapped environment, or on a restricted network where it's not possible to run `pip install ibm_db==x.y.z` where `x.y.z` is the version number, you can install `ibm_db` using the following method:
Expand Down

0 comments on commit 9244f07

Please sign in to comment.