LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-25-2008, 09:26 AM   #1
itsjustdave
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Rep: Reputation: 0
Nagios


I have a Nagios server up and running perfectly. I work in an envionment where we manage over 300+ switches and routers. I would like Nagios to constantly check to verify if a device is online. I would like it to check the status say every 10 min.

Right now I have it set to monitor just one device.

Code:
/////////////////hosts.cfg\\\\\\\\\\\\\\\\\\\\\\\\
define host{
        use                     generic-host            ; Name of host template to use

        host_name               switch2646
        alias                   Switch #1
        address                 9.33.160.121
        check_command           check-host-alive
        max_check_attempts      10
        notification_interval   60
        notification_period     24x7
        notification_options    d,u,r
        }
Code:
///////////////services.cfg\\\\\\\\\\\\\\\\\\\
define service{
        ; The 'name' of this service template, referenced in other service definitions
        name                            generic-service
        active_checks_enabled           1       ; Active service checks are enabled
        passive_checks_enabled          0       ; Passive service checks are enabled/disabled
        parallelize_check               1       ; Active service checks should be parallelized
                                                ; (disabling this can lead to major performance problems)
        obsess_over_service             1       ; We should obsess over this service (if necessary)
        check_freshness                 0       ; Default is to NOT check service 'freshness'
        notifications_enabled           0       ; Service notifications are disabled
        event_handler_enabled           0       ; Service event handler is disabled
        flap_detection_enabled          0       ; Flap detection is disabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts

        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }

# Service definition
define service{
        use                             generic-service         ; Name of service template to use

        host_name                       switch2646
        service_description             PING
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  router-admins
        notification_interval           240
        notification_period             24x7
        notification_options            c,r
        check_command                   check_ping!100.0,20%!500.0,60%
        }

With this config under Status Information, all it says is: (Host assumed to be up). And under Last Check, it was more than an hour ago.

How would I configure it so that it would say "host is up" and give alittle more detailed information?

I am new to Nagios, so any help would be great. Thanks in advance.
 
Old 03-26-2008, 07:32 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by itsjustdave View Post
I am new to Nagios
And new to LQ too I see. Welcome. Asking how to change the status (normal_check_interval) means you haven't read the docs and configfile examples well. You really should. The nfo is staring you right in the face with the two config files you posted.


Quote:
Originally Posted by itsjustdave View Post
How would I configure it so that it would say "host is up" and give a little more detailed information?
If you mean "host is up" as opposed to "Host assumed to be up" then check the NAGIOS FAQ for "What does "(Host assumed to be up) " mean in the host status information?".

With respect to "give a little more detailed information" you'll have to be specific. *What* details exactly would you want to see?
 
Old 03-26-2008, 11:23 AM   #3
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
1. Change your "notification_interval 60" to "notification_interval 10" for checking status at every 10 mins.

2. Please modify respective plugin file (check_ping) to gather more informantion.

Please do googling or read FAQ and be specific in your requirement.
 
Old 03-27-2008, 06:13 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by p_s_shah View Post
Change your "notification_interval
That can't be right: notification_interval (..) the number of "time units" to wait before re-notifying a contact that this server is still down or unreachable.
 
Old 03-27-2008, 08:29 AM   #5
itsjustdave
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I should have replied and said that I figured it out. I read a ton of documentation on Nagios threw the docs and Google. I just got a little frustrated with the searching and thought I would post to this forum. Thank you for your suggestions.


Ok, I have installed and configured Nagios and it is working upto expectations I not have two tasks left, notifications and dependencies. I would also like to have the Status Map configed also.
Like you guys have mentioned there is a ton of docs and information online that I can use. The problem I am faced with is notifications, every doc I have read about notifications has been very vaige and unhelpful. I know there are a ton of different ways to set up notifications but I am stuck as of right now. I have read that there should be a script to send out the notifications via email, but I cannot seem to find one. Do you guy know of one and could you possibly explain step by step how to do it?

Last edited by itsjustdave; 03-27-2008 at 08:34 AM.
 
Old 03-28-2008, 06:53 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by itsjustdave View Post
I should have replied and said that I figured it out.
It would be good to actually post *what* you did to change it to your requirements. Not for me (I dig Nagios pretty well I think) but because it helps others that find this thread later on.


Quote:
Originally Posted by itsjustdave View Post
every doc I have read about notifications has been very vague and unhelpful.
No they're not. That's your frustration speaking ;-p Ask specific questions and you'll get specific answers, OK?


Quote:
Originally Posted by itsjustdave View Post
I have read that there should be a script to send out the notifications via email, but I cannot seem to find one. Do you guy know of one and could you possibly explain step by step how to do it?
Nagios sends notifications itself (functionality resides inside the binary), maybe it could help us help you if you point to where it says you need a script?
 
Old 04-22-2008, 09:03 AM   #7
itsjustdave
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Alot of my problems were solved when I upgraded to Nagios 3.0, I was previously at 1.4. You are right, my frustrations will Nagios have got the best of me at times.

I have decided to put the notifications on hold for now as I have changed my focus to getting the service checks working correctly. I have got the check_dig, check_dhcp working, but am having an issue with check_radius_adv.


Code:
I keep getting a warning that says:

WARNING: Reply-Msg differs!

here is the output:
debian2646:/usr/local/nagios/libexec# ./check_radius_adv -u xxxxx -p xxxxx -s xxxxx -r 9.11.151.41
WARNING: Reply-Msg differs! ('' != 'ôü·¼þï¿iàý·p                                                                                                   Ìôü·þ·hdû') Access ACCEPT. (code = 2) | rtt=0.0026 rttms=2.6439

This is my options:

Usage: # ./check_radius_adv [OPTIONS]...

        OPTIONS
        -v                      verbose (output with verification)
        -u [username]           cleartext username
        -p [password]           cleartext password
        -s [shared secret]      shared secret for RADIUS server
        -r [radius server]      radius server to auth
        -c [radius port]        radius server port (default: 1812)
        -t [auth timeout]       interval to wait until auth timeout in seconds (default: 30 sec.)
        -a [attributes]         filename of the attributes file (see samplefile)
        -o [ok state]           auth reply code which will return ok state (default: 2 = accepted)
        -e [error code]         plugin error-code in case reply code differs (default: 2 = critical)
        -m [replymsg]           expected replymsg (type=18) (default: "")
        -h                      this menu
My setup is Nagios 3.0, Pluggin Ver 1.4.11, Debian Etch 4.0

I used Wireshark to find the Reply Msq and could not see and Reply Msg coming from our Radius server. It would be fine if it didnt check for that Reply Msg, that is not important. The plugin works great except for the warning that it gives me. I have searched all over and am stuck with this.
 
Old 04-22-2008, 06:48 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Maybe adding option "-o" could help? Else there's another version "check_radius_ih" to try out.
 
Old 04-23-2008, 08:52 AM   #9
itsjustdave
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Original Poster
Rep: Reputation: 0
check_radius_ih does work better than check_radius_adv. I played around with the -o for check_radius_adv and could not get it to work. Thanks for the help. Im sure I will be asking more questions real soon!

Thanks again!!
 
  


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
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
Nagios... GixrBen Linux - General 2 09-19-2006 07:56 AM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM
Nagios markus1982 Linux - Software 1 04-01-2003 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:47 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