Back to OP5 Monitor FAQ

'Unclosed compound' error in naemon.log

‘Unclosed compound’ is a catch-all error message found in naemon.log that could mean several configuration issues in your merlin.conf.

Let’s take a real-world example that was reported by a client. See below.

Configuration error found in naemon.log:

[2023-05-08T19:47:58Z] *** Configuration error
[2023-05-08T19:47:58Z] in compound 'poller nl-op5' starting on line 90
[2023-05-08T19:47:58Z] in file '/opt/monitor/op5/merlin/merlin.conf'
[2023-05-08T19:47:58Z] ----
[2023-05-08T19:47:58Z] Unclosed compound (there may be more)
[2023-05-08T19:47:58Z] ----

It says that there’s something erroneous in merlin.conf starting on line 90.

We can inspect the file with line number using the command cat with an option –number.

cat --number /opt/monitor/op5/merlin/merlin.conf

Below is an excerpt from the file and at first glance, there’s nothing wrong with line 90. However, upon further inspection, there seems to be a missing } character to close the settings for poller nl-op5. The } character must be defined after line 100. Once defined, save the file and perform mon restart to reflect the changes.

    77  poller aims-op5 {
    78          address = 202.175.131.221
    79          port = 15551
    80          notifies = no
    81          encrypted = 1
    82          publickey = /opt/monitor/op5/merlin/aims-op5.pub
    83          hostgroup = poller-aims
    84
    85      sync {
    86          /opt/plugins/custom/
    87      }
    88
    89  }
    90  poller nl-op5 {
    91          address = 10.20.110.20
    92          port = 15551
    93          hostgroup = poller-maarssen-nl
    94          encrypted = 1
    95          publickey = /opt/monitor/op5/merlin/nl-op5.pub
    96          notifies = no
    97
    98      sync {
    99          /opt/plugins/custom/
   100      }
   101
   102
   103
   104
   105
   106
   107  poller pf1ppavop5pa001 {
   108          address = 178.33.252.249
   109          notifies = no
   110          encrypted = 1
   111          port = 15551
   112          hostgroup = poller-quria-eu
   113  }
["Geneos"] ["FAQ"]

Was this topic helpful?