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

Issues with marshaled config on status page #862

Closed
grobie opened this issue Jun 14, 2017 · 5 comments
Closed

Issues with marshaled config on status page #862

grobie opened this issue Jun 14, 2017 · 5 comments

Comments

@grobie
Copy link
Member

grobie commented Jun 14, 2017

  • Regular expressions are shown as {} instead of the actual regular expression.
  • unset fields are shown as null or "" or their default value

Raw config

# ...
      routes:
      - match:
          alertname: MothershipHighErrorRate
        match_re: 
          controller: .*MediaController|.*StreamsController
        receiver: playback-crit
# ...

Printed config

# ...
      routes:
      - receiver: playback-crit
        match:
          alertname: MothershipHighErrorRate
        match_re:
          controller:
            regexp: {}
# ...
@brian-brazil
Copy link
Contributor

@Conorbro

@stuartnelson3
Copy link
Contributor

This is an issue we've dealt with before, I'm not sure why it keeps reappearing. Relevant code is here: https://github.com/prometheus/alertmanager/blob/master/config/config.go#L513-L518

@grobie
Copy link
Member Author

grobie commented Jun 14, 2017

@Conorbro The printed config also prints fields I have not set in the original config. For example smtp_auth_password: null.

@grobie grobie changed the title [Bug] Config on status page doesn't show regular expressions Issues with marshaled config on status page Jun 15, 2017
@mxinden
Copy link
Member

mxinden commented Jun 15, 2017

@grobie In regards to null or "" or their default value: This is due to the fact, that we parse the config and then marshall it again in order to elide secrets properly. See this comment.

@auhlig
Copy link
Contributor

auhlig commented Jun 15, 2017

Same here. Regexp are shown as {}.
In addition the status page shows values that were never defined in my configuration, but the slack_api_url which is actually defined is null as shown in the snippet below.

global:
  resolve_timeout: 16m
  smtp_from: ""
  smtp_smarthost: ""
  smtp_auth_username: ""
  smtp_auth_password: null
  smtp_auth_secret: null
  smtp_auth_identity: ""
  smtp_require_tls: true
  slack_api_url: null
  pagerduty_url: https://events.pagerduty.com/generic/2010-04-15/create_event.json
  hipchat_url: https://api.hipchat.com/
  hipchat_auth_token: null
  opsgenie_api_host: https://api.opsgenie.com/
  victorops_api_url: https://alert.victorops.com/integrations/generic/20131114/alert/

hh pushed a commit to ii/alertmanager that referenced this issue Jul 13, 2018
Add scsi smart data to prometheus exporter

Signed-off-by: mueller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants