NRPE - Nagios Remote Plugin Executor

How to setup NRPE for client side monitoring

Nrpe, or Nagios Remote Plugin Executor, is the client side service of a monitoring setup. The monitoring server will send commands to the client, which listens passively when got no work to do. Upon incoming command, the nrpe checks it’s local configuration, and executes the plugin configured with the command, then sends back the results to the server for processing. You can read more about the server side installation in the Nagios installation guide, while this guide will focus on the client side.

In this tutorial you will learn:

  • How to install NRPE on Debian/Red Hat based distributions
  • How to configure NRPE to accept commands from the server
  • How to configure a custom check on the server and client side

Read more

Linux Home Directory With Symlinks

How to Save Space with Symlinks and Mount Points

When you’re stuck with limited storage space, there’s always the option of purchasing more storage, but what if you can’t. Devices like Chromebooks and some laptops are fairly limited. Thankfully, Linux has a few tricks to help to make your Linux system administration job easier. Because Unix-like systems treat everything as a file, you can easily use symbolic links and mounted partitions to maximize space.

In this tutorial you will learn:

  • How to Use Symbolic Links at /home
  • How to Use Symlinks Elsewhere
  • How to Extend Your Storage with Mount Points
  • How to Make Effective Use of Networked Drives

Read more

JSch example execution

Executing commands on a remote machine from Java with JSch

SSH is an every-day tool of any Linux System Administration job. It is an easy and secure way to access remote machines on the network, transfer data and execute remote commands. Apart from interactive mode, there are many tools exist that enable automation of remote tasks that also rely on the existing ssh server/client architecture. For one such tool, you can read about ansible on Ubuntu for example. You can also find many implementations of the ssh client, but what about accessing the abilities ssh provides from code?

JSch is a project that implements the ssh protocol in Java. With it’s help, you can build applications that are capable to connect to and interact with a remote or local SSH Server. This way your application is capable of managing any aspect of the target machine that you could complete with your native ssh client, which gives yet another powerful addition to the already vast Java toolset.

In this article we will import JSch into our Java project, and develop the minimal necessary code pieces to create an application that can log in to a remote machine’s ssh server, execute some commands in the remote interactive shell, closes the session, then presents the output. This application will be minimal, however, it may give a hint of the power it provides.

In this tutorial you will learn:

  • How to import JSch into your Java project
  • How to setup the test environment
  • How to implement the UserInfo interface in a custom class
  • How to write an application that initiates interactive ssh session

Read more

Check Linux Mint version from command line

Check Linux Mint Version

There are number of ways on how to check Linux Mint version. Since Linux Mint comes with number of available Desktops the graphical user interface may differ from user to user hence the procedure is also different. From this reason the easiest and perhaps even recommend solution is to simply open up a command line terminal and execute the following command cat /etc/issue.

To check a version of other Linux distributions visit our how to check Linux version guide.

In this tutorial you will learn:

  • How to check Linux Mint version from graphical user interface
  • How to check Linux Mint version from the command line

Read more

How to check Linux version

How to check Linux Version

The common scenario is that you have been given an access to a Linux system physically or via remote login and you have no idea what Linux version is installed on this particular system. Given that many of the today’s Linux Distributions have implemented systemd as part of their core design, to check for a Linux version is in many cases relatively simple procedure.

The simplest way to check Linux version is by using the hostnamectl command without any arguments. For example the below hostnamectl command will return the Linux distribution name, version and codename in use along with the currently loaded Linux kernel version:

$ hostnamectl 
   Static hostname: x220
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 2d4efda5efb0430faeb2087d0a335c6b
           Boot ID: f8c4a3a776a74d42878347efc2c00634
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.9.0-9-amd64
      Architecture: x86-64
DID YOU KNOW?

It is a common mistake to refer to the entire GNU/Linux operating system simply as Linux. The important note here is that the so called Linux is actually only the Kernel part of the system whereas GNU is the actual system as in collection of pre-compiled binaries, libraries and system tools. Both GNU and Linux kernel must function in tandem in order for the operating system to actually work.

Hence, one cannot exists without the other, so next time when you talk about your operating system and you wish to be technically correct, refer to it as GNU/Linux or simply as Lignux.

In this tutorial you will learn:

  • Basic introduction to Linux package
  • How to check system architecture and Linux kernel version
  • How to check CPU architecture
  • How to check CentOS, Redhat, Debian, Ubuntu, Mint, Arch, Fedora Linux system version

Read more

Linux FileSystem Hierarchy Standard

Linux Filesystem Navigation Basics

This article explains basic commands for navigation within Linux file system. The diagram below represents (part of) a Linux file system know as Filesystem Hierarchy Standard. A line from one node to a node on its right indicates containment. For example, the student directory is contained within the home directory.

In this tutorial you will learn:

  • How to use pwd command
  • How to use cd command
  • How to navigate to user home directory
  • Difference between relative vs absolute
  • What is a parent directory

Read more

Glances displays relevant information regarding each node of your Linux cluster

Building a Raspberry PI Cluster – Part IV: Monitoring

Having a cluster built out of Raspberry Pi’s is not only fun but also eases your work. As we discussed in our latest article in the series you can use the cluster to compile software or make it gather data from various sources on the Internet. There are many uses for such a thing.

However, after compiling for an hour straight you might get curious as of how your nodes perform. How they work under load, if they’re not under-powered or if the CPU temperature is not rising above desired levels. How much memory have you got left in each of the nodes while they’re doing tasks. The more nodes you have in your rack, the more information you will have to go through. Luckily there is software out there that can help you visualise such information all at once in various ways.

In this tutorial you will learn:

  • How to install the glances monitoring tool
  • How to configure glances
  • How to use glances to see cluster information
  • How to create a local webpage to display the glances output

Read more

Build a cluster out of cheap Raspberry Pi's and run Linux on it

Building a Raspberry PI Cluster – Part I: Hardware Acquisition and Assembly

Nowadays Linux runs on almost anything. You can get a cheap PC and turn it into a media station or web server or whatever else you wish at no additional cost. Hardware is cheap also. With the advent of the Raspberry Pi and similar small computer boards one can get a fully-functional PC for the price you’d usually pay for a sixpack of beer. In this LinuxConfig series we’ll not only build a Linux computer; we’ll build an entire Linux cluster with four nodes and learn how to manage it so that all the nodes respond at the same time to the same commands.

Hardware Requirements:

Read more

Here is a four node Raspberry Pi cluster accessed through ClusterSSH

Building a Raspberry PI Cluster – Part III: Simultaneous Node Management

Here is out third article in the Building a Raspberry Pi Cluster series. We will talk about what software we can use to make all the cluster nodes respond to your commands all at once, so that you can install whatever you wish and do it only once for ll of the cluster nodes instead of configuring them one by one as separate entities. Such software greatly eases your work and reduces the time needed to perform operations. It does not matter if you have four, eight or fifty nodes to work with you can make them all do the same thing at the same time.

In this tutorial you will learn:

  • How to install and configure ClusterSSH
  • How to install fabric and use the fab command
  • How to give commands to your cluster

Read more

Unix Vs Linux

Linux Vs. Unix: What’s the Difference?

Linux and Unix are often compared to each other. If the similarity in their names wasn’t enough, Linux is technically a descendant of Unix, and they share a number of similarities in tool kits and overall structure. They aren’t exactly the same, though, and the approaches and philosophies behind them are radically different.

In this tutorial you will learn:

  • The History of Unix
  • The History of Linux
  • How Unix and Linux were Developed
  • Linux vs Unix Philosophy
  • Difference between Software And Utilities

Read more

Retrieving Google Chrome browser version

How to check Google Chrome browser version

In this article we will discuss few possible ways on how to check your Google Chrome browser version. Expect from the last check Google Chrome browser solution, where the actual Linux command line terminal is used to determine the chrome version, the guide should provided you with operating system agnostic solution. That being said, at least one of the below steps should help you out regardless of your operating system or device ( mobile, table, PC ).

In this tutorial you will learn:

  • How to check Chrome browser version using help page
  • How to check Chrome browser version using external landing page
  • How to check Chrome browser version using chrome version page
  • How to check Chrome browser version from the command line

Read more