Skip to content

Commit

Permalink
read me updates, default value of timezone is set local
Browse files Browse the repository at this point in the history
  • Loading branch information
sivasamyk committed Jan 20, 2017
1 parent 98c7565 commit 437e3e2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ you need to map the current event fields in ES to logtrail specific fields. This
- default_time_range_in_days - Default time range in days to search when time is not specified using Seek button.
Example: Value of 30 means logtrail will search only in logs from last 30 days, unless time is specified using Seek button.
Value of 0 means logtrail will search in all available logs by default.
- display_timezone - Timezone to display the timestamp in Event Viewer. e.g. `America/Los_Angeles`. Default value of `local` will use the timezone of browser. The time specified in `Seek To` popup will always use browser timezone.
- display_timestamp_format - Format to display the timestamp in Event Viewer. For list of valid value refer [here](http://momentjs.com/docs/#/displaying/)
- fields - Edit this parameter to map the event fields in ES to logtrail fields
- timestamp - maps to @timestamp field inserted by logstash. This will be used for querying internally
- display_timestamp - the formatted timestamp displayed in the events view. Can be mapped to @timestamp
- timestamp - maps to @timestamp field inserted by logstash. This will be used for querying internally. Logtrail recommends @timestamp to be stored in UTC in ES.
- display_timestamp - the formatted timestamp displayed in the events view. By default mapped to @timestamp
- hostname - hostname from where the events were received. Also used by hostname filter
- program - program that generated this event.
- message - actual event message. This field will be used by search.
- Example: If you event fields name are @timestamp, host, process, message the mapping should be
- Example: If the event fields names are @timestamp, host, process, message the mapping should be
```
"mapping" : {
"timestamp" : "@timestamp",
Expand Down Expand Up @@ -90,7 +92,7 @@ you need to map the current event fields in ES to logtrail specific fields. This
```
- Configure rsyslog to send data to logstash
- In Ubuntu
- As root, edit /etc/rsyslog.conf or /etc/syslog.conf to include following line at the end
- As root, edit /etc/rsyslog.conf or /etc/syslog.conf to include following line at the end
- To send syslog events using TCP `*.* @@<logstash-agent-ip>:<port>`
- To send syslog events using UDP `*.* @<logstash-agent-ip>:<port>`
- Restart rsyslog to activate the changes
Expand All @@ -99,4 +101,4 @@ you need to map the current event fields in ES to logtrail specific fields. This
- Logs & Events from Windows, Java, Python, PHP, Perl, Ruby, Android, Docker, .Net can be shipped using syslog protocol.
- For more configuration options refer to [Papertrail Configuration Help](http://help.papertrailapp.com/).
- Beats/Fluentd can also be used to ship events to ES and fields can be mapped using `fields` parameter in `logtrail.json`
- Switching back to Kibana main view from logtrail will not work (known bug). Workaround: Please change the URL directly in address bar.
- Switching back to Kibana main view from logtrail will not work (known bug). Workaround: Please change the URL directly in address bar.
2 changes: 1 addition & 1 deletion logtrail.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"tail_interval_in_seconds": 10,
"es_index_time_offset_in_seconds": 0,
"display_timezone": null,
"display_timezone": "local",
"display_timestamp_format": "MMM DD HH:mm:ss",
"max_buckets": 500,
"nested_objects" : false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logtrail",
"version": "0.1.6",
"version": "0.1.7",
"description": "Plugin to view, search & tail logs in Kibana",
"main": "gulpfile.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ app.controller('logtrail', function ($scope, kbnUrl, $route, $routeParams, es, c
function addParsedTimestamp(event) {
if (selected_index_config.display_timestamp_format != null) {
var display_timestamp = moment(event['display_timestamp']);
if (selected_index_config.display_timezone != null) {
if (selected_index_config.display_timezone !== 'local') {
display_timestamp = display_timestamp.tz(selected_index_config.display_timezone);
}
event['display_timestamp'] = display_timestamp.format(selected_index_config.display_timestamp_format);
Expand Down

0 comments on commit 437e3e2

Please sign in to comment.