VMware Modern Apps Community
bradleyka93
Enthusiast
Enthusiast
Jump to solution

Display source of metric in single sa

Hi,

I'm trying to construct a query to display the leader of a zookeeper ensemble.

This query will return a timeseries for each node in our cluster and the one that is leader will have a value of 1 and the followers will have a value of 0.

  1. ts("zk.leader.gauge", environment=${environment} and region=${region}) 

This will give back something like:

I have a separate chart and alert on the number of leaders (if we have no leaders alert).

What I want is a display of hostname of the node that has the value 1 (there should be a max of 1 result source with a value of 1 but might none if there's no leader). With single stat view I can display either the value or the label of the query but can't seem to display a tag or source for a source where the value is 1.

Any ideas?

John

jonathan_claypool
Correct Answer by jonathan_claypool on Jun 6, 2017 5:40 PM

Thanks for reaching out to the community John.

I have a query I would like you to try. It uses the Tabular View which does allow a source and value.
This one in particular will track the leader (if there is one). https://metrics.wavefront.com/u/t6PwpqlNfH

However, I see your intention is to put more stats onto the single-stat view. I can put that in as a feature request if you like as well.

Sincerely,
Jonathan

See the answer in context
0 Kudos
1 Solution

Accepted Solutions
bradleyka93
Enthusiast
Enthusiast
Jump to solution

Thanks for reaching out to the community John.

I have a query I would like you to try. It uses the Tabular View which does allow a source and value.
This one in particular will track the leader (if there is one). https://metrics.wavefront.com/u/t6PwpqlNfH

However, I see your intention is to put more stats onto the single-stat view. I can put that in as a feature request if you like as well.

Sincerely,
Jonathan

View solution in original post

0 Kudos
3 Replies
bradleyka93
Enthusiast
Enthusiast
Jump to solution

Thanks for reaching out to the community John.

I have a query I would like you to try. It uses the Tabular View which does allow a source and value.
This one in particular will track the leader (if there is one). https://metrics.wavefront.com/u/t6PwpqlNfH

However, I see your intention is to put more stats onto the single-stat view. I can put that in as a feature request if you like as well.

Sincerely,
Jonathan

0 Kudos
bradleyka93
Enthusiast
Enthusiast
Jump to solution

Hi John,

Did the chart I sent you accomplish your goal? Can I provide anymore help on this matter?

Sincerely,
Jonathan

0 Kudos
bradleyka93
Enthusiast
Enthusiast
Jump to solution

Hi Jonathan,

Sorry for not getting back to you. I was dragged off to other work and forgot I raised the ticket.

Your query does just what i need!

Thanks

John

0 Kudos