Download Source File This PHP API script reads Nagios status.dat file and return the JSON result. This API is desinged for Nagios Client unofficial Nagios status monitoring app. Step 1 Upload nath_status.php to your Nagios web root folder. ###Nagios Core’s 3.5.1 default Web Root folder Web Root Folder – Centos /usr/share/nagios/html/ ###Nagios Core’s default Web Root folder Web […]
Shell scripting
How to Install Nagios 4.3.4 on RHEL / CentOS
Nagios is an awesome Open Source monitoring tool, its provides you more comprehensive monitoring environment to always keep an eye on your all machines / networks whether you are in a your data center or just your small labs. With Nagios, you can monitor your remote hosts and their services remotely on a single window. […]
Color text output on bash scripts
Users who have been using Linux for awhile often learn that creating a basic script is a good way to run multiple, often-repeated commands. Adding a little color to scripts can additionally provide nice feedback. This can be done in a fairly straight-forward way by using the tput command. A common way of doing this […]
AWK and Regular Expressions to Filter Text or String in Files
AWK is an interpreted programming language. It is very powerful and specially designed for text processing. AWK – Basic Examples This chapter describes several useful AWK commands and their appropriate examples. Consider a text file marks.txt to be processed with the following content − 1) Amit Physics 80 2) Rahul Maths 90 3) Shyam Biology […]
Send E-Mail On Redhat / CentOS with SMTP (SMTP Relay)
In this tutorial we will send email with mailx and using external SMTP server for email sending from CentOS/Redhat Install mailx yum -y update yum install -y mailx We can now start sending e-mails using create a symbolic link ln -s /bin/mailx /bin/email Set an External SMTP Server to Relay E-Mails vi /etc/mail.rc edit set […]
Delete Files Older Than X Days
Command Syntax find /path/to/files* -mtime +5 -exec rm {} \; Note that there are spaces between rm, {}, and \; This is a very simple tutorial how to find and delete files older than X days. I needed this for a project where i collected some images and after a while they took too much […]