diff --git a/files/logstash.json b/files/logstash.json new file mode 100644 index 0000000..51a58b3 --- /dev/null +++ b/files/logstash.json @@ -0,0 +1,226 @@ +{ + "title": "Logstash Search", + "services": { + "query": { + "list": { + "0": { + "query": "{{ARGS.query || ''}}", + "alias": "", + "color": "#7EB26D", + "id": 0, + "pin": false, + "type": "lucene" + } + }, + "ids": [ + 0 + ] + }, + "filter": { + "list": { + "0": { + "type": "time", + "field": "@timestamp", + "from": "now-{{ARGS.from || '15m'}}", + "to": "now", + "mandate": "must", + "active": true, + "alias": "", + "id": 0 + } + }, + "ids": [ + 0 + ] + } + }, + "rows": [ + { + "title": "Graph", + "height": "350px", + "editable": true, + "collapse": false, + "collapsable": true, + "panels": [ + { + "span": 12, + "editable": true, + "group": [ + "default" + ], + "type": "histogram", + "mode": "count", + "time_field": "@timestamp", + "value_field": null, + "auto_int": true, + "resolution": 100, + "interval": "10m", + "fill": 3, + "linewidth": 3, + "timezone": "browser", + "spyable": true, + "zoomlinks": true, + "bars": true, + "stack": true, + "points": false, + "lines": false, + "legend": true, + "x-axis": true, + "y-axis": true, + "percentage": false, + "interactive": true, + "queries": { + "mode": "all", + "ids": [ + 0 + ] + }, + "title": "Events over time", + "intervals": [ + "auto", + "1s", + "1m", + "5m", + "10m", + "30m", + "1h", + "3h", + "12h", + "1d", + "1w", + "1M", + "1y" + ], + "options": true, + "tooltip": { + "value_type": "cumulative", + "query_as_alias": false + } + } + ], + "notice": false + }, + { + "title": "Events", + "height": "350px", + "editable": true, + "collapse": false, + "collapsable": true, + "panels": [ + { + "title": "All events", + "error": false, + "span": 12, + "editable": true, + "group": [ + "default" + ], + "type": "table", + "size": 100, + "pages": 5, + "offset": 0, + "sort": [ + "@timestamp", + "desc" + ], + "style": { + "font-size": "9pt" + }, + "overflow": "min-height", + "fields": [ + "@timestamp", + "message" + ], + "localTime": true, + "timeField": "@timestamp", + "highlight": [], + "sortable": true, + "header": true, + "paging": true, + "spyable": true, + "queries": { + "mode": "all", + "ids": [ + 0 + ] + }, + "field_list": true, + "status": "Stable", + "trimFactor": 300, + "normTimes": true + } + ], + "notice": false + } + ], + "editable": true, + "failover": false, + "index": { + "interval": "day", + "pattern": "[logstash-]YYYY.MM.DD", + "default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED" + }, + "style": "{{ARGS.style || 'dark'}}", + "panel_hints": true, + "pulldowns": [ + { + "type": "query", + "collapse": false, + "notice": false, + "query": "*", + "pinned": true, + "history": [], + "remember": 10 + }, + { + "type": "filtering", + "collapse": true, + "notice": false + } + ], + "nav": [ + { + "type": "timepicker", + "collapse": false, + "notice": false, + "status": "Stable", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ], + "refresh_intervals": [ + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "timefield": "@timestamp", + "now": true, + "filter_id": 0 + } + ], + "loader": { + "save_gist": false, + "save_elasticsearch": true, + "save_local": true, + "save_default": true, + "save_temp": true, + "save_temp_ttl_enable": true, + "save_temp_ttl": "30d", + "load_gist": true, + "load_elasticsearch": true, + "load_elasticsearch_size": 20, + "load_local": true, + "hide": false + }, + "refresh": false +} diff --git a/manifests/js.pp b/manifests/js.pp index 493204a..eb1c3b5 100644 --- a/manifests/js.pp +++ b/manifests/js.pp @@ -43,6 +43,14 @@ class kibana::js ( subscribe => Vcsrepo[$base_path], } + file { "${base_path}/src/app/dashboards/logstash.json": + ensure => present, + source => 'puppet:///modules/kibana/logstash.json', + owner => 'www-data', + require => Vcsrepo[$base_path], + subscribe => Vcsrepo[$base_path], + } + httpd::vhost { 'kibana': docroot => "${base_path}/src", vhost_name => $vhost_name,