sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
408 stars 148 forks source link

Spurious single quote #940

Closed renard closed 5 years ago

renard commented 5 years ago

Describe the bug After upgrade from 2.20 to last version I noticed that some objects (mainly contacts and contactgroups object) are written with a spurious single quote that breaks Naemon.

The first and last quotes are missing causing naemon to complain:

Naemon Core 1.0.10
Copyright (c) 2013-present Naemon Core Development Team and Community Contributors
Copyright (c) 2009-2013 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
License: GPL

Website: http://www.naemon.org
Reading configuration data...
   Read main config file okay...
Error: Invalid service notification option 'u'' in contact definition.
Error: Could not add object property in file '/etc/naemon/conf.d/common.d/contacts.cfg' on line 101.
   Error processing object config files!

***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data definitions.  If you are upgrading from a previous
     version of Naemon, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

For example:

 define contactgroup {
   contactgroup_name              admins
   alias                          Naemon Administrators
-  contactgroup_members           sysops,sysops.on-call
-  members                        slack,serveralarms,nagios-json-dumper
+  contactgroup_members           sysops','sysops-on-call
+  members                        slack','serveralarms','nagios-json-dumper
 }

or

   register                       0
   service_notification_commands  +notify-service-by-sms
-  service_notification_options   u,c
+  service_notification_options   u','c
 }

Thruk Version Installation from Debian packages found on official Thruk repository

libthruk 2.26 thruk 2.28 thruk-base 2.28 naemon 1.0.10 naemon-core 1.0.10 naemon-livestatus 1.0.10 naemon-thruk 1.0.10

To Reproduce

Not sure, but updating a contact or a contact group object add these quotes.

Expected behavior

Either do not quote or add correct quotation (Do not forget first and last one)

sni commented 5 years ago

please try the latest 2.30, this should be fixed alreay.

renard commented 5 years ago

Works like a charm. Thanks