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

Counter MetricType is not defined in the rest client #795

Closed
edmundoa opened this issue Dec 3, 2014 · 0 comments
Closed

Counter MetricType is not defined in the rest client #795

edmundoa opened this issue Dec 3, 2014 · 0 comments
Assignees
Labels

Comments

@edmundoa
Copy link
Contributor

edmundoa commented Dec 3, 2014

On the current master, asking for metrics fails with the following error:

play.api.Application$$anon$1: Execution exception[[IllegalArgumentException: No enum constant org.graylog2.restclient.lib.metrics.Metric.MetricType.COUNTER]]
    at play.api.Application$class.handleError(Application.scala:296) ~[play_2.10-2.3.6.jar:2.3.6]
    at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.10-2.3.6.jar:2.3.6]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.6.jar:2.3.6]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.6.jar:2.3.6]
    at scala.Option.map(Option.scala:145) [scala-library.jar:na]
Caused by: java.lang.IllegalArgumentException: No enum constant org.graylog2.restclient.lib.metrics.Metric.MetricType.COUNTER
    at java.lang.Enum.valueOf(Enum.java:236) ~[na:1.7.0_67]
    at org.graylog2.restclient.lib.metrics.Metric$MetricType.valueOf(Metric.java:24) ~[graylog2-rest-client-0.93.0-SNAPSHOT.jar:na]
    at org.graylog2.restclient.models.api.responses.metrics.MetricsListItem.getMetric(MetricsListItem.java:43) ~[graylog2-rest-client-0.93.0-SNAPSHOT.jar:na]
    at org.graylog2.restclient.models.api.responses.metrics.MetricsListResponse.getMetrics(MetricsListResponse.java:36) ~[graylog2-rest-client-0.93.0-SNAPSHOT.jar:na]
    at org.graylog2.restclient.models.Node.getMetrics(Node.java:415) ~[graylog2-rest-client-0.93.0-SNAPSHOT.jar:na]

Looking at the response we get from the server, there are some metrics of type "counter", but they are not defined in the rest client. Here is one of the metrics of that type returned by the server:

    {
      "metric": {
        "count": 0
      },
      "name": "readBlocked",
      "type": "counter",
      "full_name": "org.graylog2.shared.journal.JournalReader.readBlocked"
    }
@edmundoa edmundoa added the bug label Dec 3, 2014
@bernd bernd closed this as completed in 46d3c4d Dec 4, 2014
bernd added a commit to graylog-labs/graylog2-web-interface that referenced this issue Dec 4, 2014
@bernd bernd self-assigned this Dec 4, 2014
bernd added a commit that referenced this issue Dec 23, 2014
bernd added a commit to graylog-labs/graylog2-web-interface that referenced this issue Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants