Werk #15289: mk_oracle: Revert werk 15559, use tnsping when available

Component Agent bakery
Title mk_oracle: Revert werk 15559, use tnsping when available
Date Jul 27, 2023
Checkmk Version 2.3.0b1 2.2.0p9 2.1.0p33
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Affected Editions
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p9 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p33 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

Werk 15559 removed the invocation of tnsping.

tnsping was used to check if the tns-alias could be reached. If it could not be reached via tnsping, hostname and port is used to connect to the database.

With Werk 15559 the invocation of tnsping was completely removed. tns-alias was always used. This lead to problems with different configurations of mk_oracle.

This change introduces a check if the tnsping binary is available. If the binary is available, the logic of mk_oracle before Werk 15559 is restored. If the binary is not available, it is assumed that the tns-alias can be reached.

To the list of all Werks