How to Clear RAM Memory Cache, Buffer and Swap Space on Linux via @tecmint…
How to Clear RAM Memory Cache, Buffer and Swap Space on Linux https://t.co/9xuN9M7MnJ via @tecmint
— Cristian O. Balan (@oviliz) October 11, 2018
How to Clear RAM Memory Cache, Buffer and Swap Space on Linux https://t.co/9xuN9M7MnJ via @tecmint
— Cristian O. Balan (@oviliz) October 11, 2018
How to Install the PHP mcrypt Extension https://t.co/WiN4PnSKSe
— Cristian O. Balan (@oviliz) September 25, 2018
Disabling annoying 3rd-party Magento modules https://t.co/AmGHmiUbtp
— Cristian O. Balan (@oviliz) September 24, 2018
“How to reduce volume of an AWS EC2 instance” by @rahulian https://t.co/uMhGkTRJNM
— Cristian O. Balan (@oviliz) July 20, 2018
I found that Azure has a hard time to monitor disk usage on a Linux box. There are ways, but it seems to be too complicated to achieve such a basic thing. So I came up with the following script I call in a cron job as needed.
#!/bin/bash CURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g') THRESHOLD=90 PUBLICIP=$(curl ipecho.net/plain) LOCALIP=$(ips=($(hostname -I)) for ip in "${ips[@]}" do echo $ip done) if [ "$CURRENT" -gt "$THRESHOLD" ] ; then mail -a From:[email protected] -s "Disk Space Alert on ${HOSTNAME} ($PUBLICIP / $LOCALIP)" [email protected] << EOF The $HOSTNAME root partition remaining free space is critically low. Used: $CURRENT% EOF fi
Make sure to adjust the THRESHOLD and emails as needed. Ideally, you’ll configure a mail server (e.g. Postfix) with SMTP credentials (e.g. SendGrid) and proper SPF records to make sure your emails don’t end up in Junk and miss them.
There are plenty of proper monitoring solutions and I always love those that give you a free tier such as HetrixTools Uptime Monitors or Datadog. However, not always these can be used.
Creating large SPF records with many entries https://t.co/2hPYT702vp
— Cristian O. Balan (@oviliz) July 6, 2018
Let’s Encrypt wildcard certificate configuration with AWS Route 53 DNS by @Sharlos https://t.co/gSuKvZTFc8
— Cristian O. Balan (@oviliz) June 28, 2018
In a nutshell:
mkdir ~/.aws nano ~/.aws/credentials #[default] #aws_access_key_id = ABC #aws_secret_access_key = XYZ chmod 400 ~/.aws/credentials chmod 500 ~/.aws apt-get install software-properties-common add-apt-repository ppa:certbot/certbot apt update && apt install python-certbot-nginx python-pip python-asn1crypto python-certifi python-cffi-backend python-cryptography python-enum34 python-idna python-ipaddress pip install --upgrade pip certbot --version pip install certbot_dns_route53==0.26.1 mkdir -p /opt/letsencrypt/config mkdir -p /opt/letsencrypt/log mkdir -p /opt/letsencrypt/work certbot certonly -d hosting.oviliz.com --dns-route53 --logs-dir /opt/letsencrypt/log/ --config-dir /opt/letsencrypt/config/ --work-dir /opt/letsencrypt/work/ -m [email protected] --agree-tos --non-interactive --server https://acme-v02.api.letsencrypt.org/directory /usr/local/bin/certbot renew --dns-route53 --logs-dir /opt/letsencrypt/log/ --config-dir /opt/letsencrypt/config/ --work-dir /opt/letsencrypt/work/ --non-interactive --server https://acme-v02.api.letsencrypt.org/directory --post-hook "service nginx reload"
Or if you’re using DNS Made Easy:
#... nano ~/.dnsmadeeasy/credentials #dns_dnsmadeeasy_api_key = ABC #dns_dnsmadeeasy_secret_key = XYZ #... certbot certonly -d hosting.oviliz.com --dns-dnsmadeeasy --dns-dnsmadeeasy-credentials ~/.dnsmadeeasy/credentials --logs-dir /opt/letsencrypt/log/ --config-dir /opt/letsencrypt/config/ --work-dir /opt/letsencrypt/work/ -m [email protected] --agree-tos --non-interactive --server https://acme-v02.api.letsencrypt.org/directory /usr/local/bin/certbot renew --dns-route53 --logs-dir /opt/letsencrypt/log/ --config-dir /opt/letsencrypt/config/ --work-dir /opt/letsencrypt/work/ --non-interactive --server https://acme-v02.api.letsencrypt.org/directory --post-hook "service nginx reload"
The same concept can be obviously applied with Cloudflare and so on.
Install MySQL 5.6 in Ubuntu 16.04, useful when needed: https://t.co/kPT5ZEqrIc
— Cristian O. Balan (@oviliz) June 27, 2018
Harness | The DevOps Tools Lifecycle Mesh for 2018 – Harness https://t.co/BWe67Gu5xd
— Cristian O. Balan (@oviliz) April 26, 2018
For what shall it profit a man, if he shall gain the whole world, and lose his own soul? – Mark 8:36
— Cristian O. Balan (@oviliz) April 17, 2018