Skip to content

Commit

Permalink
Merge pull request cockroachdb#7234 from cockroachdb/support-policy-fix
Browse files Browse the repository at this point in the history
Fix broken formatting in callouts
  • Loading branch information
jseldess authored Apr 28, 2020
2 parents 7c9cc55 + b2cf1d7 commit a5429d1
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion _includes/unsupported-version-soon.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{site.data.alerts.callout_danger}}
Cockroach Labs will stop providing **Assistance Support** for this version on **July 1, 2020**. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the [Release Support Policy](release-support-policy.html).
Cockroach Labs will stop providing <strong>Assistance Support</strong> for this version on <strong>July 1, 2020</strong>. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the <a href="https://www.cockroachlabs.com/docs/releases/release-support-policy.html">Release Support Policy</a>.
{{site.data.alerts.end}}
2 changes: 1 addition & 1 deletion _includes/unsupported-version.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{site.data.alerts.callout_danger}}
This version of CockroachDB is no longer supported. For more details, see the [Release Support Policy](release-support-policy.html).
This version of CockroachDB is no longer supported. For more details, see the <a href="https://www.cockroachlabs.com/docs/releases/release-support-policy.html">Release Support Policy</a>.
{{site.data.alerts.end}}
6 changes: 3 additions & 3 deletions _includes/v20.1/faq/sql-query-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Log files are written to CockroachDB's standard [log directory](debug-and-error-

### Slow query logs

Another useful [cluster setting](cluster-settings.html) is `sql.log.slow_query.latency_threshold`, which is used to log only queries whose service latency exceeds a specified threshold value (e.g., 100 milliseconds):
<span class="version-tag">New in v20.1:</span> Another useful [cluster setting](cluster-settings.html) is `sql.log.slow_query.latency_threshold`, which is used to log only queries whose service latency exceeds a specified threshold value (e.g., 100 milliseconds):

{% include copy-clipboard.html %}
~~~ sql
Expand All @@ -57,7 +57,7 @@ SQL client connections can be logged by turning on the `server.auth_log.sql_conn
> SET CLUSTER SETTING server.auth_log.sql_connections.enabled = true;
~~~

This will log connection established and connection terminated events to a `cockroach-auth` log file. Use the symlink `cockroach-auth.log` to open the most recent log.
This will log connection established and connection terminated events to a `cockroach-auth` log file. Use the symlink `cockroach-auth.log` to open the most recent log.

{{site.data.alerts.callout_info}}
In addition to SQL sessions, connection events can include SQL-based liveness probe attempts, as well as attempts to use the [PostgreSQL cancel protocol](https://www.postgresql.org/docs/current/protocol-flow.html#id-1.10.5.7.9).
Expand All @@ -77,7 +77,7 @@ Along with the above, SQL client authenticated sessions can be logged by turning
> SET CLUSTER SETTING server.auth_log.sql_sessions.enabled = true;
~~~

This logs authentication method selection, authentication method application, authentication method result, and session termination events to the `cockroach-auth` log file. Use the symlink `cockroach-auth.log` to open the most recent log.
This logs authentication method selection, authentication method application, authentication method result, and session termination events to the `cockroach-auth` log file. Use the symlink `cockroach-auth.log` to open the most recent log.

This example log shows authentication success over a `hostssl` (TLS certificate over TCP) connection:

Expand Down
2 changes: 1 addition & 1 deletion v20.1/admin-ui-debug-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The **Even More Advanced Debugging** section of the page lists additional report
Depending on your [access level](admin-ui-overview.html#admin-ui-access), the endpoints listed here provide access to:

- [Log files](debug-and-error-logs.html#write-to-file)
- Secondary log files (e.g., RocksDB logs, [execution logs](query-behavior-troubleshooting.html#cluster-wide-execution-logs), [slow query logs](query-behavior-troubleshooting.html#slow-query-logs), [authentication logs](query-behavior-troubleshooting.html#authentication-logs))
- Secondary log files (e.g., RocksDB logs, [execution logs](query-behavior-troubleshooting.html#cluster-wide-execution-logs), [slow query logs](query-behavior-troubleshooting.html#using-the-slow-query-log), [authentication logs](query-behavior-troubleshooting.html#authentication-logs))
- Node status
- Hot ranges
- Node-specific metrics
Expand Down
2 changes: 1 addition & 1 deletion v20.1/cockroach-debug-zip.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ key: debug-zip.html
The `cockroach debug zip` [command](cockroach-commands.html) connects to your cluster and gathers information from each active node into a single file (inactive nodes are not included):

- [Log files](debug-and-error-logs.html)
- Secondary log files (e.g., RocksDB logs, [execution logs](query-behavior-troubleshooting.html#cluster-wide-execution-logs), [slow query logs](query-behavior-troubleshooting.html#slow-query-log))
- Secondary log files (e.g., RocksDB logs, [execution logs](query-behavior-troubleshooting.html#cluster-wide-execution-logs), [slow query logs](query-behavior-troubleshooting.html#using-the-slow-query-log))
- Cluster events
- Schema change events
- Node liveness
Expand Down
10 changes: 5 additions & 5 deletions v20.1/query-behavior-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Use the [slow query log](#using-the-slow-query-log) or [Admin UI](#using-the-adm

### Using the slow query log

The slow query log is a record of SQL queries whose service latency exceeds a specified threshold value. When the `sql.log.slow_query.latency_threshold` [cluster setting](cluster-settings.html) is set to a non-zero value, each gateway node will log slow SQL queries to a secondary log file `cockroach-sql-slow.log` in the [log directory](debug-and-error-logs.html#write-to-file).
<span class="version-tag">New in v20.1:</span> The slow query log is a record of SQL queries whose service latency exceeds a specified threshold value. When the `sql.log.slow_query.latency_threshold` [cluster setting](cluster-settings.html) is set to a non-zero value, each gateway node will log slow SQL queries to a secondary log file `cockroach-sql-slow.log` in the [log directory](debug-and-error-logs.html#write-to-file).

{{site.data.alerts.callout_info}}
Service latency is the time taken to execute a query once it is received by the cluster. It does not include the time taken to send the query to the cluster or return the result to the client.
{{site.data.alerts.end}}

1. Run the [`cockroach sql`](cockroach-sql.html) command against one of your nodes. This opens the interactive SQL shell.
1. Run the [`cockroach sql`](cockroach-sql.html) command against one of your nodes. This opens the interactive SQL shell.

2. Set the `sql.log.slow_query.latency_threshold` [cluster setting](cluster-settings.html) to a threshold of your choosing. For example, 100 milliseconds represents [the limit where a user feels the system is reacting instantaneously](https://www.nngroup.com/articles/response-times-3-important-limits/).

Expand All @@ -31,17 +31,17 @@ Service latency is the time taken to execute a query once it is received by the
> SET CLUSTER SETTING sql.log.slow_query.latency_threshold = '100ms';
~~~

3. Each node's slow query log is written by default in CockroachDB's standard [log directory](debug-and-error-logs.html#write-to-file).
3. Each node's slow query log is written by default in CockroachDB's standard [log directory](debug-and-error-logs.html#write-to-file).

4. When you open a slow query log, look for a line that corresponds to your earlier [`SET CLUSTER SETTING`](set-cluster-setting.html) command:

~~~
I200325 19:24:10.079675 380825 sql/exec_log.go:193 [n1,client=127.0.0.1:49712,hostnossl,user=root] 1532 9.217ms exec "$ cockroach sql" {} "SET CLUSTER SETTING \"sql.log.slow_query.latency_threshold\" = '100ms'" {} 0 "" 0
~~~

Slow queries will be logged after this line.
Slow queries will be logged after this line.

5. The slow query log generally shares the [SQL audit log file format](experimental-audit.html#audit-log-file-format). One exception is that service latency is found between the log entry counter and log message.
5. The slow query log generally shares the [SQL audit log file format](experimental-audit.html#audit-log-file-format). One exception is that service latency is found between the log entry counter and log message.

For example, the below query was logged with a service latency of 166.807 milliseconds:

Expand Down
2 changes: 1 addition & 1 deletion v20.1/sql-audit-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@ For reference documentation of the audit log file format, see [`ALTER TABLE ...
- [`CREATE SEQUENCE`](create-sequence.html)
- [SQL Feature Support](sql-feature-support.html)
- [Authentication logs](query-behavior-troubleshooting.html#authentication-logs)
- [Slow query logs](query-behavior-troubleshooting.html#slow-query-logs)
- [Slow query logs](query-behavior-troubleshooting.html#using-the-slow-query-log)

0 comments on commit a5429d1

Please sign in to comment.