Creating a Java Keystore from existing SSL certificate

Follow these instructions if you have an existing SSL certificate from a registered CA (I am using Godaddy in this example) and wish to store these in a Keystore file to be used for Javascript applications. In this instance this was required by Logstash (Part of the ELK Stack). This guide assumes you have already Read more about Creating a Java Keystore from existing SSL certificate[…]

Setting up Logwatch monitoring from Check_MK

The first stage is to copy the plugin script and built in config file onto your managed host. The easiest way to do this (Assuming a standard installation of Check_MK) is via the below scp commands: scp /usr/share/check_mk/agents/plugins/mk_logwatch [email protected][your-server]:/usr/lib/check_mk_agent/plugins scp/usr/share/check_mk/agents/logwatch.cfg [email protected][your-server]:/etc/check_mk/ Once you have transferred the files, log onto your server and edit /etc/check_mk/logwatch.cfg to Read more about Setting up Logwatch monitoring from Check_MK[…]

Monitoring Specific Windows Services in Check_MK

The easiest way I have found to monitor Specific Windows Services across your Windows Hosts is as below. Add a section in your main.mk file as below, each line listing the actual Windows Service that you are after (Eg DHCP Server: DHCPServer, pulled from Windows services.msc) nano /etc/check_mk/main.mk inventory_services = [ ‘WsusService’, ‘WINS’, ‘VMTools’, ‘Spooler’, Read more about Monitoring Specific Windows Services in Check_MK[…]

Sudo user to not require password when running root commands

This is useful when you have a sudo user that regularly requires to run commands as root and you do not wish to have to enter your user password each time. Run the command visudo and add the below to the bottom of the file visudo [User-name] ALL=NOPASSWD: ALL Log off and back onto your Read more about Sudo user to not require password when running root commands[…]

Setting up a single-host redis cluster

#!/bin/bash # Install pre-requisits apt-get -y install ruby redis-tools build-essential gem install redis # Install redis-cluster to /etc/redis-cluster wget http://download.redis.io/releases/redis-3.2.6.tar.gz tar zxfv redis-3.2.6.tar.gz mv redis-3.2.6 /etc/redis-cluster make -C /etc/redis-cluster # Create cluster script and run echo “#!/bin/bash pushd /etc/redis-cluster/utils/create-cluster && ./create-cluster clean && popd pushd /etc/redis-cluster/utils/create-cluster && ./create-cluster start && popd pushd /etc/redis-cluster/utils/create-cluster && ./create-cluster Read more about Setting up a single-host redis cluster[…]

Basic Git commands

Cloning a Repository To clone a repository into a subfolder of your current directory (Eg if you are in /git the repository will be cloned to /git/[repository name]) run the below: git clone [email protected]:project/repository.git Cloning a Repository to a specific directory To clone a repository into a specific directory (Eg /git/example in the below) run Read more about Basic Git commands[…]

Unable to lock dpkg (Ubuntu 16.04)

Occasionally on Ubuntu 16.04 you will get the error as below: E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it? The fix Simply run the below commands to resolve the issues with apt sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock Read more about Unable to lock dpkg (Ubuntu 16.04)[…]

Creating AWS EFS Volume and Mounting on AWS Servers

Firstly you will need to create your EFS volume. This can be done from the AWS console, ensure the EFS volume is created within the correct VPC for your servers to access it and note the destination IP addresses provided on the completion page. Now, you will need to install the NFS package on the Read more about Creating AWS EFS Volume and Mounting on AWS Servers[…]

Using Node Version Manager (NVM)

Installing NVM Download link: https://github.com/coreybutler/nvm-windows/releases (nvm-setup.zip) Download and extract nvm-setup.zip Run the installer Installing particular versions of node Open up a CMD window on your machine and run a command as below (Adjusting depending on what version you require) nvm install 0.10.28 Using a particular Node version one-off To use a particular Node version just for the Read more about Using Node Version Manager (NVM)[…]

Installing Gnatsd Ubuntu 14.04

Installing Gnatsd wget -nv https://github.com/nats-io/gnatsd/releases/download/v0.7.2/gnatsd-v0.7.2-linux-amd64.tar.gz tar -C /usr/local/bin -xzf gnatsd-v0.7.2-linux-amd64.tar.gz gnatsd Basic config /etc/gnatsd.conf NATS server port: 4222 #monitoring http_port: 8222 cluster { host: ‘0.0.0.0’ port: 7244 } debug: false trace: false log_file: “/var/log/gnatsd.log” max_connections: 100 max_pending_size: 100000000 max_payload: 52428800 Creating Service /etc/init/gnatsd.conf # NATS description “NATS server” start on runlevel [2345] stop on runlevel Read more about Installing Gnatsd Ubuntu 14.04[…]