Category: Monitoring

Linux, Monitoring

Some Zabbix tools

Introduction: In order to debug some Zabbix problems here are some tools I gathered to help. Requirements: Installation of the package zabbix-get in the monitoring server apt-get install zabbix-get Installation of the package zabbix-agent in the monitored hosts. apt-get install zabbix-agent TIP: In order to programmatically (using bash for example) create scripts that monitor anything …

Linux, Monitoring

Installing Filebeat, Logstash, ElasticSearch and Kibana in Ubuntu 14.04

PREPARATIONS #Ref: https://www.elastic.co/guide/en/logstash/current/installing-logstash.html First install Java 8 in Ubuntu 14.04 # Ref: https://www.liquidweb.com/kb/how-to-install-oracle-java-8-on-ubuntu-14-04-lts/ apt-get install python-software-properties software-properties-common apt-add-repository ppa:webupd8team/java apt-get update apt-get install oracle-java8-installer java -version Result: java version “1.8.0_144” Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) Facilitate updating of all packages via APT repositories apt-get install …

Linux, Monitoring

Monitoring Linux server with iPhone/iPad

Introduction: Although Apple doesn’t have too many apps that support Linux admins, here is one that just came back on the market with a rebound on 26 Oct. 2016 with a new look, features and bug fixes: The iStat3 Server for Linux and iStat3 for iOS made by Bjango PTY Ltd. This app will display …

Linux, Monitoring, Security

Installing Webmin in Debian 8(Jessie)

These instructions are a ‘Plagiat’ of the site: http://www.christophe-casalegno.com/2015/07/14/how-to-install-webmin-on-debian-8/ To install webmin on Debian 8 just follow this instructions : cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc echo “deb http://download.webmin.com/download/repository sarge contrib” >> /etc/apt/sources.list echo “deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib” >> /etc/apt/sources.list apt-get update apt-get -y install webmin If it’s too long for you, you can …

Bash, Linux, Monitoring

Verifying the validity of an NFS mount

Introduction: Every now and then if an NFS mount is no more connected to the server or something goes wrong with the NFS connection, running the command ‘ls mountpoint’ hangs the terminal till I press CTRL-C. So I tried to figure out a script that will be run as cron job and will tell me …

GlusterFS, Linux, Monitoring, Security

Reporting SMART status of RAID disks

Reference site: http://www.cyberciti.biz/faq/linux-checking-sas-sata-disks-behind-adaptec-raid-controllers/ Note: Although Hardware RAID controllers made by other hardware manufacturers here I use Adaptec as an example: Install the software: apt- get install smartmontools Curious which company the RAID controller is from? Find out which RAID controller you have: lspci | grep ‘RAID’ Result: 01:00.0 RAID bus controller: Adaptec Device 028b (rev …

Bash, Linux, Monitoring, Security

Preventing a bash script from running concurrently

Introduction: In order to prevent a bash script instance from running more than once concurrently, here is a small tip on how to write the script. Script template: #!/bin/bash # Prevents that an instance of the script starts while another instance of it is still running scriptname=$(basename $0) lockfile=”/tmp/${scriptname}.lock” if [ -e $lockfile ]; then …

Linux, Monitoring

Install TeamViewer in Debian Wheezy

Teamviewer is a very good and stable remote desktop with many clients software form almost any platform. Here I explain how I got TeamViewer to run on a headless Debian Wheezy server. Reference: https://www.teamviewer.com/en/help/363-Wie-installiere-ich-TeamViewer-auf-meiner-Linux-Distribution.aspx#multiarch Steps: – Install the VNC desktop on the Debian Server for a particular user as per the instructions shown here: https://tipstricks.itmatrix.eu/installing-linux-remote-terminal-using-vnc-on-a-debian-server/ …

Apache, Linux, Monitoring, NGinX

Using CURL for sending crafted HTTP POST authenticated queries

CHALLENGE: I came across a situation where I needed to send an HTTP request using the POST method with some POST data but after I have authenticated with name and password. SOLUTION:(using curl tool) The trick here is to preserve the SESSIONID of the authenticated response for the second POST request. EXAMPLE: I needed to …

Apache, Bash, Linux, Monitoring, NGinX

Monitoring latency time of http requests

Here is a simple but useful command which shows the latency time of http requests. You can adjust the delay between repeats as well as the URL being queried. Reference: http://www.shellhacks.com/en/Check-a-Website-Response-Time-from-the-Linux-Command-Line host=”www.google.de”; delay=5; while true ; do echo -n “Response time for http://$host:” ;curl -s -w %{time_total}\\n -o /dev/null http://$host ;sleep $delay; done Results: Response …

Linux, Monitoring

Installing Shinken in Debian Wheezy

Debian Wheezy does offer the installation of the full (a bit old)shinken, BUT it doesn’t offer the Installation of the WebUI. Here is a better way to install everything including pnp4nagios and check_mk in one go: STEPS: Install Shinken wget http://www.shinken-monitoring.org/install -O /tmp/install_shinken.sh cd /tmp && sh install_shinken.sh Configure shinken vim /usr/local/shinken/etc/shinken-specific.cfg Change the http://YOURSERVERNAME/ …

Linux, Monitoring

Installing Icinga2, pnp4nagios, NRPE Agent and Graphite in Debian Wheezy

Since Icinga2 is not part of the stable version of Debian Wheezy we need to install it from the wheezy-backports. Therefore the following steps are suggested: Add the backports to the Debian repositories list: mcedit /etc/apt/sources.list Add the following lines: deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free Update the repo …

Linux, Linux on MACBook, Monitoring

Testing internet speed on Linux command line

This small script does a fairly good Upload/download speed test of your Internet connection: Note: This is a Python script. So you’ll need first to make sure you have Python installed in your system. Get the script: wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py Make it runnable chmod +x speedtest-cli Run it ./speedtest-cli Have fun

Linux, Monitoring

Installing ISTATD on Debian Squeeze/Wheezy

This HOW-TO is almost completely based on the README.txt file included in ISTATD package I included some adaptation notes. istatd is a daemon serving statistics to your iStat iPhone application from Linux, Solaris & FreeBSD. istatd collects data such as CPU, memory, network and disk usage and keeps the history. Once connecting from the iPhone …

Linux, Monitoring

Installing CACTI and Templates on Debian Lenny/Squeeze

In the area of monitoring systems using GPL software Nagios is a big player but the organization of displaying the history graphs is not so ideal. Zabbix is wonderful as well, it produces also good graphs but it creates them dynamically, resulting in a long wait time when we need to display a large amount …

Linux, Monitoring

Installing Zabbix 2.2.6 on Debian Squeeze

Debian Squeeze has still the Zabbix 1.8.2, if you want the install the 2.2.6, then one solution is to follow these instructions, the other is to do the hard work all the way(not shown here :-): The easy way: Zabbix has now Binary packages ready for Debian Wheezy to install: Reference: https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages Steps for version …