Install Multiple Python Versions for Specific Project
# run this command in the root web directory | |
find . -type d -exec touch {}/index.html \; |
require "java" | |
require "rubygems" | |
require "sequel" | |
require "sqljdbc4.jar" #this files path may need to be relevate to file location | |
DB = Sequel.connect( | |
:adapter => "jdbc", | |
:url => "jdbc:sqlserver://doric-server5;database=ADCData_Doric;integratedSecurity=true" | |
# This is using integrated security, might want to pass username and password | |
# More Info at http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html |
input { | |
generator { | |
lines => [ | |
"line 1", | |
"line a" | |
] | |
count => 1 | |
} | |
} |
http { | |
log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time ' | |
'<"$request_body" >"$resp_body"'; | |
lua_need_request_body on; | |
set $resp_body ""; | |
body_filter_by_lua ' |
We have had some success using LS-to-LS over HTTP(S), which supports an HTTP(s) Load Balancer or Proxy in the middle, and can be secured with TLS/SSL. It can be made to be quite performant, but doing so requires some specific tuning.
The upstream pipelie would contain a single HTTP output plugin aimed either directly at a downstream Logstash or at a Load Balancer, importantly configured with:
format => json_batch
(for performance; without this one event will be sent at a time) andretry_non_idempotent => true
(for resilience; without this, some failures cannot be safely retried).
Depending on whether we ar sending directly to another Logstash or through an SSL-terminating Load Balancer or proxy, the output may need to be configured
- with HTTP Basic credentials (
user
/password
),
The logstash agent is 3 parts: inputs -> filters -> outputs.
Each '->' is an internal messaging system. It is implemented with a 'SizedQueue' in Ruby. SizedQueue allows a bounded maximum of items in the queue such that any writes to the queue will block if the queue is full at maximum capacity.
Logstash sets the queue size to 20. This means only 20 events can be pending into the next phase - this helps reduce any data loss and in general avoids logstash trying to act as a data storage system. These internal queues are not for storing messages long-term.
In reverse, here's what happens with a queue fills.
# How to install Check MK Agent on ubuntu 16.04 | |
# Install check_mk_agent: | |
# - sudo apt-get install check-mk-agent (will install older version) | |
# - On your Check_MK dashboard, go to "Monitoring Agents", click the link for "Check_MK Agent for Linux", save the raw text | |
# on your server: | |
sudo vi /usr/bin/check_mk_agent | |
# paste Check_MK dashboard > Monitoring Agents > Check_MK Agent for Linux |
Electron is tricky to get set up on Windows Subsystem for Linux, but it can work!
Four things needed overall:
- you need WSL2, not WSL1
- you need node, of course, and that part isn't so bad
- you need to
apt install
several dependencies - you need an X Server so it can display the electron GUI over in Windows-land
Setup instructions, in order:
input { | |
generator { | |
lines => [ | |
"whatever|1|BA|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|BP|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|SA|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|SP|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|BC|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|SC|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||61033|", | |
"whatever|1|BF|110100|11:19:39|1|101.00000|whatever|123456789||10.000|||", |