Forum: Cfengine Help
Subject: Maintaining a Nagios config file
Author: daveseff
Link to topic: https://cfengine.com/forum/read.php?3,21923,21923#msg-21923
Hello,
I would like to know if it is possible to manage host entries in a nagios
config file? Each host entry looks like this:
define host{
host_name foo
alias bar
address 1.2.3.4
check_command check-host-alive
max_check_attempts 5
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
contact_groups sysadmins
notification_interval 30
notification_period 24x7
notification_options d,u,r
}
I've been experimenting with 'insert_if_not_match_from_list ' but I believe
with the above structure that may not be the correct approach. I would like CFE
to append thie bock of text above if 'foo' is not found in the file. The
problem I am running into is that the rest of that block is non-unique so it
never adds the entire block more than once.
Any suggestions?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine