LinuxQuestions.org
Visit Jeremy's Blog.
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 10-17-2015, 03:17 PM   #1
reetesh.amity
LQ Newbie
 
Registered: Oct 2015
Posts: 6

Rep: Reputation: Disabled
Post Nagios Alert Error


Hi All,
We have a nagios configured in our company. Recently, we got an error on nagios. However, it got resolved in next 15minutes. Everything is working fine. But, still getting that alert from nagios.

Please see the critical alert in the screenshot which we are keep getting from nagios.

I don't have much knowledge about nagios. So, Please help me in this.


Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	nagios alert error.png
Views:	56
Size:	143.6 KB
ID:	19816  

Last edited by reetesh.amity; 10-17-2015 at 03:18 PM.
 
Old 10-19-2015, 08:11 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You'd need to look at the services.cfg on your Nagios server (which you obfuscated) to find the section that is for the hostname (which you also obfuscated). In that section locate the subsection for "DATABASE INSTANCE STATUS" and look to see what command it is running. You might have to check that command after another section in your file or in the separate commands.cfg file.
 
Old 10-24-2015, 04:02 PM   #3
reetesh.amity
LQ Newbie
 
Registered: Oct 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Dear sir,

Please see my services.cfg configuration below and suggest accordingly-

[root@estel etc]# cat services.cfg
define service{
use generic-service
host_name rhel.redhat.com
service_description CPU Load
check_command check_nrpe!check_load
}

define service{
use generic-service
host_name rhel.redhat.com
service_description Total Processes
check_command check_nrpe!check_total_procs
}

define service{
use generic-service
host_name rhel.redhat.com
service_description Current Users
check_command check_nrpe!check_users
}

define service{
use generic-service
host_name rhel.redhat.com
service_description SSH Monitoring
check_command check_nrpe!check_ssh
}

define service{
use generic-service
host_name rhel.redhat.com
service_description FTP Monitoring
check_command check_nrpe!check_ftp
}
 
Old 10-25-2015, 10:39 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by reetesh.amity View Post
Dear sir,
Please see my services.cfg configuration below and suggest accordingly-
We suggested you look for "DATABASE INSTANCE STATUS" in your Nagios config. Did you? Did you check it?? Did you check the other files that MensaWater suggested?

This is a puzzling question, since you obviously already HAVE installed and configured Nagios, that you now apparently know nothing about it, or how to check such things. Very basic first step would seem to be restarting Nagios, since it would then clear out such alerts, and 'reset' things. If you don't know about Nagios, why don't you ask whoever set it up?
 
Old 10-26-2015, 12:30 PM   #5
reetesh.amity
LQ Newbie
 
Registered: Oct 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
[root@estel objects]# cat commands.cfg

###############################################################################
#
# SAMPLE PERFORMANCE DATA COMMANDS
#
# These are sample performance data commands that can be used to send performance
# data output to two text files (one for hosts, another for services). If you
# plan on simply writing performance data out to a file, consider using the
# host_perfdata_file and service_perfdata_file options in the main config file.
#
################################################################################


# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOS TOUTPUT$\t$HOSTPERFDATA$\n" >> /usr/local/nagios/var/host-perfdata.out
}


# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$ \t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
}

###############################################################################
# NRPE CHECK COMMAND

Last edited by reetesh.amity; 10-26-2015 at 12:34 PM.
 
Old 10-26-2015, 12:33 PM   #6
reetesh.amity
LQ Newbie
 
Registered: Oct 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Dear sir(MensaWater & TB0ne),
I don't have much knowledge about nagios. I have paste here both files and currently I don't have any DB server. So, I did not configure anything related to DB.

Please look into these 2 files and suggest me what to do next and how to do?



Thanks in advance.
 
Old 10-26-2015, 02:56 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The problem is that what you're showing in your original screen shot does not appear to match anything in your services.cfg or commands.cfg.

In you screen shot what is the actual FULL URL (i.e. What server name did you hide)?

In the screen shot what is the actual "Host" name.

As I noted in my first reply you blanked both these things out.

It appears from your cat commands that you are on server "estel" when you did the cat. Is that the same as the server in the FULL URL?

Also from what you did provide in services.cfg it suggest your target host is "rhel.redhat.com" which seems unlikely unless you work for RedHat. Either you've replaced the real name to post here or you're looking at the wrong services.cfg. (Or worse yet you're using "redhat.com" as an internal domain.)

As a note on what you did provide note that "check_nrpe" generally tells Nagios master to query an nrpe.cfg on the target host but you'd still have to have defined check_nrpe in something like commands.cfg on the master itself.

Login to whatever host is in the FULL URL you hid and do a "find / -name services.cfg" to verify the one you are looking at isn't just an example file. The normal location would be /usr/local/nagios/etc/objects (or just /usr/local/nagios/etc) but can be different based on how you did configuration of Nagios in the first place.
 
1 members found this post helpful.
  


Reply

Tags
linux, nagios, script, server, unix



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
how to configure sms alert in nagios singh@123 Linux - Server 9 11-12-2013 04:02 AM
setup sendEmail to get alert from Nagios AHUN Linux - Newbie 2 12-19-2012 10:47 PM
Required help in configuration of sms alert in Nagios sanjay87 Linux - Server 1 09-13-2012 01:36 AM
[SOLVED] Nagios service alert on HTTP linuxandtsm Linux - Newbie 3 03-02-2012 03:48 PM
No email alert from Nagios packets Linux - Software 0 10-18-2005 11:56 AM

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

All times are GMT -5. The time now is 07:13 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
Open Source Consulting | Domain Registration