Add docs for predefined_http#8161
Conversation
e813e38 to
bf8d26e
Compare
bf8d26e to
fc183e1
Compare
docs/en/interfaces/index.md
Outdated
| ClickHouse provides two network interfaces (both can be optionally wrapped in TLS for additional security): | ||
|
|
||
| * [HTTP](http.md), which is documented and easy to use directly. | ||
| * [Predefined HTTP](predefined_http.md), which is more easy integration with third-party tools. |
There was a problem hiding this comment.
let's put all this into same http.md as additional sections
| $ echo '(4),(5),(6)' | curl 'http://localhost:8123/?query=INSERT%20INTO%20t%20VALUES' --data-binary @- | ||
| ``` | ||
|
|
||
| Now ClickHouse supports Predefined HTTP Interface which can help you more easy integration with third party tools. For example, the following example describes how to by Prometheus with Predefined HTTP Interface integration. |
There was a problem hiding this comment.
we shouldn't use any reference to time in documentation (now, already, etc.), here and in other places
|
|
||
| Now ClickHouse supports Predefined HTTP Interface which can help you more easy integration with third party tools. For example, the following example describes how to by Prometheus with Predefined HTTP Interface integration. | ||
|
|
||
| > Example: |
There was a problem hiding this comment.
some formatting issues, there should be no mass >
|
|
||
| > Example: | ||
| > | ||
| > * First, add these configurations to the configuration file: |
There was a problem hiding this comment.
| > * First, add these configurations to the configuration file: | |
| > * First of all, add this section to server configuration file: |
| > </http_handlers> | ||
| > ``` | ||
| > | ||
| > * You can now request the url directly for data in the Prometheus format: |
There was a problem hiding this comment.
- link to format description and/or to Prometheus itself
- we should explain in the very beginning that this example is about exporting metrics in Prometheus format, not in the middle of it
|
|
||
| You can configure `<method>`, `<headers>`, `<url>` and `<queries>` in `<predefined_query_handler>`. | ||
|
|
||
| `<method>` is responsible for matching the method part of the HTTP request. `<method>` fully conforms to the definition of method in the HTTP protocol. It is an optional configuration. |
There was a problem hiding this comment.
some link to proper definition of "method"
|
|
||
| `<method>` is responsible for matching the method part of the HTTP request. `<method>` fully conforms to the definition of method in the HTTP protocol. It is an optional configuration. | ||
|
|
||
| `<url>` is responsible for matching the url part of the HTTP request. It is compatible with RE2's regular expressions. It is an optional configuration. |
There was a problem hiding this comment.
- what happens if it's omitted?
- link to re2 docs
|
|
||
| `<predefined_query_handler>` supports setting Settings and query_params values. | ||
|
|
||
| To experiment with this functionality, the example defines the values of max_threads and max_alter_threads and queries whether the Settings were set successfully. |
There was a problem hiding this comment.
| To experiment with this functionality, the example defines the values of max_threads and max_alter_threads and queries whether the Settings were set successfully. | |
| The following example defines the values of `max_threads` and `max_alter_threads` settings, then queries the system table to check whether these settings were set successfully. |
| max_alter_threads 2 | ||
| ``` | ||
|
|
||
| > Note: |
There was a problem hiding this comment.
Proper syntax for notes:
!!! note "Note"
My note text
| ClickHouse extracts and executes the value corresponding to the `<query_param_name>` value in the url of the HTTP request. | ||
| ClickHouse default setting `<query_param_name>` is `/query` . It is an optional configuration. | ||
|
|
||
| To experiment with this functionality, the example defines the values of max_threads and max_alter_threads and queries whether the Settings were set successfully. |
There was a problem hiding this comment.
- same issue as above
- also it doesn't explain the specifics of this example comparing to previous one
|
But the feature is not merged yet. It is in the queue and I hope will be merged very soon! |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Detailed description (optional):
#7572