LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-09-2012, 12:08 AM   #1
nandunay
LQ Newbie
 
Registered: Oct 2011
Posts: 9
Blog Entries: 4

Rep: Reputation: Disabled
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

Last edited by nandunay; 05-09-2012 at 12:17 AM.
 
Old 05-09-2012, 02:18 AM   #2
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 372

Rep: Reputation: 42
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.
 
Old 05-09-2012, 04:56 AM   #3
nandunay
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
Thank you sir.........yes ...i was mistekan..............objects is replaced by objects in nagios.cfg file..............
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
Need to monitor tomcat using Nagios server call_krushna Linux - Server 7 02-02-2012 04:42 AM
How to monitor remote host using nagios Ashish Sood Linux - General 16 01-25-2011 05:05 AM
[SOLVED] Unable to view remote hosts details in Nagios Browser Page vikas027 Linux - Software 6 09-08-2010 12:44 PM
[Nagios] Ideas of Transferring file from remote to monitor host fabbie Linux - Newbie 2 12-02-2009 09:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration