0

Good day. Recently, I tried to enable domain expiry check on my nagios core 4.1.1, but it seems like it won't work. I believe, i messed up with declaration of host/hostgroup/service. mine "domain.cfg":

define hostgroup{
<------>hostgroup_name<><------>world-wide-services; The name of the hostgroup
<------>alias<-><------><------>Outer Space; Long name of the group
<------>}

define host{
<------>use<---><------><------>windows-server<>; Inherit default values from a template
<------>host_name<-----><------>domain; The name we're giving to this host
<------>alias<-><------><------>domain; A longer name associated with the host
<------>address><------><------>domain-ip; IP address of the host
<------>}

define servce{
<------>service_description<--->Domain Expiry
<------>check_command<-><------>check_domain -d domain-name -w 30 -c 15
<------>max_check_attempts<---->5
<------>check_interval<><------>5
<------>retry_interval<><------>1
<------>check_period<--><------>24x7
<------>notification_interval<->60
<------>notification_period<--->24x7
<------>contacts<------><------>nagiosadmin
<------>register<------><------>1
<------>hostgroup_name<><------>world-wide-services
<------>}

It might be some obvious things I didnt know.

  • What are all those brackets and arrows for? That doesn't look like valid syntax. – Michael Hampton Sep 03 '20 at 03:31
  • if you press "tab" in midnight commander, free space fills with that symbols. i believe its not affect any syntax – Evgeniy Pozdnyakov Sep 03 '20 at 03:57
  • `nagios -v /etc/nagios/nagios.cfg` (or wherever your main config is) would show you errors in syntax, warnings about duplicates, etc. you could post output from that to help in debug. `service` definition you posted actually lacks `i` in `define service`. also your `check_command` looks suspicious. please post your `checkcommand` definition as well. AFAIR arguments to `check_command` should be seperated with `!` and the `domain-name` probably should be replaced by `$HOSTNAME$` macro if i understand your idea correctly – tbielaszewski Sep 18 '20 at 08:19

0 Answers0