LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2013, 04:14 AM   #1
sachin_18
LQ Newbie
 
Registered: May 2013
Posts: 4

Rep: Reputation: Disabled
when i restart icinga it says "MAX_CHECKS_ATTEMPTS"


Running configuration check...CONFIG ERROR! Restart aborted. See /var/spool/icinga/icinga.chk for details.

Reading configuration data...
Read main config file okay...
Processing object config directory '/etc/icinga/conf.d'...
Processing object config file '/etc/icinga/conf.d/up_down.cfg'...
Processing object config file '/etc/icinga/conf.d/example_host.cfg'...
Processing object config file '/etc/icinga/conf.d/linux.cfg'...
Processing object config file '/etc/icinga/objects/commands.cfg'...
Processing object config file '/etc/icinga/objects/contacts.cfg'...
Processing object config file '/etc/icinga/objects/timeperiods.cfg'...
Processing object config file '/etc/icinga/objects/templates.cfg'...
Processing object config file '/etc/icinga/objects/localhost.cfg'...
Processing object config file '/etc/icinga/objects/windows.cfg'...
Processing object config directory '/etc/icinga/modules'...
Processing object config file '/etc/icinga/modules/idoutils.cfg'...
Error: Invalid max_check_attempts value for host 'linux'
Error: Could not register host (config file '/etc/icinga/conf.d/up_down.cfg', starting on line 1)
Error processing object config files!

Last edited by sachin_18; 05-09-2013 at 04:16 AM.
 
Old 05-09-2013, 07:57 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,667
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
"Cute".
line 1 of /etc/icinga/conf.d/up_down.cfg is what?
 
Old 05-10-2013, 11:12 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,321

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by sachin_18 View Post
Running configuration check...CONFIG ERROR! Restart aborted. See /var/spool/icinga/icinga.chk for details.

Reading configuration data...
Read main config file okay...
Processing object config directory '/etc/icinga/conf.d'...
Processing object config file '/etc/icinga/conf.d/up_down.cfg'...
Processing object config file '/etc/icinga/conf.d/example_host.cfg'...
Processing object config file '/etc/icinga/conf.d/linux.cfg'...
Processing object config file '/etc/icinga/objects/commands.cfg'...
Processing object config file '/etc/icinga/objects/contacts.cfg'...
Processing object config file '/etc/icinga/objects/timeperiods.cfg'...
Processing object config file '/etc/icinga/objects/templates.cfg'...
Processing object config file '/etc/icinga/objects/localhost.cfg'...
Processing object config file '/etc/icinga/objects/windows.cfg'...
Processing object config directory '/etc/icinga/modules'...
Processing object config file '/etc/icinga/modules/idoutils.cfg'...
Error: Invalid max_check_attempts value for host 'linux'
Error: Could not register host (config file '/etc/icinga/conf.d/up_down.cfg', starting on line 1)
Error processing object config files!
Aside from posting a chunk of error messages, and not giving us ANY details (version/distro of Linux, what you've done/tried, any sort of configuration options, what software is generating this, etc.), the error is very clear: you have error(s) in your up_down.cfg file. It's telling you that, and is even telling you what line it's on. So, fix it.

Since you don't post that file, or the .chk log file that's referenced above, there's not much we can help you with.
 
Old 05-13-2013, 02:13 AM   #4
sachin_18
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have installed icinga on centOS 6.2
when i give the command "service icinga restart",it gives the error below

Running configuration check...CONFIG ERROR! Restart aborted. See /var/spool/icinga/icinga.chk for details.
Reading configuration data...
Read main config file okay...
Processing object config directory '/etc/icinga/conf.d'...
Processing object config file '/etc/icinga/conf.d/up_down.cfg'...
Processing object config file '/etc/icinga/conf.d/example_host.cfg'...
Processing object config file '/etc/icinga/conf.d/linux.cfg'...
Processing object config file '/etc/icinga/objects/commands.cfg'...
Processing object config file '/etc/icinga/objects/contacts.cfg'...
Processing object config file '/etc/icinga/objects/timeperiods.cfg'...
Processing object config file '/etc/icinga/objects/templates.cfg'...
Processing object config file '/etc/icinga/objects/localhost.cfg'...
Processing object config file '/etc/icinga/objects/windows.cfg'...
Processing object config directory '/etc/icinga/modules'...
Processing object config file '/etc/icinga/modules/idoutils.cfg'...
Error: Invalid max_check_attempts value for host 'linux'
Error: Could not register host (config file '/etc/icinga/conf.d/up_down.cfg', starting on line 1)
Error processing object config files!

what does it mean invalid max_check_attempts
what does it mean could not register host

the config file of up_down.cfg

define host{
use generic-host ; Inherit default values from a template
host_name linux ; The name we're giving to this server
alias Linux Host ; A longer name for the server
address xxx.xxx.xxx.xxx ; IP address of the server
}
define service{
use generic-service
host_name linux
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use generic-service
host_name linux
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use generic-service
host_name linux
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}
define service{
use generic-service
host_name linux
service_description Total Processes
check_command check_nrpe!check_total_procs
}
define service{
use generic-service
host_name linux
service_description Zombie Processes
check_command check_nrpe!check_zombie_procs
}

when i change this up_down.cfg host-name to remotelinux,getting same error

define host{
use generic-host ; Inherit default values from a template
host_name remotelinux ; The name we're giving to this server
alias Linux Host ; A longer name for the server
address xxx.xxx.xxx.xxx ; IP address of the server
}
define service{
use generic-service
host_name remotelinux
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use generic-service
host_name remotelinux
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use generic-service
host_name remotelinux
service_description /dev/hda1 Free Space
check_command check_nrpe!check_hda1
}
define service{
use generic-service
host_name remotelinux
service_description Total Processes
check_command check_nrpe!check_total_procs
}
define service{
use generic-service
host_name remotelinux
service_description Zombie Processes
check_command check_nrpe!check_zombie_procs
}
the max_check_attempts config file is

define host{
host_name remotelinux1
alias remotelinux1
address xxx.xxx.xxx.xxx
parents server-backbone
check_command check-host-alive
check_interval 5
retry_interval 1
max_check_attempts 1
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
contact_groups
notification_interval 30
notification_period 24x7
notification_options d,u,r
}

when i connect my icinga-web on browser it says
Oops! Google Chrome could not connect to xxx.xxx.xxx.xxx

Last edited by sachin_18; 05-13-2013 at 02:14 AM.
 
Old 05-13-2013, 05:18 AM   #5
sachin_18
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
i tried the command "service icinga status", it display the below error

Icinga not running. No lock file found in /var/run/icinga.pid

any one help me out......

Thanx....
 
Old 05-13-2013, 10:16 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,321

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by sachin_18 View Post
I have installed icinga on centOS 6.2
when i give the command "service icinga restart",it gives the error below

Error: Invalid max_check_attempts value for host 'linux'
Error: Could not register host (config file '/etc/icinga/conf.d/up_down.cfg', starting on line 1)
Error processing object config files!
Right...which is what you told us before. AGAIN, did you read the error??? You have error(s) in your up_down.cfg file...FIX THEM. The documentation for icinga is clear:
http://docs.icinga.org/latest/en/objectinheritance.html

It even has examples on how to define hosts, which you aren't doing correctly, which is why you're getting the error.
Quote:
what does it mean invalid max_check_attempts
Simple: it means you've given an invalid response to the max_check_attempts directive in the cfg file. Put in the correct one.
Quote:
what does it mean could not register host
Again, obviously, you've not defined the host correctly, so since you've not read/followed/understood the directions, the host isn't defined correctly, so it can't be registered in the system.
Quote:
when i connect my icinga-web on browser it says
Oops! Google Chrome could not connect to xxx.xxx.xxx.xxx
Right...because it's not starting, because you've not set it up correctly and still have error(s) in your config files. Fix them, then the errors won't come up, which means the service will start, which means the web page will be visible.
Quote:
Originally Posted by sachin_18
i tried the command "service icinga status", it display the below error
Icinga not running. No lock file found in /var/run/icinga.pid
any one help me out......
Thanx....
Spell out your words, and if you read/understood the previous answers, you STILL HAVE ERRORS, and since you do, the service won't start, will it? If it's not started, there is no status to report on. And don't bump your own threads with no new information after just a few hours.
 
1 members found this post helpful.
Old 05-14-2013, 01:07 AM   #7
sachin_18
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thnx for the response...... but im new to this platform..... just help me out,by reading the docs i'm not getting anything......
 
Old 05-14-2013, 07:45 AM   #8
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,667
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Quote:
Originally Posted by sachin_18 View Post
the max_check_attempts config file is ...
I have never seen this file nor is there any reference to one at http://nagios.sourceforge.net/docs/3...finitions.html

Paste contents (sanitized if necessary) of /var/spool/icinga/icinga.chk
 
Old 05-14-2013, 09:45 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,321

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by sachin_18 View Post
Thnx for the response...... but im new to this platform..... just help me out,by reading the docs i'm not getting anything......
AGAIN, you need to SPELL OUT YOUR WORDS. Also, this has ZERO to do with the platform/operating system you're using. This is configuration file setup for a particular PROGRAM, which will be the same for ANY OS.

You were sent clear instructions, that even have EXAMPLES of how to do what you want...it doesn't get much simpler. Again, you are NOT using the correct syntax. The icinga documentation is very clear, and easy to find.

Max_check_attempts:
http://docs.icinga.org/latest/en/statetypes.html

Host definitions:
http://docs.icinga.org/latest/en/objectinheritance.html

And sorry, but if you can't understand the documentation and instructions, there's little we can do to help you. Either go through them slowly and follow them, or get someone else to do the job for you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Getting "SIOCADDRT: No such process" when running "service network restart" cmlorentz Linux - Networking 1 11-26-2010 02:06 PM
How do I disable "shutdown" and "restart" options in KDE logout screen for all users? maxgsp Linux - Distributions 1 12-12-2008 04:18 PM
Lost "Shutdown" and "Restart" From system menu in FC6 Nader1 Linux - Software 3 02-12-2007 05:40 PM
difference between "service smb restart" and "/etc/rc.d/init.d/smb" powah Linux - Software 1 01-17-2007 06:17 PM
"Shutdown" and "Restart" option missing after upgrade hansalfredche Mandriva 8 11-02-2006 08:23 AM


All times are GMT -5. The time now is 08:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration