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
FILE=/home/siteup.log | |
SITE=http://quranerkotha.com | |
SIZE=`stat -c %s $FILE` | |
# Delete the file if it is over 1MB already | |
if [ $SIZE -ge 1000000 ]; then | |
rm FILE | |
fi | |
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 | |
if wget -nv -p $1 &> $2 | |
then | |
if cat $2 | grep -i "error" | |
then | |
echo "Site has error" | |
cat $2 | grep -i -B 1 "error" | mail -s "$3" $4 | |
else | |
echo "Site OK" |
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 | |
cd /home/ | |
./monitorsite http://blog.omaralzabir.com/about/ islamblog.log "[ERROR]IslamBlog" omaralzabir@gmail.com | |
./monitorsite http://omaralzabir.com/using-custom-font-without-slowing-down-page-load/ omarblog.log "[ERROR]OmarBlog" omaralzabir@gmail.com | |
./monitorsite http://quranerkotha.com/aboutus/ quranerkotha.log "[ERROR]QuranerKotha" omaralzabir@gmail.com |
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
This is a test Gist. |
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
{ | |
"template":"logstash-*", | |
"settings":{ | |
"index.refresh_interval":"5s" | |
}, | |
"mappings":{ | |
"_default_":{ | |
"dynamic_templates":[ | |
{ |
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
{ | |
"id": 1, | |
"title": "Web Log", | |
"originalTitle": "Web Log", | |
"tags": [], | |
"style": "dark", | |
"timezone": "browser", | |
"editable": true, | |
"hideControls": false, | |
"sharedCrosshair": false, |
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
input { | |
beats { | |
port => 5045 | |
type => 'iis' | |
} | |
} | |
# First filter | |
filter { |
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
ErrorDocument 404 / | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] |
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
$elasticsearch="https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.1/elasticsearch-2.3.1.zip" | |
$logstash="https://download.elastic.co/logstash/logstash/logstash-2.3.1.zip" | |
$filebeat="https://download.elastic.co/beats/filebeat/filebeat-1.2.1-windows.zip" | |
$grafana="https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-3.0.0-beta5.windows-x64.zip" | |
$logstashconf="https://gist.githubusercontent.com/oazabir/9b9cfc8795581ae5ec07e40245a86081/raw/6a6016a3902e4f2f964a266592a5799aebe3469c/logstash.yml" | |
$logstashtemplate="https://gist.githubusercontent.com/oazabir/000bde7bc3c8567ea665a0b59c0d86ca/raw/eab8f426b70ff131a40eb4a0ca85429688721901/logstash-template.json" | |
$filebeatconf="https://gist.githubusercontent.com/oazabir/8046a3c33b61a15d0661f85fae60e245/raw/9cf520fc61c8f1318ef27703c2c24f7c2ffe2442/filebeat.yml" | |
$grafanatemplate="https://gist.githubusercontent.com/oazabir/6a3021d8a08fd60a43a48a41cf721742/raw/2806b32d6eb35093f6897c3900ff5a3365bb93ee/GrafanaWebLogTempl |
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
-g /data/docker -H tcp://0.0.0.0:2376 --tls=false -H unix:///var/run/docker.sock --log-opt max-size=100m --log-opt max-file=3 |
OlderNewer