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

Fix that variable names with dots are interpreted as paths #762

Merged
merged 1 commit into from
May 30, 2023

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented May 26, 2023

fixes #757

@nilmerg nilmerg added bug Something isn't working area/representation Affects the representation of information labels May 26, 2023
@nilmerg nilmerg added this to the 1.1.0 milestone May 26, 2023
@nilmerg nilmerg self-assigned this May 26, 2023
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label May 26, 2023
@nilmerg
Copy link
Member Author

nilmerg commented May 26, 2023

Tested with: (plus some restrictions)

apply Service "with-domain-customvar-names" {
  import "generic-service"

  check_command = "random fortune"
  check_interval = 5m
  retry_interval = 1m

  vars = {
    is_dummy = true
    issue_no = 757
    "example.com" = "abc"
    "ex.ample.com" = "cba"
    "example.0.org" = "xyz"
    "example[1]" = "zyx"
    "real_list" = ["one", "two", "three"]
    "ob" = {
      "je" = {
        "ct" = "tcejbo"
      }
    }
    "ex" = {
      "ample.com" = {
        "bla" = "blub"
      }
    }
    vhosts = {"xxxxxxxxxxxxx.mgmt.xxxxxx.com"={http_port="443"},}
  }

  assign where host.name == "docker-master"
}

image

@nilmerg nilmerg requested a review from yhabteab May 26, 2023 12:38
Copy link
Member

@yhabteab yhabteab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apply Service "Test" {
    import "generic-service"

    check_command = "random fortune"

    vars = {
      "yonas.de" = null
      "example[1]" = {}
      examples["Joooo"] = []
      examples["Joooo"][0] = []
    }

    assign where host.name == "docker-master"
}
Bildschirmfoto 2023-05-26 um 15 36 46

Database:

SELECT * FROM customvar INNER JOIN service_customvar sc on customvar.id = sc.customvar_id INNER JOIN service s on s.id = sc.service_id WHERE s.name='Test'

Bildschirmfoto 2023-05-26 um 15 38 01

@yhabteab
Copy link
Member

Monitoring:
Bildschirmfoto 2023-05-26 um 15 42 13

@nilmerg nilmerg force-pushed the fix/custom-variable-display-757 branch from 8381a2d to 0d0f91a Compare May 30, 2023 07:28
@nilmerg
Copy link
Member Author

nilmerg commented May 30, 2023

This is an issue with Icinga DB: Icinga/icingadb#597

@nilmerg nilmerg force-pushed the fix/custom-variable-display-757 branch from 0d0f91a to 8c19a3b Compare May 30, 2023 12:45
@nilmerg nilmerg force-pushed the fix/custom-variable-display-757 branch from 8c19a3b to cb19e28 Compare May 30, 2023 12:48
@nilmerg nilmerg merged commit 8e51215 into master May 30, 2023
@nilmerg nilmerg deleted the fix/custom-variable-display-757 branch May 30, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/representation Affects the representation of information bug Something isn't working cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom variable containing dots is displayed incorrect
2 participants