You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`SQLS_SECTION_SEP` (ASCII code) |`header_sep:` (kept only together with a custom `header_name:`) |
1018
1019
@@ -1026,6 +1027,7 @@ Placement rules:
1026
1027
- A section whose `SQLS_SIDS` names a `REMOTE_INSTANCE_*` variable is attached to the
1027
1028
instance that variable defines. References that resolve to nothing are dropped with
1028
1029
a warning, and a section left without any instance is skipped.
1030
+
- A section setting both `SQLS_SIDS` and `SQLS_TNSALIAS` keeps both values (see below).
1029
1031
- A section without `SQLS_SQL` is skipped with a warning.
1030
1032
1031
1033
##### Dynamic `SQLS_SIDS` values
@@ -1062,6 +1064,42 @@ and failing wherever the queried objects do not exist. Add the section back manu
1062
1064
under the `instances:` entries it is meant to run on (or, if it really applies to all
1063
1065
of them, as a global `custom_metrics:` entry).
1064
1066
1067
+
##### `SQLS_SIDS` together with `SQLS_TNSALIAS`
1068
+
1069
+
Both may be set for the same section, and they restrict different things in the legacy
1070
+
plugin: `SQLS_SIDS` selects the monitored SID the section runs on, `SQLS_TNSALIAS` the
1071
+
connect identifier it uses to get there. The migration keeps both on one instance
1072
+
entry:
1073
+
1074
+
```yaml
1075
+
instances:
1076
+
- sid: NORMALDB
1077
+
alias: NORMALDB_ALIAS
1078
+
custom_metrics:
1079
+
- Invalid objects in DB:
1080
+
path: /etc/check_mk/ProdSQLs/invalid_objects.sql
1081
+
```
1082
+
1083
+
Note that `mk-oracle` identifies an instance by its `alias:` as soon as one is set, so
1084
+
the `sid:` above documents the origin of the entry but no longer restricts the section.
1085
+
The migration says so for every affected section:
1086
+
1087
+
```
1088
+
# WARNING: Invalid objects in DB: SQLS_SIDS 'NORMALDB' is migrated next to SQLS_TNSALIAS 'NORMALDB_ALIAS', but the instance is resolved by its alias, so the SID no longer restricts the section
1089
+
```
1090
+
1091
+
The SID cannot be kept at all when it does not identify one instance of the migrated
1092
+
configuration — the section lists several SIDs, several sections use the same alias with
1093
+
different SIDs, or the alias already belongs to a `DBUSER_*` entry with a SID of its own.
1094
+
The alias then forms the entry alone and the dropped restriction is reported:
1095
+
1096
+
```
1097
+
# WARNING: Ambiguous: SQLS_SIDS 'ONE, TWO' cannot be kept next to SQLS_TNSALIAS 'SHARED_ALIAS', the instance is resolved by its alias alone; verify that the alias connects to the intended database
1098
+
```
1099
+
1100
+
In both cases, check that the alias resolves to the database the section was meant to
1101
+
query — the connection now depends on your `tnsnames.ora` alone.
1102
+
1065
1103
### What Is Not Migrated
1066
1104
1067
1105
The following variables are recognized but only preserved as comments in the output;
0 commit comments