By default check_mk places icons under a ‘hamburger’ icon as shown below. I wanted the ‘Custom Notes’ icon to be visible at all times rather than being located under the actions icon. To do that visit the ‘Global Settings’ menu item and under the ‘User Interface’ section find the option for ‘Builtin icon visibility’: Then… Read more »
Posts By: jonny
Increase xfs root partition on AWS instance without LVM
On an EC2 instance with an EBS volume of 200GB I right-clicked the volume and chose to ‘Modify Volume’, then set a new size for the disk. On the OS (RHEL 7.6) you can check that the new size of the disk is visible with: fdisk -l lsblk Then increase the partition with: growpart /dev/nvme0n1… Read more »
Reboot Linux Server
On a server where normal reboot commands such as ‘shutdown -r now’ are not working and if you don’t have access to an iDrac or similar the following worked: echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger
iptables: direct traffic from one port to an alternate port
Requirement was to run a process on a server on a new port but the original port was hard-coded into the client so we needed to redirect all traffic bound for the original port to the new port. First check the IP Forwarding is enabled. sysctl net.ipv4.ip_forward if IP forwarding is not enabled then: echo… Read more »
Accessing iDRAC 6 with IE Compatibility Mode
Had difficulty accessing an old iDRAC 6 interface with a more recent release of a web browser. Some of the drac interface shows but you get 404 error messages. The solution was accessing it via the compatability mode on IE: Then add the address of the iDRAC interface:
Bash to Python – Playing with CSV
In the past I have been too willing to use bash scripts for grepping and awking CSV files. The code snippet below is a starter for doing similar with python and while far from perfect, demonstrates calling another system command and manipulating strings:
Laravel Passport Oauth
With a basic CRUD Laravel app containing API routes I wanted to protect the API behind Oauth. So I followed the instructions on the Laravel documentation and a great video by Andre Madarang on Youtube. After following the steps of requiring passport in composer, migrating and adding the routes I was testing the oauth endpoints… Read more »
Rename Files with Python
Simple wee python script for renaming files in a directory. I had a bunch of mp4 files that had a reference code at the end rather than the front so renaming to put the reference code at the front would keep them in order e.g. myfile-m6-03.mp4 to become 6-03-myfile-m6-03.mp4 #!/usr/bin/env python from os import rename… Read more »
Offline PluralSight Videos
I wanted to watch a PluralSight course while on a flight without internet access. This might well be against the PluralSight terms and conditions so I don’t recommend doing this. I used a recent version of youtube-dl and used a recent version of python via conda: conda create -n python37 python=3.7 anaconda conda env listconda… Read more »
Installing Vault with Zookeeper
Hashicorp Vault supports several backends for secret storage. I was creating a test Vault to play with PKI certificate generation and started with installing Zookeeper After download the Vault binary and extracting it to /usr/local/sbin/vault, I created a config file at /etc/vault/config.hcl vi /etc/vault/config.hcl storage “zookeeper” { address = “127.0.0.1:2181” path = “vault/” }listener “tcp”… Read more »

