README.md in logstash-output-newrelic-1.0.2 vs README.md in logstash-output-newrelic-1.0.3
- old
+ new
@@ -4,18 +4,13 @@
## Installation
Install the New Relic Logstash plugin using the following command:</br>
`logstash-plugin install logstash-output-newrelic`
-(Optional) If you are interested in installing the gem directly, run the following command. If you want a specific version, specify it by appending the `-v <VERSION>` option.<br/>
-`gem install logstash-output-newrelic`
+### Versions
+Versions of this plugin less than 1.0.0 are unsupported.
-```
-Old version: 0.9.1 (unmaintained)
-Current: 1.0.0
-```
-
## Configuration
Add the following block to your logstash.conf (with your specific API Insert key), then restart Logstash.
There are other optional configuration properties, see below.
@@ -48,11 +43,12 @@
| max_delay | The maximum delay between retries, in seconds | 30 |
| base_uri | New Relic ingestion endpoint | https://log-api.newrelic.com/log/v1 |
## Testing
-An easy way to test the plugin is to make sure Logstash is getting input from a log file you can write to. Something like this in your logstash.conf:
+An easy way to test the plugin is to make sure Logstash is getting input from a log file you
+can write to. Something like this in your logstash.conf:
```
input {
file {
path => "/path/to/your/log/file"
}
@@ -60,34 +56,31 @@
```
* Restart Logstash
* Append a test log message to your log file: `echo "test message" >> /path/to/your/log/file`
* Search New Relic Logs for `"test message"`
-## Notes
+## JSON message parsing
-This plugin will attempt to parse any 'message' attribute as JSON -- if it is JSON, its JSON attributes will be added to the event.
+This plugin will attempt to parse any 'message' attribute as JSON -- if it is JSON, it will be parsed and
+the JSON attributes will be added to the event.
-For example, the events:
+For example, the event:
```
-[{
- "message": "some message",
- "timestamp": 1531414060739
-},
{
- {"message":"some_message","timestamp":"12897439", "compound" :"{\"a\":111, \"b\":222}"},
-}]
+ "timestamp": 1562767499238,
+ "message": "{\"service-name\": \"login-service\", \"user\": {\"id\": 123, \"name\": \"alice\"}}"
+}
+
```
-Will be output as:
+Will be treated as:
```
-[{ "message": "{\"key\": \"value1\", \"compound\": {\"sub_key\": \"value2\"}}",
- "key": "value1",
- "compound": {
- "sub_key": "value2"
- },
- "other": "other value"
-}]
+{
+ "timestamp": 1562767499238,
+ "message": "{\"service-name\": \"my-service\", \"user\": {\"id\": 123, \"name\": \"alice\"}}",
+ "service-name": "login-service",
+ "user": {
+ "id": 123,
+ "name": "alice"
+ }
+}
```
-
-## Development
-
-See [DEVELOPER.md](DEVELOPER.md)