Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: - DO NOT MERGE - Test tabs #201

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions docs/shipping/Code/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ drop_filter: []
---





## Logs

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="log4net" label="log4net" default>

### log4net

**Before you begin, you'll need**:
Expand Down Expand Up @@ -300,9 +309,9 @@ namespace dotnet_log4net
}
}
```


### NLog
</TabItem>
<TabItem value="NLog" label="NLog">
### NLog

**Before you begin, you'll need**:

Expand Down Expand Up @@ -516,10 +525,9 @@ config.AddRule(LogLevel.Debug, LogLevel.Fatal, logzioTarget);
LogManager.Configuration = config;
```




### LoggerFactory
</TabItem>
<TabItem value="LoggerFactory" label="LoggerFactory">
### LoggerFactory

**Before you begin, you'll need**:

Expand Down Expand Up @@ -780,8 +788,9 @@ hierarchy.Root.AddAppender(logzioAppender);
hierarchy.Root.Level = Level.All;
hierarchy.Configured = true;
```


</TabItem>
<TabItem value="Serilog" label="Serilog">

### Serilog

:::note
Expand Down Expand Up @@ -910,6 +919,18 @@ namespace Example

Replace `<<TYPE>` with the type that you want to assign to your logs. You will use this value to identify these logs in Logz.io.

</TabItem>
</Tabs>











## Metrics

Expand Down
36 changes: 36 additions & 0 deletions docs/shipping/Code/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,42 @@ drop_filter: []

## Bulk uploads over HTTP/HTTPS

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs groupId="operating-systems">
<TabItem value="win" label="Windows">Use Ctrl + C to copy.</TabItem>
<TabItem value="mac" label="macOS">Use Command + C to copy.</TabItem>
</Tabs>

<Tabs groupId="operating-systems">
<TabItem value="win" label="Windows">Use Ctrl + V to paste.</TabItem>
<TabItem value="mac" label="macOS">Use Command + V to paste.</TabItem>
</Tabs>


<Tabs>
<TabItem value="apple" label="Apple" default>
This is an apple 🍎
</TabItem>

<TabItem value="orange" label="Orange">
<Tabs>
<TabItem value="tangerine" label="Tangerine" default>
This is a tangerine 🍊
</TabItem>
<TabItem value="mandarin" label="Mandarin">
This is a mandarin 🍊
</TabItem>
</Tabs>
</TabItem>

<TabItem value="banana" label="Banana">
This is a banana 🍌
</TabItem>
</Tabs>


If you want to ship logs from your code but don't have a library in place, you can send them directly to the Logz.io listener as a minified JSON file.

The listeners accept bulk uploads over an HTTP/HTTPS connection or TLS/SSL streams over TCP.
Expand Down
52 changes: 51 additions & 1 deletion docs/shipping/Other/invoke-restmethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,55 @@ metrics_alerts: []
drop_filter: []
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="Windows" label="Windows" default>


Invoke-RestMethod is a command to interact with REST APIs in PowerShell. Invoke-RestMethod is a quick and easy way to test your configuration or troubleshoot your connectivity to Logz.io.

You can upload JSON or plain text files.


### Limitations1111

* Max body size is 10 MB (10,485,760 bytes)
* Each log line must be 500,000 bytes or less
* If you include a `type` field in the log, it overrides `type` in the request header

### Upload a JSON log file1111

**Before you begin, you'll need**:
[PowerShell](https://docs.microsoft.com/en-us/powershell/)




### Upload the file1111

If you want to ship logs from your code but don't have a library in place,
you can send them directly to the Logz.io listener as a minified JSON file.

```shell
Invoke-RestMethod -method POST -Uri https://<<LISTENER-HOST>>:8071?token=<<LOG-SHIPPING-TOKEN>>"&"<<LOG-TYPE>> -InFile <<PATH/TO/LOG/FILE.JSON>>
```

{@include: ../../_include/general-shipping/replace-placeholders.html}

* {@include: ../../_include/log-shipping/type.md} Otherwise, the default `type` is `http-bulk`.
* Replace `<<PATH/TO/LOG/FILE.JSON>>` with the path to your log file.

### Check Logz.io for your logs

Give your logs some time to get from your system to ours, and then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd).

If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
</TabItem>
<TabItem value="Linux" label="Linux">


Invoke-RestMethod is a command to interact with REST APIs in PowerShell. Invoke-RestMethod is a quick and easy way to test your configuration or troubleshoot your connectivity to Logz.io.

You can upload JSON or plain text files.
Expand Down Expand Up @@ -54,4 +100,8 @@ Invoke-RestMethod -method POST -Uri https://<<LISTENER-HOST>>:8071?token=<<LOG-S

Give your logs some time to get from your system to ours, and then open [Open Search Dashboards](https://app.logz.io/#/dashboard/osd).

If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
If you still don't see your logs, see [log shipping troubleshooting]({{site.baseurl}}/user-guide/log-shipping/log-shipping-troubleshooting.html).
</TabItem>
</Tabs>


2 changes: 1 addition & 1 deletion static/manifest.json

Large diffs are not rendered by default.