Linux Programmer | RHCE | RHCSA

Search This Blog

Thursday, 9 March 2023

Nagios NRPE client install on ubuntu 22.04

 Install NRPE agent from default ubuntu Repos.
 
apt install nagios-nrpe-server
 
Configuration changes:
 
nano /etc/nagios/nrpe.cfg
 
 
command[check_disk]=/usr/lib/nagios/plugins/check_disk  -w 60 -c 50 -u GB -p /
 
allowed_hosts=127.0.0.1,$nagios_server_ip
 
 
Restart service:
/etc/init.d/xinetd restart
/etc/init.d/nagios-nrpe-server restart
 
 
Nagios server configurations:
 
nano /nagios/server/directory/server.cfg
 
define host{
use                             linux-server
host_name                       hostname
alias                           hostname
address                         IP
max_check_attempts              2
check_period                    24x7
notification_interval           30
notification_period             24x7
}
define service{
        use                     generic-service
        host_name               hostname
        service_description     Disk Usage
        check_command           check_nrpe!check_disk!-a '-w 60 -c 50 -u GB -p /'
}

 
 
 
 

Wednesday, 25 January 2023

Convert MBR to GPT in AWS

 First check partition type of existing disk.

 parted -l




 

To convert MBR to GPT, create one partition with gpt and that will convert entire disk from msdos to gpt.

gdisk /dev/nvme0n1

■ n (i.e. new partition)
■ Enter (i.e Partition number : 2-128, default 2)
■ Enter (i.e. First sector : default = 34)
■ Enter (i.e. Last sector : default = 2047)
■ ef02 (i.e. Type of partition: BIOS boot partition)
■ w (i.e. Write the new partition table)
■ Y (i.e. Complete process)


Reload the partition table 


partprobe /dev/nvme0n1  

Re-install the GRUB boot loader using the new partition scheme 


grub-install /dev/nvme0n1
 

Increasing EBS volume 


growpart /dev/nvme0n1 1
resize2fs /dev/nvme0n1p1

Now Re-check the partition table created properly or not.

parted -l



CISCO AnyConnect VPN Client in Ubuntu

OpenConnect is a client for Cisco’s AnyConnect VPN. It is free software, and is released under the GNU LGPL v2.1 . Getting connected to an AnyConnect VPN is easy with OpenConnect and the TUN/TAP kernel module that is built into the Linux kernel.
 
1. First run command below to active th TUN module:
 
sudo /sbin/modprobe tun
 
2. Install OpenConnect:
 
sudo apt-get install openconnect
 
3. Connect to VPN, run:
 
sudo openconnect yourvpn.example.com
 
It prompts you to type in username and password. Once these are authenticated, the VPN connection is established.

M3 Button not working in Wayland

Mouse M3 button not working in wayland - ubuntu 26.04 1. Check your desktop Run: echo $XDG_SESSION_TYPE echo $XDG_CURRENT_DESKTOP 2. If...