Redis doc

This commit is contained in:
Eric Fontana
2014-07-30 09:07:43 -04:00
parent d358c33cfb
commit e5bc418f28
7 changed files with 80 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ Since TimberWinR only ships to Redis, the format generated by TimberWinR is JSON
represented as a JSON Property or Array.
## Supported Output Formats
- Redis
1. [Redis](https://github.com/efontana/TimberWinR/blob/master/TimberWinR/mdocs/RedisOutput.md)
## Sample Configuration
TimberWinR reads a JSON configuration file, an example file is shown here:

View File

@@ -10,18 +10,18 @@
],
"Tcp": [
{
"port": "5140"
"_comment": "Output from NLog",
"port": 5140
}
],
"Logs": [
{
"name": "Syslogs1",
{
"location": "C:\\Logs1\\*.log"
}
],
"IISW3CLogs": [
{
"name": "Default site",
"_comment": "Default site",
"location": "c:\\inetpub\\logs\\LogFiles\\W3SVC1\\*"
}
]

View File

@@ -91,9 +91,14 @@ namespace TimberWinR.Inputs
//message has successfully been received
var encoder = new ASCIIEncoding();
var encodedMessage = encoder.GetString(message, 0, bytesRead);
JObject json = JObject.Parse(encodedMessage);
ProcessJson(json);
try
{
JObject json = JObject.Parse(encodedMessage);
ProcessJson(json);
}
catch (Exception)
{
}
}
tcpClient.Close();
Finished();

View File

@@ -101,6 +101,7 @@
<None Include="mdocs\DateFilter.md" />
<None Include="mdocs\Filters.md" />
<None Include="mdocs\GrokFilter.md" />
<None Include="mdocs\TcpInput.md" />
<None Include="mdocs\MutateFilter.md" />
<None Include="mdocs\Logs.md" />
<None Include="mdocs\IISW3CInput.md" />

View File

@@ -11,10 +11,11 @@ If the logging configuration of an IIS virtual site is updated, the structure of
## Parameters
The following parameters are allowed when configuring WindowsEvents.
The following parameters are allowed when configuring IISW3CLogs input.
| Parameter | Type | Description | Details | Default |
| :---------------- |:---------------| :----------------------------------------------------------------------- | :--------------------------- | :-- |
| *location* | string |Location of log files(s) to monitor | Path to text file(s) including wildcards, may be separated by commas | |
| *iCodepage* | integer |Codepage of the text file. | 0 is the system codepage, -1 is UNICODE. | 0 |
| *recurse* | integer |Max subdirectory recursion level. | 0 disables subdirectory recursion; -1 enables unlimited recursion. | 0 |
| *minDateMod* | datetime |Minimum file last modified date, in local time coordinates | When this parameter is specified, the IISW3C input format processes only log files that have been modified after the specified date. | |
@@ -39,7 +40,7 @@ Example Input:
## Fields
After a successful parse of an event, the following fields are added [if configured to be logged](http://technet.microsoft.com/en-us/library/cc754702(v=ws.10).aspx)
After a successful parse of an event, the following fields are added [(if configured to be logged)](http://technet.microsoft.com/en-us/library/cc754702(v=ws.10).aspx)
| Name | Type | Description |
| ---- |:-----| :-----------------------------------------------------------------------|

View File

@@ -0,0 +1,35 @@
# Output: Redis
The Redis output passes on data to Redis to be consumed by the Logtash indexer.
## Parameters
The following parameters are allowed when configuring the Redis output.
| Parameter | Type | Description | Details | Default |
| :-------------|:---------|:------------------------------------------------------------| :--------------------------- | :-- |
| *threads* | string | Location of log files(s) to monitor | Number of worker theads to send messages | 1 |
| *interval* | integer | Interval in milliseconds to sleep during batch sends | Interval | 5000 |
| *batch_count* | integer | The number of events to send in a single transaction | | 10 |
| *index* | string | The name of the redis list | logstash index name | logstash |
| *host* | [string] | The hostname(s) of your Redis server(s) | IP or DNS name | |
| *port* | integer | Redis port number | This port must be open | 6379 |
Example Input:
```json
{
"TimberWinR": {
"Outputs": {
"Redis": [
{
"threads": 1,
"interval": 5000,
"batch_count": 500,
"host": [
"tstlexiceapp006.vistaprint.svc"
]
}
]
}
}
}
```

View File

@@ -0,0 +1,28 @@
# Input: Tcp
The Tcp input will open a port and listen for properly formatted JSON and will forward on the entire JSON.
## Parameters
The following parameters are allowed when configuring the Tcp input.
| Parameter | Type | Description | Details | Default |
| :---------------- |:---------------| :----------------------------------------------------------------------- | :--------------------------- | :-- |
| *port* | integer |Port number to open | Must be an available port | |
Example Input: Monitors all files (recursively) located at C:\Logs1\ matching *.log as a pattern. I.e. C:\Logs1\foo.log, C:\Logs1\Subdir\Log2.log, etc.
```json
{
"TimberWinR": {
"Inputs": {
"Tcp": [
{
"port": 5140
}
]
}
}
}
```
## Fields
A field: "type": "Win32-Tcp" is automatically appended, and the entire JSON is passed on vertabim.