Skip to content

Commit

Permalink
Resolve "补全自定义对象文档"
Browse files Browse the repository at this point in the history
  • Loading branch information
meetzouxu authored and 谭彪 committed Oct 18, 2024
1 parent 2e5e5b5 commit 9b146b6
Show file tree
Hide file tree
Showing 35 changed files with 594 additions and 125 deletions.
22 changes: 22 additions & 0 deletions internal/export/doc/en/inputs/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ For all of the following data collections, the global election tags will added a

{{$m.FieldsMarkdownTable}}
{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Log Collection {#logging}

To collect the Apache log, open `files` in {{.InputName}}.conf and write to the absolute path of the Apache log file. For example:
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Logging {#logging}

<!-- markdownlint-disable MD046 -->
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,27 @@ For all of the following data collections, the global election tags will added a
{{ end }}
## Custom Object {#object}
{{ range $i, $m := .Measurements }}
{{if eq $m.Type "custom_object"}}
### `{{$m.Name}}`
{{$m.Desc}}
- tag
{{$m.TagsMarkdownTable}}
- Metric list
{{$m.FieldsMarkdownTable}}
{{end}}
{{ end }}
## Mongod Log Collection {#logging}
Annotate the configuration file `# enable_mongod_log = false` and change `false` to `true`. Other configuration options for mongod log are in `[inputs.mongodb.log]`, and the commented configuration is very default. If the path correspondence is correct, no configuration is needed. After starting Datakit, you will see a collection measurement named `mongod_log`.
Expand Down
19 changes: 19 additions & 0 deletions internal/export/doc/en/inputs/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,26 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}


## Log {#logging}
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Log {#logging}

To collect NGINX logs, open `files` in {{.InputName}}.conf and write to the absolute path of the NGINX log file. For example:
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/nsq.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,24 @@ For all of the following data collections, the global election tags will added a
{{$m.FieldsMarkdownTable}}

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Long running queries {#slow}

Datakit could reports the SQLs, those executed time exceeded the threshold time defined by user, to Guance Cloud, displays in the `Logs` side bar, the source name is `oracle_log`.
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Log Collection {#logging}

- PostgreSQL logs are output to `stderr` by default. To open file logs, configure them in postgresql's configuration file `/etc/postgresql/<VERSION>/main/postgresql.conf` as follows:
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/rabbitmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Log Collection {#logging}
<!-- markdownlint-disable MD046 -->
???+ attention
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,27 @@ For all of the following data collections, the global election tags will added a

{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- field list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Logging {#logging}

<!-- markdownlint-disable MD024 -->
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/en/inputs/sqlserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,27 @@ For all of the following data collections, the global election tags will be adde
{{ end }}
{{ end }}

## Custom Object {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- tag

{{$m.TagsMarkdownTable}}

- Metric list

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## Logging {#logging}

Following measurements are collected as logs with the level of `info`.
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/zh/inputs/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@ $ sudo apachectl restart

{{ end }}

## 自定义对象 {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- 标签

{{$m.TagsMarkdownTable}}

- 指标列表

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## 日志采集 {#logging}

如需采集 Apache 的日志,可在 {{.InputName}}.conf 中 将 `files` 打开,并写入 Apache 日志文件的绝对路径。比如:
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/zh/inputs/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,27 @@ PUT _plugins/_security/api/roles/monitor

{{ end }}

## 自定义对象 {#object}

{{ range $i, $m := .Measurements }}

{{if eq $m.Type "custom_object"}}

### `{{$m.Name}}`

{{$m.Desc}}

- 标签

{{$m.TagsMarkdownTable}}

- 指标列表

{{$m.FieldsMarkdownTable}}
{{end}}

{{ end }}

## 日志 {#logging}

<!-- markdownlint-disable MD046 -->
Expand Down
21 changes: 21 additions & 0 deletions internal/export/doc/zh/inputs/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,27 @@ mongo --tls --host <mongod_url> --tlsCAFile </etc/ssl/mongo.cert.pem> --tlsCerti
{{ end }}
## 自定义对象 {#object}
{{ range $i, $m := .Measurements }}
{{if eq $m.Type "custom_object"}}
### `{{$m.Name}}`
{{$m.Desc}}
- 标签
{{$m.TagsMarkdownTable}}
- 指标列表
{{$m.FieldsMarkdownTable}}
{{end}}
{{ end }}
## 日志采集 {#logging}
去注释配置文件中 `# enable_mongod_log = false` 然后将 `false` 改为 `true`,其他关于 mongod log 配置选项在 `[inputs.mongodb.log]` 中,注释掉的配置极为默认配置,如果路径对应正确将无需任何配置启动 Datakit 后将会看到指标名为 `mongod_log` 的采集指标集。
Expand Down
Loading

0 comments on commit 9b146b6

Please sign in to comment.