-1

I am using nagios ver. 4.0.8 . I want to set interval between ping times is 10 seconds like below:

define command{
command_name    check-host-alive
command_line    $USER1$/check_ping -t 10 -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

But not exactly (about 90 seconds). Can you help me? Thanks

MartinJoo
  • 2,784
  • 9
  • 33
  • 39

1 Answers1

1

You are looking at things the wrong way.

define command{
command_name    check-host-alive
command_line    $USER1$/check_ping -t 10 -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}

The thing you post is a Nagios command. the '-t 10' is not the interval, but the timeout argument. This means if the check_ping does not get a result in 10 seconds, the command will timeout.

To define the check interval, you need to look at the host (or service) configuration file.

For example:

define host {
host_name           bogus-router
alias               Bogus Router #1
address             192.168.1.254
parents             server-backbone
check_command           check-host-alive
check_interval          5
retry_interval          1
max_check_attempts      5
check_period            24x7
process_perf_data       0
retain_nonstatus_information    0
contact_groups          router-admins
notification_interval       30
notification_period     24x7
notification_options        d,u,r
}

The interval between checks in this example is 5 minutes (check_interval). It is not possible to set intervals of less then one minute with Nagios. If you want to have more granular (free) monitoring, check out InfluxDB, Telegraf and Grafana.

willemdh
  • 796
  • 2
  • 13
  • 34