formatting and typos

This commit is contained in:
DokaDoka committed 2022-12-11 15:00:43 +11:00
1 parent 75698216e0
commit 724c7e356d
99 files changed
+515 -305

No files matched your search

+14 -12
View File
@@ -1,12 +1,14 @@
## Submit logs to Datadog
Register an account with [datadog](https://www.datadoghq.com/). Once registered you need to create an [API key](https://app.datadoghq.com/organization-settings/api-keys).
Register an account with [datadog](https://www.datadoghq.com/). Once registered you need to create an [API key](https://app.datadoghq.com/organization-settings/api-keys).
Modify your `server.cfg` with the newly generated API key and [intake server](https://docs.datadoghq.com/api/latest/logs/#send-logs).
- datadoghq.com
- us3.datadoghq.com
- us5.datadoghq.com
- datadoghq.eu
```
```yaml
set datadog:key "yourapikey"
set datadog:site "datadoghq.com"
```
@@ -14,14 +16,14 @@ set datadog:site "datadoghq.com"
```lua
lib.logger(source, event, message, ...)
```
* source: `string` or `number`
* event: `string`
* message: `string`
* ...: `string`
- source: `string` or `number`
- event: `string`
- message: `string`
- ...: `string`
Source is passed to ddsource and creates a tag. Could be playerId, identifier, -1, or server.
Event is passed to ddservice and displays in the logs list.
Source is passed to `ddsource` and creates a tag. Could be playerId, identifier, -1, or server.
Event is passed to `ddservice` and displays in the logs list.
Additional arguments are converted into tags for additional filtering and search options.
```lua
@@ -61,13 +63,13 @@ Once registered with Grafana Cloud, head to [My Account](https://grafana.com/aut
To setup a grafana instance you'll require docker, and knowledge on containers or kubernetes. Please find a guide to setup a grafana stack (min requirement grafana and grafana loki) and follow that. Once done, setup authentication and use the username and password securing your endpoint.
[*] Please note: By default self-hosted loki instances do not provide any authenication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access.
[*] Please note: By default self-hosted loki instances do not provide any authentication layers and will require an external authentication layer such as NGINX basic auth or Cloudflare Access.
#### Setting up Server Config
Open your server.cfg and if you have previously used datadog logging, change the `ox:logger` tag to be loki if not add the following tags to your cfg.
```
```yaml
set ox:logger "loki"
set loki:user "<insert your user>"
set loki:key "<insert the api key or password>"
@@ -76,7 +78,7 @@ set loki:endpoint "<insert loki url without http:// or https://>"
Here is an example
```
```yaml
set ox:logger "loki"
set loki:user "1337"
set loki:key "alongcomplicatedsecurepassword"
@@ -89,4 +91,4 @@ The data can be inserted into Loki the same way as datadog so you can follow the
#### Browsing Data
If you're unfamiliar with how to use Loki please follow an online guide or a youtube video. You can get quite indepth with what you can do, you can even track metrics and economic health all from logs.
If you're unfamiliar with how to use Loki please follow an online guide or a youtube video. You can get quite in-depth with what you can do, you can even track metrics and economic health all from logs.