#Error Unable to get process status
Solusi cek error dengan menggunakan command dibawah ini :
[root@nms servers]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
# Normalnya seperti dibawah ini :
-----------------------------------------
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 19 services.
Checked 13 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 25 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 13 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
# Apabila ada error, maka hasil cek seperti dibawah ini :
------------------------------------------------------------------
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'MAIL-SERVER' (config file '/usr/local/nagios/etc/servers/portal.cfg', starting on line 19)
Error: Failed to expand host list 'MAIL-SERVER' for service 'Pop3' (/usr/local/nagios/etc/servers/portal.cfg:19)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Untuk memperbaiki error tersebut, edit pada file CFG yang dibuat.
Seperti pada contoh diatas error ada pada bagian MAIL-SERVER.cfg line 19 dan portal.cfg line 19. cek kembali apakah sudah sesuai dengan format standarisasi nagios.
#Berikut contoh .CFG yang benar :
........................................................
define host {
use linux-server
host_name ITMSPD201
alias ITMSPD201
address 182.253.XXX.XXX
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name ITMSPD201
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service {
use generic-service
host_name ITMSPD201
service_description Pop3
check_command check_pop!182.253.XXX.XXX
}
0 comments:
Post a Comment