Hello,
On the forum I found a wordfile for Nagios CFG files. Great. But now I want more
This is an example of code I have:
In the function list I see "host". Great, but as a subfunction I would like to see Name -> linux-server
I have been experimenting with the sub function but I obviously don't grasp the syntax as I don't get it to work.
Any help would be appreciated.
Wim
On the forum I found a wordfile for Nagios CFG files. Great. But now I want more
This is an example of code I have:
Code: Select all
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
I have been experimenting with the sub function but I obviously don't grasp the syntax as I don't get it to work.
Any help would be appreciated.
Wim