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

If unable to connect to source host page always says "Loading Hosts..." #1003

Closed
goller opened this issue Mar 13, 2017 · 7 comments
Closed
Assignees
Labels
Milestone

Comments

@goller
Copy link
Contributor

goller commented Mar 13, 2017

When failing to connect to a source, rather than showing an error message it says "Loading Hosts..."

@nhaugo nhaugo added this to the 1.2.0-beta6 milestone Mar 13, 2017
@nhaugo nhaugo added the ready label Mar 14, 2017
@nhaugo nhaugo modified the milestones: 1.2.0-beta7, 1.2.0-beta6 Mar 21, 2017
@cryptoquick cryptoquick self-assigned this Mar 27, 2017
@cryptoquick
Copy link
Contributor

@goller What should Chronograf do in this case?

@nhaugo nhaugo modified the milestones: 1.2.0-beta8, 1.2.0-beta7 Mar 27, 2017
@goller
Copy link
Contributor Author

goller commented Mar 27, 2017

@cryptoquick I think it should only display loading hosts when it is running a query. If the query returns zero hosts, I think it should say zero hosts found. If it cannot contact the server (error or otherwise) it should say something about unable to connect, etc.

@cryptoquick
Copy link
Contributor

Sounds good. I'll see what I can do.

@games
Copy link

games commented Mar 28, 2017

I got this error:

image

the data as below:

{
  "results": [{
    "statement_id": 0
  }, {
    "statement_id": 1
  }, {
    "statement_id": 2,
    "series": [{
      "name": "win_cpu",
      "tags": {
        "host": "MyServer"
      },
      "columns": ["time", "mean"],
      "values": [
        [1490658776937, 8.668630778541168]
      ]
    }]
  }, {
    "statement_id": 3,
    "series": [{
      "name": "win_system",
      "tags": {
        "host": "MyServer"
      },
      "columns": ["time", "mean"],
      "values": [
        [1490659366939, 0]
      ]
    }]
  }, {
    "statement_id": 4
  }, {
    "statement_id": 5
  }]
}

softwares:
chronograf-1.2.0~beta5-1
influxdb-1.2.0_windows_amd64

@cryptoquick
Copy link
Contributor

cryptoquick commented Mar 28, 2017

@games can you try making chronograf from the code that's in master? Or the latest release.

@goller
Copy link
Contributor Author

goller commented Mar 28, 2017

@games thank you for the bug report! Especially, thank you for the results from the endpoint.

@games @cryptoquick My hunch is that it is this query:

show tag values from system with key = "host"

that is used here:

const hostnameIndex = allHostsSeries.columns.findIndex((col) => col === 'value');

@cryptoquick To fix this we need another query here:

query: `select mean(usage_user) from cpu where cpu = 'cpu-total' and time > now() - 10m group by host; select mean("load1") from "system" where time > now() - 10m group by host; select mean("Percent_Processor_Time") from win_cpu where time > now() - 10m group by host; select mean("Processor_Queue_Length") from win_system where time > now() - 10s group by host; select non_negative_derivative(mean(uptime)) as deltaUptime from "system" where time > now() - 10m group by host, time(1m) fill(0); show tag values from system with key = "host"`,

The query would likely be

show tag values from win_system with key = "host"

Additionally, this piece of code needs an additional query:

query: 'show tag values from system with key = "host"',

The query would also likely be

show tag values from win_system with key = "host"

@nhaugo nhaugo closed this as completed Mar 28, 2017
@nhaugo nhaugo removed the delivered label Mar 28, 2017
@goller goller mentioned this issue Mar 28, 2017
4 tasks
@goller
Copy link
Contributor Author

goller commented Mar 28, 2017

@games I've created a PR for your issue here: #1104

Again, thanks for reporting it!

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

4 participants