
Langkah-langkahnya :
- Login via SSH ke Nagios Server, lalu tingkatkan diri menjadi super user
- Edit file konfigurasi localhost.cfg
- Edit file konfigurasi nagios.cfg
- Jalankan konfigurasi Nagios
- Restart Nagios
1. Login ke Nagios Server, lalu menjadi Root
[msmunir@lenovo ~]$ ssh msmunir@202.46.x.xx
msmunir@202.46.x.xx's password:
Last login: Thu Jan 28 21:53:12 2010 from 110.137.240.228
[msmunir@nms ~]$ su -
Password:
[root@nms ~]#
2. Edit file konfigurasi localhost.cfg
[root@nms etc]# mcedit /usr/local/nagios/etc/objects/localhost.cfg
Hapus host "84-ipcam" pada file konfigurasi localhost.cfg:
define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members xhost,71-nms,84-ipcam
Sehingga menjadi:
define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members xhost,71-nms
3. Edit file konfigurasi nagios.cfg
[root@nms etc]# mcedit /usr/local/nagios/etc/nagios.cfg
Lakukan remark (#)pada baris host 84-ipcam.cfg :
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/xhost.cfg
cfg_file=/usr/local/nagios/etc/objects/71-nms.cfg
cfg_file=/usr/local/nagios/etc/objects/84-ipcam.cfg
Sehingga menjadi :
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/xhost.cfg
cfg_file=/usr/local/nagios/etc/objects/71-nms.cfg
#cfg_file=/usr/local/nagios/etc/objects/84-ipcam.cfg
4. Jalankan konfigurasi Nagios
[root@nms etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
5. Restart Nagios
[root@nms etc]# service nagios restart
Masalah lain yang mungkin timbul adalah :
- IP Address berubah, misal dari 117 ke 114
- Ada service yang harus di-disable, misal service SSH. Cukup remark bagian SSH di file konfigurasinya. Misal men-disable SSH pada 72-mikrotik, maka remark bagian SSH pada file /usr/local/nagios/etc/objects/72-mikrotik.cfg.
No comments:
Post a Comment