Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #8679] Config validation fail because of unexpected new-line #2731

Closed
icinga-migration opened this issue Mar 11, 2015 · 4 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8679

Created by arcade on 2015-03-11 08:28:40 00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-03-11 08:59:59 00:00)
Target Version: 2.3.1
Last Update: 2015-03-11 12:17:40 00:00 (in Redmine)

Icinga Version: 2.3.0
Backport?: Already backported
Include in Changelog: 1

A config like this fails in the validation:

apply Service "CPU Auslastung" to Host {
        import "default-service"
        display_name                    = "CPU Auslastung"
        check_command                   = "nrpe"

        vars.nrpe_command               = "check_cpu_win"
        vars.sla                        = "0"
        vars.check                      = "NRPE"
        vars.customer                   = "arcade_intern"
        vars.tech                       = "Arcade"
        vars.sonde                      = "sonde2.arcade"

        assign where ( 
                        host.vars.os    == "Windows" && 
                        host.vars.check == "NRPE" && 
                        host.vars.tech  == "Arcade" &&
                        host.vars.customer == "arcade_intern" &&
                        host.vars.sonde == "sonde2.arcade"
                     )
        ignore where ( 
                        host.vars.service == "false"
                     )
}

critical/config: Error: syntax error, unexpected new-line
Location:
/etc/icinga2/zones.d/sonde2.arcade/service/windows/service_cpu.conf(12): 
/etc/icinga2/zones.d/sonde2.arcade/service/windows/service_cpu.conf(13):  assign where ( 
/etc/icinga2/zones.d/sonde2.arcade/service/windows/service_cpu.conf(14):    host.vars.os  == "Windows" && 
                                                                         ^
/etc/icinga2/zones.d/sonde2.arcade/service/windows/service_cpu.conf(15):    host.vars.check == "NRPE" && 
/etc/icinga2/zones.d/sonde2.arcade/service/windows/service_cpu.conf(16):    host.vars.tech  == "Arcade" &&

Changesets

2015-03-11 08:55:38 00:00 by (unknown) 21522f9

Fix line continuation support for parentheses

fixes #8679

2015-03-11 09:01:03 00:00 by (unknown) 8682c53

Fix line continuation support for parentheses

fixes #8679
@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-03-11 08:29:50 00:00

  • Category set to Configuration
  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.4.0
  • Backport? changed from TBD to Yes

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-03-11 08:59:59 00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 21522f9.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-03-11 09:01:19 00:00

  • Target Version changed from 2.4.0 to 2.3.1

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-03-11 12:17:40 00:00

  • Estimated Hours set to 1

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.1 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant