How to use OpenResty to perform health checks
Use OpenResty to perform health checks in your cloud environment as it incorporates Nginx, Lua and comes with batteries included. ...
Use OpenResty to perform health checks in your cloud environment as it incorporates Nginx, Lua and comes with batteries included. ...
RabbitMQ uses Bintray to provide official repositories for RabbitMQ message broker and Erlang, but there is a small catch as at this moment repository for Debian Buster does not contain RabbitMQ application… ...
Generate and print sequences of numbers to perform specific operations using command-line or shell script. ...
Create a shell script to determine how long a specified remote server or device was offline. It is not designed to substitute monitoring solutions but to determine how long it will take to reboot the server or device. It is using convert seconds to human readable time code to display results. ...
Check website for broken links using HTTrack website copier. ...
Pretty print size in bytes using AWK. ...
Display memory used by processes in human readable form using Python script. ...
These are easy mistakes to make as the bash builtin read command will terminate with the error exit code on the end-of-file condition and use Internal Field Separator to split the line into words. It is kind of tricky, but it is worth knowing how to deal with such problems. ...
Display memory used by processes in human-readable form using ps and awk utilities. ...
Learn how to erase the LUKS header on a specific device. ...
Discover two distinct and easily sriptable methods and combine features from both of these to locate and identify LUKS devices. ...
Learn how to test LUKS passphrase on a specific device. ...
Determine maximum LUKS key file size or maximum interactive passphrase length. ...
Use find a utility to move files based on specific time criteria. ...
Learn how to create and assign binary key instead of passphrase to LUKS key-slot on a specific device. ...
I am surprised that exFAT is not supported out of the box as it is a default filesystem used on SDXC cards. You need to install a FUSE-based implementation to access data on devices using it. ...
Learn how to non-interactively manage LUKS passphrases on a specific device using files or a named pipe. ...
Determine what filesystem is mounted where, what is using particular options and how much free space is available. ...
Learn how to interactively manage LUKS passphrases on a specific device. ...
The simplest possible way to create a Debian package is to use defined package metadata and prepared target directory structure. ...
Verify static filesystem information defined in the fstab file after applying modifications to ensure that system will boot without any problems. It is especially important in remote locations or places where you cannot easily perform emergency operations. ...
Learn how to erase every defined LUKS key slot on a specific device. ...
Learn how to create LUKS header backup and restore it in case of emergency. ...
Create a shell script to convert seconds to human-readable time. I have reused part of an old shell script used to pretty-print system uptime to built it, as this code proved to be useful on several occasions. ...
cal is a nice utility that displays calendar in terminal, but there is a small problem that needs to be fixed as it uses Sunday as the start of the week. ...
Install Prosody, an Open-source and modern XMPP communication server. ...
Sometimes it makes me wonder whether I am inside a chroot environment or not, so let’s check it out. ...
Define backup backend in HAProxy configuration to choose used backend depending on the number of usable servers. ...
Schedule a one-time task at a specific time or below defined system load using at utility. ...
Alter password expiry date to force user to change password on next login. ...
Execute paste utility to merge lines using tab character as a delimiter, expand to convert tabs to spaces, and column to format input into multiple columns. ...
Display processes using the most CPU or memory using nothing more than basic Linux utilities. ...
Encrypt portable external hard drive using Linux Unified Key Setup to protect data in transit. ...
Create simple artificial package to work around missing dependencies, ...
Create straightforward shell script to resolve hostname to IPv4/IPv6 address and reuse parts of it for other projects. ...
Use a shell script to count separate line entries inside a pipe to see how many entries got filtered out. It can be useful in some scenarios, especially for testing. ...
Verify package contents by hand or use simple shell script to automate this process. ...
Recently, I have parsed logs of several applications to generate custom weekly reports. It was a fascinating exercise. ...
I have already described how to list the contents of specified package using apt-file utility, but you do not need it to check the contents of downloaded package. ...
Create simplest possible meta-package to install multiple software packages at once and quickly setup familiar environment. ...
Display reverse dependencies to inspect which packages depend on given application or library. ...
I have already described how to copy answers to the configuration questions for Debian packages, but there is an easier way to read and insert new values into the debconf database. ...
Perform simple incremental backup using rdiff-backup utility. ...
Make iptables configuration persistent using essential system utilities or a designated boot-time loader. ...
There are those rare situations where you do not know the public key required to verify repository signatures but want to add a repository and a public key used to sign it. Hopefully, there is an easy answer to that question. ...
Install and configure localepurge package, which provides a fancy shell script to recover disk space used by useless localizations. ...
Install and configure Dashing with Icinga 2 to use the external board for your Icinga2 instance. ...
Use Content-Disposition HTTP response header to determine filename and use it to store downloaded file. ...
Delete Nextcloud bookmarks using API. Notice, data is paginated in this case, so this particular case is more interesting than regular add/remove operations. ...
Reset admin password on UniFi controller to access wireless configuration. ...
This technique is widespread. To be honest, it is more common than I initially thought, so I will show you how to create a single shell script that will display, create or destroy a temporary file system depending on the name used to execute it. ...
Configuring and using additional repositories requires APT public key management to validate the Release file and downloaded packages. ...
Find a symbolic link by the target name. It sounds simple and it definitely is. ...
Log dropped connections from iptables firewall using netfilter userspace logging daemon for further analysis and troubleshooting. ...
Determine how long it would take to copy data between directories. ...
Verify file integrity using the GnuPG signature without touching your local GnuPG configuration. ...
Compute SHA message digest of a file to verify that its contents have not been altered. ...
Create a shell script for a cron job with hidden debug information shown only when executed inside the terminal. ...
Use find and grep commands to search for directories that contain one or multiple files with specific content. ...
Log dropped connections from iptables firewall using rsyslog for further analysis and troubleshooting. ...
Display dependencies to inspect which packages are required for a given application. ...
Enable HTTPS (Hypertext Transfer Protocol Secure) for package managers using libapt-pkg library. ...
Whitelist or render inoperative any USB device to secure your personal belongings. ...
Create an iptables firewall using custom chains that will be used to control incoming and outgoing traffic. ...
Display upcoming events in the Nextcloud calendar using a custom shell script by extending the earlier ideas. ...
Create iptables firewall that will be used to control incoming and outgoing traffic. ...
Display upcoming events in the Nextcloud calendar using a text-based terminal emulator because it is fun and challenging. ...
Dynamically choose HAProxy backend depending on the HTTP host header, Lua programming language and environment variable. ...
Detect and log changes in the list of mounted filesystems (/proc/self/mountinfo file). ...
Use GNU Bourne-Again SHell builtin or standalone time command to determine process execution time. ...
Use cron service to execute additional commands as the specified user using cron during system startup. ...
Recently, I have moved my personal source code to GitLab. It rendered self-hosted git repository at repository.sleeplessbeastie.eu obsolete, so I have created simple redirection on HAProxy load balanced to cover this specific case. ...
I am using the lightline status line with the Solarized color scheme inside Vim text editor. ...
Store LeaseWeb data traffic in OpenTSDB time series database using Python script, LeaseWeb API v2 and Python client to OpenTSDB. ...
Serve files from memory with a fallback using the Nginx HTTP server. ...
Create the simplest possible iptables firewall with quite relaxed rules that will allow all outgoing traffic, incoming ICMP packets, and ssh connections on the eth0 interface. ...
I am currently playing with floccus to store bookmarks using Nextcloud, so I have created simple shell scripts to import Nextcloud bookmarks from Firefox using code from my earlier solution to open Firefox bookmarks from the OpenBox menu. ...
Define and use a variable to dynamically choose HAProxy backend depending on the URL parameter, HTTP header field, and cookie value. ...
LeaseWeb released a new version of API that will deprecate the old one, so it is the perfect time to update the Python script using v1 api and switch to API v2 before May 31. ...
Use kernel automonter to automatically mount directory shared over network using NFS. ...
Use Unsplash Source a simple API for embedding free high-resolution photos from Unsplash to get background for DokuWiki instance. Source code is hosted at GitLab/unsplashdoku and documentation is available on the main DokuWiki/plugin:unsplashdoku website. ...
There is a bookmark manager for Nextcloud that can be used with the floccus browser extension to synchronize bookmarks using Chrome, Firefox, and Opera. I will show you how to perform API calls to automate the backup process. ...
Setup a simple Docker registry to use it privately or share images which a team of developers. ...
Create a base Docker image using debootstrap utility. ...
Securely change user password using shell script to automate this task on these rare occasions. ...
I have described the differences between the old and new free output format, so now I want to mention how to execute the former free version on Debian Stretch using LD_LIBRARY_PATH environment variable to temporarily substitute a different library for this particular execution. ...
Use the extensive API offered by the Restyaboard to backup and restore created boards. ...
Install docker on Debian Stretch to take advantage of the lightweight virtualization. ...
The truth is that I always return to the DokuWiki to organize personal data, so I have created small calendar as a plugin to perform daily notes. Source code is hosted at GitLab/monthcal and documentation is available on the main DokuWiki/plugin:monthcal website. ...
Block particular IP addresses on HAProxy load balancer using simple Access Control List. ...
Upgrade icinga2 and its web-interface using official/dedicated repository and PostgreSQL database. ...
This is just another interesting problem to solve. I have encountered this subtle difference in PHP packages when I moved personal Dokuwiki instance from Debian Jessie to Debian Stretch. ...
Install Restyaboard, an Open Source Kanban board. I am using it daily to manage this blog. ...
Use essential openssl utility to quickly determine if your web-server still supports deprecated TLS 1.0 protocol. ...
Define basic authentication on HAProxy load balancer limit access to specific backends. ...
Use dpkg to pretty print package dependencies. ...
Define allowed HTTP methods on HAProxy load balancer using simple Access Control Lists. ...
Use encrypted passwords to automatically setup users using configuration management tools like Puppet or Ansible. ...
Create custom data field to define multiple domain names and service apply rule to verify those SSL certificates. ...
Install UniFi controller to configure wireless network using Ubiquiti devices. ...
Icinga2 documentation clearly describes the master->satellite->client setup, but as of now everything can be configured using director module and top down approach, so you can easily monitor external remote networks that are not accessible from the master server. ...
The free utility is used to display the amount of free and used memory in the system. Debian Stretch provides an upgraded package. Output format has changed, and available memory is calculated using a different method, so let’s see what we can do with these modifications at this moment. ...
Add your first host using icinga2 director after performing clean installation as I have described earlier this month – icinga2 plus icingaweb2 and director module installation procedure. ...
Icinga is a great monitoring solution, especially when you use director module to perform configuration in top down environment. It makes application more accessible to more people as you can use web-interface and role based permissions to allow developers and testers to write and use their own checks and notifications. ...
Install Icinga 2 monitoring instance with web-interface. ...
MariaDB unixODBC driver is not available in the Debian package repository at this moment, but you can build and configure it on your own. It requires some additional work, but in the end it is really worth the time. ...
Query APT configuration to inspect specific options or create universal Debian utilities. ...
It is very useful to know how to distinguish between different GnuPG public key files. ...
There are many different ways to verify IPv4 address inside a shell script, but many of these are complicated or incomplete. I will describe a simple and verbose way to check IPv4 address using ipcalc utility. ...
Debian supports DES, MD5, SHA256 and SHA512 algorithms for password encryption. These algorithms can be easily spotted and distinguished by their structure. ...
Display IPv4 network information for given address and netmask. Split networks, calculate subnetnetworks and supernetworks and convert address range. ...
LeaseWeb provides an API that can be used to request information about servers and perform some maintenance tasks like update reverse DNS entries, null route IP addresses, reboot specific server or launch rescue/reinstallation process. I will show you how to request and display identifiable information about servers in each location including data traffic details. ...
I am using a simple shell script to manage OpenSSL known_hosts file as it requires many small updates due to constantly changing host keys on a dynamic virtual server. ...
Backports repository provides packages for stable system that are recompiled from testing or unstable distribution. It is important to know that these packages are provided as is without any security support guarantee. ...
Debian Stretch provides gnupg in minimal installation as the package priority is set to important. The command is fully operational, but it requires dirmngr to perform network operations for managing and downloading certificates. ...
Remove package dependencies that are now no longer needed and configure system to perform this task automatically. ...
Keeping an eye on a constantly changing APT cache can be quite tedious, so automate this task and free up your time to focus on other projects. ...
This is just a brief note on how to reverse a text file. It is not really useful for anything other than fun, but it is stuck in my head, so I need to write it down. ...
Clear the APT cache to reclaim disk space used by the downloaded packages. ...
Disable APT cache to conserve disk space on a small Debian based embedded system or a custom-built live USB system that can be easily booted. ...
You can check my earlier blog post on how to mount WebDAV share using command-line or fstab (file systems table), but you are not limited to these two options as you can use systemd to take care of the whole process and automount WebDAV resource on demand. ...
I am an enthusiast of the uWSGI project. You are still not limited to it as you can use fcgiwrap, a very lightweight and straightforward FastCGI wrapper for CGI scripts that do not require additional configuration. ...
Keep track of network latency using SmokePing, uWSGI application server, and Nginx HTTP server. SmokePing supports many configurable probes, alerting, and live charts accessible through a web browser. It was created by Tobi Oetiker, which is known for RRDtool an Open Source data logging and graphing system for time series data. ...
Nextcloud is a handy self hosted web-based application that can be used to store files, contacts and calendars. It provides the desktop and mobile client. In addition, it supports Web Distributed Authoring and Versioning protocol, so lets mount a WebDAV share. ...
Install and configure a private instance of the MoinMoin wiki engine, a full-featured and extensible wiki software written in Python that can store personal notes, knowledge base, or simply share interests. ...
You can connect custom-built shell script with any database using unixODBC an implementation of the Open Database Connectivity standard and I will show you how to do this for SQLite and PostgreSQL databases. ...
It is a matter of personal preference whether you use current or former network device naming convention. I am more accustomed to the latter and will configure the operating system to retain the old behavior. ...
ifconfig is not installed by default in Debian Stretch. However, it is available in package repository, so applications that depends on it can still be used. ...