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

Feature request: SLA graph over time #728

Closed
mjtrangoni opened this issue Apr 23, 2019 · 8 comments
Closed

Feature request: SLA graph over time #728

mjtrangoni opened this issue Apr 23, 2019 · 8 comments

Comments

@mjtrangoni
Copy link
Contributor

mjtrangoni commented Apr 23, 2019

Hi @alexanderzobnin,

Is your feature request related to a problem? Please describe.
The SLAs are available via service.getsla, which gives us a Graph with a continuous line from timestamp A to timestamp B.

Describe the solution you'd like
I would like to have a variable graph, that change the slope when the SLAs changes inside the timestamp period.

Describe alternatives you've considered
I see, there is a Service availability report with the option "daily", which would get us at least a daily resolution for this, for example here,

https://zabbixurl/zabbix.php?action=report.services&serviceid=1&period=daily&year=2019

Additional context
I am new to Zabbix, so I don't known the background, why this is not implemented over the time already. I would like to hear your opinion about it, and if this should be directly a change request at the zabbix-side.

A kind of workaround/solution would be, sending more than only one interval with service.getsla, so that you would get more values back.

@mjtrangoni mjtrangoni changed the title SLA graph over time Feature request: SLA graph over time Apr 23, 2019
@flassman
Copy link

Another workaround would be to query the SLA values from zabbix itself (with a web scenario?) to get the usual data which can be nicely displayed like any other graph

@alexanderzobnin
Copy link
Collaborator

That's tricky and may cause Zabbix server overloading. I strongly believe that if you want to graph something, so a corresponding method for this should exist.

@SeverinLeonhardt
Copy link

According to the service.getsla documentation the intervals parameter accepts an array of intervals. This should allow querying multiple SLA values within one API request to generate a graph.

@alexanderzobnin
Copy link
Collaborator

@SeverinLeonhardt yes, I understand. But how many intervals I can provide without affecting zabbix performance. I see that in reports Zabbix uses weekly intervals only.

@JeferCatarina
Copy link
Contributor

Hi @alexanderzobnin how've you been?

My company was looking for this feature in Grafana and I made some tests with your code and I think that could be useful in general. My idea was keep the same interval as in the Zabbix PHP inside the Grafana plugin, that is 1 day. With this interval I think it wouldn't affect performance and we could summarize data using the functions. E.g: An interval of 7 days will return 7 results. To show the SLA over time, just plot this values in a "Graph" and to show a summarized SLA plot this values using "Single stat" with "avg" or adding the function "aggregateBy" in a "Graph".

What do you thing? Could be a new feature?

I did almost everything, except include the "functions" option.

@alexanderzobnin
Copy link
Collaborator

@JeferCatarina Thanks for the PR! That's looking good overall.

@mjtrangoni
Copy link
Contributor Author

mjtrangoni commented Aug 19, 2019

@alexanderzobnin @JeferCatarina I found a bug/issue in this approach.
I think we should handle this differently for SingleStat and Graph panels.
With the current state, a SingleStat panel has to be configured from Current to Average Value for a meaningful value, and this result will not be as accurate as what Zabbix returns for the whole period (minimal difference).
Is it possible to handle SingleStat the old way, and other panels the new way?
Thanks!

@alexanderzobnin
Copy link
Collaborator

@mjtrangoni yes, I think #531 should solve this problem, so keep track it.

@alexanderzobnin alexanderzobnin modified the milestones: 3.11, 3.10.5 Dec 25, 2019
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