Please Wait, Loading...

Monday, 12 October 2015

Instalasi Agent Zabbix di CentOS

Berikut langkah-langkah dalam Instalasi Agen Zabbix diCentOS, Semoga bermanfaat

1. Menambahakan repository
CentOS/RHEL 7:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/7/x86_64/zabbix-release-2.2-1.el7.noarch.rpm

CentOS/RHEL 6:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

CentOS/RHEL 5:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/5/x86_64/zabbix-release-2.2-1.el5.noarch.rpm
2. Upgrade Yum

server@vmhos:~$ yum upgrade

3. Instalasi agent zabbix

server@vmhos:~$ yum install zabbix zabbix-agent

4. Konfigurasi zabbix_agentd

server@vmhos:~$ sudo vi /etc/zabbix/zabbix-agentd.conf
 ### Option: EnableRemoteCommands
#       Whether remote commands from Zabbix server are allowed.
#       0 - not allowed
#       1 - allowed
#
# Mandatory: no
# Default:
EnableRemoteCommands=1


### Option: Server
#       List of comma delimited IP addresses (or hostnames) of Zabbix servers.
#       Incoming connections will be accepted only from the hosts listed here.
#       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally.
#
# Mandatory: no
# Default:
# Server=

Server=zabbix.myserver.co.id

### Option: Hostname
#       Unique, case sensitive hostname.
#       Required for active checks and must match hostname as configured on the server.
#       Value is acquired from HostnameItem if undefined.
#
# Mandatory: no
# Default:
# Hostname=

#Hostname=Zabbix server

5. Cek status service zabbix

server@vmhos:~$ /etc/init.d/zabbix-agent status

6. Bila status service masih Off, lakukan Starting Service

server@vmhos:~$ /etc/init.d/zabbix-agent start

7. Konfig service zabbix-agent agar selalu on ketika server dalam keadaan power on atau reboot

server@vmhos:~$ chkconfig --level 235 zabbix-agent on 

Posted By adminblog11:25

Monday, 5 October 2015

Volume /boot Is Full


server@vmhost:~$ df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/root   63G   59G  1.2G  99% /
none                        4.0K     0  4.0K   0% /sys/fs/cgroup
udev                        5.9G  4.0K  5.9G   1% /dev
tmpfs                       1.2G  592K  1.2G   1% /run
none                        5.0M     0  5.0M   0% /run/lock
none                        5.9G     0  5.9G   0% /run/shm
none                        100M     0  100M   0% /run/user
/dev/sda1                   228M  209M  7.5M  100% /boot
server@vmhos:~$ du -sh *
4.0K    autorestart.sh
8.0K    vboxtool.log
53G     VirtualBox VMs
Atau
server@vmhos:~$  du -h --max-depth=1
12K     ./.cache
53G     ./VirtualBox VMs
8.0K    ./.ssh
452K    ./.rpmdb
2.6M    ./.VirtualBox
53G     .
server@vmhos:~$ sudo apt-get clean
server@vmhos:~$ rm -rf ~/.local/share/Trash
server@vmhos:~$ dpkg -l linux-image-\* | grep ^ii
ii  linux-image-3.13.0-61-generic 3.13.0-61.100  amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-62-generic  3.13.0-62.102 amd64  Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-29-generic   3.2.0-29.46    amd64    Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-37-generic  3.2.0-37.58   amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-48-generic    3.2.0-48.74     amd64    Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-79-generic    3.2.0-79.115   amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-80-generic   3.2.0-80.116  amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-82-generic   3.2.0-82.119  amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-83-generic  3.2.0-83.120   amd64  Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-84-generic  3.2.0-84.121  amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-85-generic    3.2.0-85.122  amd64    Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-86-generic   3.2.0-86.124    amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-87-generic  3.2.0-87.125     amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-88-generic  3.2.0-88.126      amd64   Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-61-generic 3.13.0-61.100 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-62-generic 3.13.0-62.102 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic  3.13.0.65.71  amd64    Generic Linux kernel image
ii  linux-image-server   3.13.0.65.71     amd64   Transitional package.
server@vmhos:~$  uname -r
3.13.0-65-generic
server@vmhos:~$ sudo apt-get purge linux-image-3.13.0-61-generic linux-image-3.13.0-62-generic linux-image-3.2.0-29-generic linux-image-3.2.0-37-generic linux-image-3.2.0-48-generic linux-image-3.2.0-79-generic linux-image-3.2.0-80-generic linux-image-3.2.0-82-generic linux-image-3.2.0-83-generic linux-image-3.2.0-84-generic linux-image-3.2.0-85-generic  linux-image-3.2.0-86-generic linux-image-3.2.0-87-generic
server@vmhos:~$ sudo update-initramfs -u  # remakes boot ramdisk
server@vmhos:~$ sudo update-grub2  # re-creates boot menu
server@vmhos:~$ find /boot -type f -printf "%-16s %p\n" | sort -nr | head -n 10
server@vmhos:~$ df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/root 63G 32G 29G 53% / udev 5.9G 4.0K 5.9G 1% /dev tmpfs 1.2G 584K 1.2G 1% /run none 5.0M 0 5.0M 0% /run/lock /dev/sda1 228M 60M 157M 28% /boot

Semoga Bermanfaat..

Posted By adminblog15:00

Solusi echo 0 > /proc/sys/kernel/hung_task_timeout_secs



Cek konfigurasi sysctl
serverblog@server $ sudo sysctl -p
Jika belum ada untuk 
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10 
maka ditambahkan dengan cara 

sudo vi /etc/sysctl.conf
Tambahkan di 2 baris terakhir
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
Simpan dan keluar
serverblog@server $ sudo reboot
 Semoga bermanfaat

Posted By adminblog09:41