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

Pick item based on group and not based on host #18

Closed
oovoo opened this issue May 21, 2015 · 26 comments
Closed

Pick item based on group and not based on host #18

oovoo opened this issue May 21, 2015 · 26 comments

Comments

@oovoo
Copy link

oovoo commented May 21, 2015

Great job gentlemen
Please let an ability choose a counter which is exists in specific group and automatically populate it on the graphs from all servers that are exists in chosen group.
thank you

@Diwahars
Copy link

@oovoo in zabbix all items will be mapped based on host and not the hostgroups... Also, the items varies from host to host.
it will not be good, if it automatically populate from the graphs once u select the group.

Are you familiar with zabbix?

@alexanderzobnin
Copy link
Collaborator

Something like cpu load for all servers in hostgroup in one panel for example?

@nucleusv
Copy link
Contributor

Oovoo, it is something crazy, have you seen implemented your idea in other grafana plugins?

Alex I think he wants templated screens, if so we need to work with key_ field and not itemid and hostid

@alexanderzobnin
Copy link
Collaborator

@oovoo need example for more clarity.

@oovoo
Copy link
Author

oovoo commented May 25, 2015

nucleus/Diwahars dear friends I am personally working with Zabbix for last 10 years so I am pretty familiar with internals and capabilities of the product.

let's me try to rephrase and give u an example what I am asking u to create:

Let's assume we have a group of servers I want to pick this group and populate list of counters that are shared between all hosts that are exists in the group.

When I pick specific counter which is shared across all hosts in the group, It will populate all hosts where is the counter exists on the relevant graph automatically.

It is very time series approach when u pick Time Series metric based on reg. expressions like in Graphite/InfluxDB etc.

if its still not clear I'll try to find some time and provide this capability and contribute into your project.

Its very simple when u go to Zabbix to latest data pick specific counter in the group and then click to combine values on one graph.

capture

@oovoo oovoo closed this as completed May 25, 2015
@oovoo
Copy link
Author

oovoo commented May 25, 2015

I would do something like that:

  1. hostgroup.get with specific group name
  2. host.get based on groupid (found in step 1)
  3. item.get based on groupid (found in step 1) and creating unique list of counters

when I pick the group and counter its simply populates latest data from chosen counter across all hosts in the group.

The point here if I add a new host to the group, a new host will appears automatically on the graph.

Make sense?

@oovoo oovoo reopened this May 25, 2015
@nucleusv
Copy link
Contributor

it is already done with templated graphs try to test in https://github.com/alexanderzobnin/grafana-zabbix/tree/feature-templated

you need to go to settings to templated and see how it works

@alexanderzobnin
Copy link
Collaborator

@oovoo Yes, this feature will be availiable in 2.0.0 release (see milestone 2.0.0). Now I develop templating in feature-templated branch.

@alexanderzobnin alexanderzobnin added this to the grafana-zabbix 2.0.0 milestone May 25, 2015
@oovoo
Copy link
Author

oovoo commented May 26, 2015

Great thanks

@oovoo
Copy link
Author

oovoo commented May 26, 2015

Can u give me a use case of using templates with zabbix data? You already have clear separation between host / metric / value

@alexanderzobnin
Copy link
Collaborator

@oovoo see example at http://play.grafana.org/dashboard/db/templated-graphs-nested. In zabbix datasource you may add templated variables and choose them in metric editor. And then you just change templated variable value to view, for example, all items in selected application:

2015-05-26 22-55-52 grafana - templated values query - mozilla firefox
2015-05-26 22-57-14 grafana - templated values query - mozilla firefox

Select variable value:
2015-05-27 06-48-00
2015-05-27 06-48-36

And as you wanted, you can select all application items in selected group:
2015-05-27 06-52-13

To filter item use regex field:
2015-05-27 06-59-47

@oovoo
Copy link
Author

oovoo commented Jun 7, 2015

Alexander,
Template is just mechanism to achieve what I am looking for I checked the proposed version and I was unable to generate the graph that will be populating specific item from all hosts from group I pick.
Follow you link this is exact example I am looking for to achieve:
capture

@oovoo
Copy link
Author

oovoo commented Jun 7, 2015

in my case it looks like following:
capture
capture1

@nucleusv
Copy link
Contributor

nucleusv commented Jun 7, 2015

@oovoo you need to select your $item_key in metric editor under graph
and in templating menu you should select host group and all hosts, in templating editor check All option and set it to glob

@alexanderzobnin
Copy link
Collaborator

@oovoo Wait for about 1 week - this functional will be added soon. I'm working on it.

@oovoo
Copy link
Author

oovoo commented Jun 9, 2015

Great thanks, looking forward

@alexanderzobnin
Copy link
Collaborator

@oovoo see develop branch and try to use this functional.

@alexanderzobnin
Copy link
Collaborator

Closed by cb7d08c. See develop branch.

@oovoo
Copy link
Author

oovoo commented Jun 18, 2015

Alexander super cool feature, works good.

The only thing which is lack now is an ability to search for item which is based on regex/wildcard pattern.

Use case:

I want to see all items that belongs to group of servers that match to defined filter.

@alexanderzobnin
Copy link
Collaborator

@oovoo yes, this feature is planned for the future.

@halcyonone
Copy link

I want to see a hostgroup cpu load item graph, when i create a dashboard, select group, all host cpu load graph view on a graph, how can i create many graphs and every host have a self graph?thanks.

@nucleusv
Copy link
Contributor

@halcyonone
Copy link

@nucleusv
I see it, but i dont know how to do it, i not found method, please help me.

@nucleusv
Copy link
Contributor

  1. create 2 variables in new dashboard:
    group - Variable values query: *
    host - Variable values query: $group.* ( host depends group, you will see only hosts in selected group)
  2. create a new graph in group, host fields select $group, $host
    than item(what you need)

try to change selections in variables on top of dashboard

than look here http://play.grafana.org/dashboard/db/new-features-in-v2-1
edit graph http://play.grafana.org/dashboard/db/new-features-in-v2-1?panelId=11&fullscreen&edit

General Tab

Templating options
Repeat Panel

@alexanderzobnin
Copy link
Collaborator

@halcyonone look at http://play.grafana-zabbix.org/dashboard/db/scripted-dashboard - scripted dashboard example.

@halcyonone
Copy link

@nucleusv @alexanderzobnin
thanks very much, i did it, beacause my grafana version is too low, i update it, it works well.
i hava other question, grafana-zabbix can get a zabbix host all graphs without manual create every graph? because my servers run different app and have diff zabbix graphs, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants