This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f logfile.log | grep ERROR | while read msg; do psql -c "INSERT INTO error_stream (msg) VALUES ($msg)"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f logfile.log | \ | |
grep ERROR | while read msg; do psql -c "INSERT INTO error_stream (msg) VALUES ($msg)"; done` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE CONTINUOUS VIEW errors_1m AS | |
SELECT COUNT(*) FROM error_stream | |
WHERE (arrival_timestamp > clock_timestamp() - interval '5 minutes'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f logfile.log | \ | |
grep ERROR | while read msg; do psql -c "INSERT INTO error_stream (msg) VALUES ($msg)"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE CONTINUOUS VIEW errors_1m AS | |
SELECT COUNT(*) FROM error_stream | |
WHERE (arrival_timestamp > clock_timestamp() - interval '1 minute'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz && \ | |
tar -xvf 1.0.0.tar.gz && \ | |
cd nanomsg-1.0.0 && \ | |
mkdir build && \ | |
cd build && \ | |
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DNN_STATIC_LIB=1 -DCMAKE_POSITION_INDEPENDENT_CODE=1 && \ | |
cmake --build . && \ | |
sudo cmake --build . --target install && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.0/zeromq-4.2.0.tar.gz && \ | |
tar -xvf zeromq-4.2.0.tar.gz && \ | |
cd zeromq-4.2.0/ && \ | |
./autogen.sh && \ | |
./configure --enable-static --prefix=/usr && \ | |
make && \ | |
sudo make install && \ | |
sudo ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pkg-config may not be necessary to install on all systems | |
sudo apt-get install -y wget libtool autoconf automake pkg-config | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz && \ | |
tar -xvf zeromq-4.2.5.tar.gz && \ | |
cd zeromq-4.2.5/ && \ | |
./autogen.sh && \ | |
./configure CPPFLAGS=-DPIC CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-fPIC --prefix=/usr && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "excalidraw", | |
"version": 2, | |
"source": "https://excalidraw.com", | |
"elements": [ | |
{ | |
"id": "eMqGPZZ8EoG_afMmJdntC", | |
"type": "rectangle", | |
"x": 413.4942932128906, | |
"y": 157.18307495117188, |