Nagios response time

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Nagios response time

Post by billperrotta »

We have been noticing that it takes a while after a server goes offline to appear red in the web console.

Not sure what controls this or if there is a way to make nagios show up red quicker after a server goes offline?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios response time

Post by abrist »

There are two things that will effect the web UI responsiveness to state changes:
1. Check interval and where in the scheduled check that the box fails. If the interval is 5 minutes, and the server goes down a few moments after the check, nagios will not know that the host is down until the next check, which could approach the check_interval time.
2. The web UI refresh rate. By default, the frontend should refresh every 30 seconds. This time can be reduced, but too low of settings or too many users will lead to excessive db queries.

The first issue can be mitigated by using passive checks like nsca/snmp traps as passive checks are event driven and do not update on an interval.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Nagios response time

Post by billperrotta »

the excsvc.cfg file says http interval is 30. What is it safe to set it to?
Will this make the alert show up quicker if the server goes down?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios response time

Post by abrist »

billperrotta wrote:the excsvc.cfg file says http interval is 30. What is it safe to set it to
excsvc.cfg? Could you post this file? I would guess that you may have the check_interval for the check set to 30 minutes. But without seeing the file, this is but conjecture.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Nagios response time

Post by billperrotta »

Code: Select all

define service{
        use                     generic-service
        hostgroup_name          exchange-servers
        service_description     HTTP
        check_command           check_http
        notification_interval   30
}

define service{
        use                     generic-service
        hostgroup_name          exchange-servers
        service_description     HTTPS
        check_command           check_https
        notification_interval   30
}

define service{
        use                     generic-service
        hostgroup_name          exchange-servers
        service_description     POP
        check_command           check_pop
        notification_interval   30
}
"excsvc.cfg" 44L, 879C                                        1,9           Top
 
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Nagios response time

Post by billperrotta »

Only thing is I don't know if this file is only to exchange servers group or all servers?
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Nagios response time

Post by billperrotta »

maybe it is this file the notification interval is 60 at the bottom of this file

Code: Select all

define service{
7>        use                     generic-service
          hostgroup_name          corporate-servers,hotel-servers
          service_description     NSClient++ Version
          check_command           check_nt!CLIENTVERSION
          notification_interval   0
  }

  define service{
          use                     generic-service
          hostgroup_name          corporate-servers,hotel-servers
          service_description     Uptime
          check_command           check_nt!UPTIME
          notification_interval   0
  }

  define service{
          use                     generic-service
8>        hostgroup_name          corporate-servers,hotel-servers
          service_description     CPU Load
          check_command           check_nt!CPULOAD!-l 5,80,90
0>}

  define service{
          use                     generic-service
          hostgroup_name          corporate-servers,hotel-servers
          service_description     Memory Usage
          check_command           check_nt!MEMUSE!-w 80 -c 90
  }

  define service{
          use                     generic-service
          hostgroup_name          corporate-servers,hotel-servers
          service_description     W3SVC
          check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
  }

  define servicegroup{
          servicegroup_name       drivespace
          alias                   Drive Space
  }
{>
(>define serviceescalation{
          hostgroup_name          corporate-servers,hotel-servers
          servicegroup_name       drivespace
          contact_groups          admins
          first_notification      1
          last_notification       0
          notification_interval   60
          escalation_options      c
4>}
"winsvc.cfg" 51L, 1189C                                                                                                                                        51,1          All
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios response time

Post by abrist »

All of those are using the standard check_interval of 5 minutes. Can you post the "generic-service" template?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
billperrotta
Posts: 115
Joined: Fri Feb 21, 2014 11:44 am

Re: Nagios response time

Post by billperrotta »

yes if i knew where it might be?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios response time

Post by abrist »

Do you have a templates.cfg file in the nagios objects directory?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked