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

BS: fix ifstate metrics #3103

Closed
kormat opened this issue Sep 5, 2019 · 0 comments · Fixed by #3105
Closed

BS: fix ifstate metrics #3103

kormat opened this issue Sep 5, 2019 · 0 comments · Fixed by #3105
Assignees
Labels
c/observability Metrics, logging, tracing

Comments

@kormat
Copy link
Contributor

kormat commented Sep 5, 2019

Currently the BS tries to encode the interface state into a state label in the beacon_srv_ifstate metric:

# HELP beacon_srv_ifstate Interface state, 0 means down, 1 up. More details in labels (ifid, state)
# TYPE beacon_srv_ifstate gauge
beacon_srv_ifstate{elem="bs64-2_0_3-1",ifid="1",state="Active"} 1

This is not compatible with how prometheus metrics and timeseries work.

Instead, i suggest:

# HELP beacon_srv_ifstate Interface state, 0==inactive/expired/revoked, 1==active
# TYPE beacon_srv_ifstate gauge
beacon_srv_ifstate{elem="bs64-2_0_3-1",ifid="1"} 1

This way it's also forward-compatible with the simplifying of interface states in #2926.

@kormat kormat added BS c/observability Metrics, logging, tracing labels Sep 5, 2019
oncilla added a commit to oncilla/scion that referenced this issue Sep 5, 2019
Remove the state label from the ifstate metric.

before:
    # HELP beacon_srv_ifstate Interface state, 0 means down, 1 up. More details in labels (ifid, state)
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1",state="Active"} 1

now:
    # HELP beacon_srv_ifstate Interface state, 0==inactive/expired/revoked, 1==active
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1"} 0

fixes scionproto#3103
oncilla added a commit to oncilla/scion that referenced this issue Sep 5, 2019
Remove the state label from the ifstate metric.

before:
    # HELP beacon_srv_ifstate Interface state, 0 means down, 1 up. More details in labels (ifid, state)
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1",state="Active"} 1

now:
    # HELP beacon_srv_ifstate Interface state, 0==inactive/expired/revoked, 1==active
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1"} 0

fixes scionproto#3103
oncilla added a commit that referenced this issue Sep 5, 2019
Remove the state label from the ifstate metric.

before:
    # HELP beacon_srv_ifstate Interface state, 0 means down, 1 up. More details in labels (ifid, state)
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1",state="Active"} 1

now:
    # HELP beacon_srv_ifstate Interface state, 0==inactive/expired/revoked, 1==active
    # TYPE beacon_srv_ifstate gauge
    beacon_srv_ifstate{elem="bs1-ff00_0_110-1",ifid="1"} 0

fixes #3103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/observability Metrics, logging, tracing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants