Pattern file: /etc/logstash/patterns/nginx
Logstash shipper: /etc/logstash/conf.d/shipper.conf
Nginx http log module: http://nginx.org/en/docs/http/ngx_http_log_module.html
| { | |
| "template": "logstash-*", | |
| "settings" : { | |
| "number_of_shards" : 180, | |
| "number_of_replicas" : 1, | |
| "index.refresh_interval" : "5s", | |
| "index.routing.allocation.total_shards_per_node" : 4, | |
| "index.search.slowlog.threshold.query.warn": "100ms", | |
| "index.search.slowlog.threshold.fetch.warn": "100ms", |
Pattern file: /etc/logstash/patterns/nginx
Logstash shipper: /etc/logstash/conf.d/shipper.conf
Nginx http log module: http://nginx.org/en/docs/http/ngx_http_log_module.html
| $win_user = "ipc" | |
| $linux_user = "ipc" | |
| $package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
| $base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
| $dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
| $dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
| Add-MpPreference -ExclusionPath $base_path |
| $userPath = $env:USERPROFILE | |
| $pathExclusions = New-Object System.Collections.ArrayList | |
| $processExclusions = New-Object System.Collections.ArrayList | |
| $pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
| $pathExclusions.Add('C:\Windows\assembly') > $null | |
| $pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null | |
| $pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null | |
| $pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null | |
| $pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null |
| # Simple TFServing example; Based on | |
| # https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/mnist_client.py | |
| # Added simpler mnist loading parts and removed some complexity | |
| #!/usr/bin/env python2.7 | |
| """A client that talks to tensorflow_model_server loaded with mnist model. | |
| The client downloads test images of mnist data set, queries the service with | |
| such test images to get predictions, and calculates the inference error rate. | |
| Typical usage example: |