0

Can't seem to find a solution. I know it's probably easy, I'm a ruby noob..roob, but would appreciate the help.

How do i set the interval check to say 5/5. So, alert me on the 5th failed attempt.

This is what I have in my chef data bag for the chef-client service:

{
    "command_line": "$USER1$/check_nrpe -H $HOSTADDRESS$ -t 45 -c wt_check_procs -a '-t 60 -c 1: -C 'chef-client''",
    "hostgroup_name": "chef_managed_systems",
    "id": "chef-client",
    "contact_groups": "email_and_page",
    "event_handler": "restart_chef"
}

How would I define something like the following but within my databag:

define service{
host_name               A Host
service_description     A Service
normal_check_interval   5
retry_check_interval    1
max_check_attempts      5
}
Kryten
  • 595
  • 3
  • 10
  • 25

1 Answers1

0

Looking at https://github.com/opscode-cookbooks/nagios/blob/master/templates/default/services.cfg.erb#L14 I would guess that by simply defining those attributes like the existing ones will work - just recognize the json formatting.

dnsmichi
  • 466
  • 3
  • 11