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

host down widget does not see downtime #16

Closed
p0ntsNL opened this issue Apr 24, 2017 · 3 comments
Closed

host down widget does not see downtime #16

p0ntsNL opened this issue Apr 24, 2017 · 3 comments

Comments

@p0ntsNL
Copy link

p0ntsNL commented Apr 24, 2017

The following def does not work properly, for some reason it does not exclude hosts that are in downtime:

its weird tho, because the same def is used by services, and that does work.

`def countProblems(objects)
problems = 0

objects.each do |item|
  item.each do |k, d|
    if (k != "attrs")
      next
    end

    if (d["state"] != 0 && d["downtime_depth"] == 0 && d["acknowledgement"] == 0)
      problems = problems + 1
    end
  end
end

return problems

end`

@dnsmichi
Copy link
Collaborator

What exactly do you mean? Do you have any sample host data available from /v1/objects/hosts and their attributes (fetch with curl)?

@p0ntsNL
Copy link
Author

p0ntsNL commented Apr 25, 2017

Case can be closed, mistake on my side.

@dnsmichi
Copy link
Collaborator

Hint: You can close your own issues on GitHub :)

@p0ntsNL p0ntsNL closed this as completed Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants