nagios Red hat linux

Send SNMP Traps from Nagios to Remote Management Host

1. Add ‘send snmp trap’ command to nagios vim /usr/local/nagios/etc/objects/commands.cfg define command{ command_name send_snmptrap command_line /usr/bin/snmptrap -v 2c -c public 10.50.24.34 ” NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s “$HOSTNAME$” nSvcDesc s “$SERVICEDESC$” nSvcStateID i $SERVICESTATEID$ nSvcOutput s “$SERVICEOUTPUT$” } 2. Add this event and enable the event to services which needed to send traps vim /usr/local/nagios/etc/objects/localhost.cfg define service{ […]

Red hat linux

How To Install and Configure SNMP on RHEL 7 or CentOS 7

SNMP stands for “Simple Network Management Protocol”, it can be utilized to monitor any devices that support snmp, few of the devices are server, router, network printers, firewalls. SNMP can monitor a variety of parameters for these devices such as server performance, network usage, disk utilization. Check Package Check if the package is already installed, […]

Uncategorized

Useful MySQL Commands

Database with size SELECT table_schema “DB Name”, Round(Sum(data_length + index_length) / 1024 / 1024, 1) “DB Size in MB” FROM information_schema.tables GROUP BY table_schema; Create a database. mysql> create database [databasename]; List all databases on the server. mysql> show databases; Switch to a database. mysql> use [db name]; To see all the tables in the […]

MySQL Red hat linux

Password Validation Plugin in MySQL

The validate_password plugin serves to test passwords and improve security. The plugin exposes a set of system variables that enable you to define password policy. First check the plugin directory of MySQL. mysql> show variables like “plugin%”; +—————+————————–+ | Variable_name | Value | +—————+————————–+ | plugin_dir | /usr/lib64/mysql/plugin/ | +—————+————————–+ 1 row in set (0.00 […]

Red hat linux

Set Up and Use Yum Repositories on Redhat / CentOS

We can install new software on Red Hat/CentOS Linux with “yum install packagename” command from console. Running this command first checks for existing YUM Repository configuration files in /etc/yum.repos.d/ directory. It reads each YUM Repository configuration file to get the information required to download and install new software, resolves software dependencies and installs the required […]