i am unable to monitor or connect remote linux server uning nagios 3.3 on nagios linn
Dear Sir
I am not able to configure or monitor remote linux server (RHEL6)using nagios on nagios linux server (RHEL 5). remote linux server (ip-192.168.10.30)-RHEL6 nagios linux server (ip-192.168.10.1)-RHEL5 #/usr/local/nagios/libexec/check_nrpe -H 192.168.10.1 (from remote pc) output: NRPE v2.13 #/usr/local/nagios/libexec/check_nrpe -H 192.168.10.30 (from nagios server) output: NRPE v2.13 when i check configureatio on Nagios server: [root@server1 ~]# service nagios restart Running configuration check... CONFIG ERROR! Restart aborted. Check your Nagios configuration. [root@server1 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 3.3.1 Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 07-25-2011 License: GPL Website: http://www.nagios.org Reading configuration data... Read main config file okay... Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'... Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'... Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'... Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'... Processing object config file '/usr/local/nagios/etc/objects/Nagios-Server.cfg'... Processing object config file '/usr/local/nagios/etc/objcets/Remote-machine.cfg'... Error: Cannot open config file '/usr/local/nagios/etc/objcets/Remote-machine.cfg' for reading: No such file or directory 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. [root@server1 ~]# I check Remote-machine.cfg file........ [root@server1 ~]# vim /usr/local/nagios/etc/objects/Remote-machine.cfg 1 ############################################################################ ### 2 # LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE 3 # 4 # Last Modified: 05-31-2007 5 # 6 # NOTE: This config file is intended to serve as an *extremely* simple 7 # example of how you can create configuration entries to monitor 8 # the local (Linux) machine. 9 # 10 ############################################################################ ### 11 12 13 14 15 ############################################################################ ### 16 ############################################################################ ### 17 # 18 # HOST DEFINITION 19 # 20 ############################################################################ ### 21 ############################################################################ ### 22 23 # Define a host for the local machine 24 25 define host{ 26 use Remote-machine ; Name of host temp late to use 27 ; This host definiti on will inherit all variables that are defined 28 ; in (or inherited b y) the linux-server host template definition. 29 host_name server1.abc.com 30 alias remote host 31 address 192.168.10.30 32 } 33 34 38 # 39 # HOST GROUP DEFINITION 40 # 41 ############################################################################ ### 42 ############################################################################ ### 43 44 # Define an optional hostgroup for Linux machines 45 46 #define hostgroup{ 47 # hostgroup_name remote-linux-servers ; The name of the hostgroup 48 # alias Remote Linux Servers ; Long name of the group 49 # members server1.abc.com ; Comma separated list of hosts that belong to this group 50 # } 57 # SERVICE DEFINITIONS 58 # 59 ############################################################################ ### 60 ############################################################################ ### 61 62 63 # Define a service to "ping" the local machine 64 65 define service{ 66 use local-service ; Name of serv ice template to use 67 host_name server1.abc.com 68 service_description PING 69 # check_command check_ping!100.0,20%!500.0,60% 70 } 71 72 73 # Define a service to check the disk space of the root partition 74 # on the local machine. Warning if < 20% free, critical if 75 # < 10% free space on partition. 76 77 define service{ 78 use local-service ; Name of serv ice template to use 79 host_name server1.abc.com 80 service_description Root Partition 81 # check_command check_local_disk!20%!10%!/ 82 } 83 84 85 86 # Define a service to check the number of currently logged in 87 # users on the local machine. Warning if > 20 users, critical 88 # if > 50 users. 89 90 define service{ 91 use local-service ; Name of serv ice template to use 92 host_name server1.abc.com 93 service_description Current Users 94 # check_command check_local_users!20!50 95 } 96 98 # Define a service to check the number of currently running procs 99 # on the local machine. Warning if > 250 processes, critical if 100 # > 400 users. 101 102 define service{ 103 use local-service ; Name of serv ice template to use 104 host_name server1.abc.com 105 service_description Total Processes 106 check_command check_nrpe!check_local_procs 107 108 # check_command check_local_procs!250!400!RSZDT 109 } 110 111 112 113 # Define a service to check the load on the local machine. 114 115 define service{ 116 use local-service ; Name of serv ice template to use 117 host_name server1.abc.com 118 service_description Current Load 119 check_command check_nrpe!check_local_load 120 # check_command check_local_load!5.0,4.0,3.0!10.0,6. 0,4.0 121 } 122 Plz help me as soon as possible... Reg. Narendra Singh |
I guess it should be /usr/local/nagios/etc/objects/Remote-machine.cfg, not /usr/local/nagios/etc/objcets/Remote-machine.cfg (notice 'objects' and not 'objcets').
The error at config test is plain simple 'no such file or directory, so there is something why it cannot even find the file. It says nothing about the contents of the file. If you correct above error, the test will continue to parse the config file. |
Thank you sir.........yes ...i was mistekan..............objects is replaced by objects in nagios.cfg file..............
|
All times are GMT -5. The time now is 02:13 PM. |