Nagios Host Configuration Options

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

nagios1.png
nagios2.png
nagios3.png
In case it helps I have posted screenshots of the config to see if maybe something is wrong. Would really like to get this working since I have alot of time into it and it seems to be the only thing missing. The 3rd pic shows a host that has been offline for over a day but still shows as up.
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Host Configuration Options

Post by slansing »

Yes you are correct it is in seconds, so 21600 would in fact be 6 hours and 300 would be5 minutes. In relation to the Arcade-PC host which appears to not have freshness checking functioning on can you verify through the Core Config Manager that on it's Host/Service Management page the template set under Manage Templates has the new passive "freshness check" template assigned? And that you clicked Save and Apply Configuration? Just making sure that it got written, out of curiosity, what other templates are under it's Manage Templates page?
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

I checked under CCM>hosts>common settings>manage templates and it has just one assigned template and its xiwizard_passive_host. There appears to be many others to chose from but I didn't see one that said freshness check so is it the one I modified that should be assigned to it?

I checked under the template config where I made the changes you suggested and they are still there and already saved and applied. Hope this makes sense. Please let me know what I should try next or if you need any info. Thanks a bunch
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Host Configuration Options

Post by slansing »

Can you upload your latest config snapshot? If you do not want it on the open forum you can PM it to either swilkerson or myself, in the PM make sure you link this thread. You can download the snapshot from Admin > Config Snapshots > Click the diskette icon next to the latest file. Thanks!
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

sent a PM to both with the config you asked for. Thanks
I hope it will finally lead to an answer to this puzzle.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Host Configuration Options

Post by slansing »

Looking over the configuration files as I type, have you noticed anything different today? Could you snap another screen shot of the host list?
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

No change. The passive host at the top which has been offline for over 2 days still shows as up. Here is the screenshot. Let me know if you need anything else. Thanks for having a look
nagios4.png
You do not have the required permissions to view the files attached to this post.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Nagios Host Configuration Options

Post by tonyyarusso »

chris2ferz wrote:1- Is there anyway for Nagios to know if a computer was rebooted or shutdown vs a locked or crashed system? It would be offline either way but one would be intended. This way a false notification would not be sent.
I can't speak to the case of Windows or OS X hosts, but for Linux and BSD the answer is yes. What you would want to do is create a SysVInit, Upstart, or other appropriate init script for your system, which would send a command to Nagios scheduling planned downtime for the host. Then set that script to be included in the clean shutdown sequence (runlevel 6 on Ubuntu at least). You will of course need to have Nagios configured to accept external commands for this to work.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
chris2ferz
Posts: 28
Joined: Fri Nov 16, 2012 9:49 am

Re: Nagios Host Configuration Options

Post by chris2ferz »

thanks for that - it may come in very handy. i could maybe create a .vbs script that would do that in a windows environment
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Host Configuration Options

Post by scottwilkerson »

Can you post the output of the following

Code: Select all

cat /usr/local/nagios/etc/nagios.cfg|grep freshness
if you don't have

Code: Select all

check_host_freshness=1
check_service_freshness=1
we will need to edit these in the /usr/local/nagios/etc/nagios.cfg and restart nagios

Code: Select all

service nagios restart
for the case of detecting a Windows system reboot, here is a solution to send a notification when a server has an uptime of less than a certain amount of time when Nagios performs the check.

If we go into the CCM -> Commands and Add new command
Command Name = xi_negate_check_nt
Command Line = $USER1$/negate $USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
Command Type = check command
Save

Then, create a service for the host using normal templating and selecting the host
Change the Check command to xi_negate_check_nt
Set
$ARG1$ = <NSCLIENT_PASSWORD>
$ARG2$ = COUNTER
$ARG3$ = -l "\\System\\System Up Time","Uptime: %.f seconds" -c 300
Save

Apply Configuration

This will set this service to critical if the server has been up for less than 300 seconds
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked