Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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?
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.
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.
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
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
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?
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.