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

No data when querying custom item defined by User Parameter #173

Open
grafoo opened this issue Mar 16, 2016 · 9 comments
Open

No data when querying custom item defined by User Parameter #173

grafoo opened this issue Mar 16, 2016 · 9 comments

Comments

@grafoo
Copy link

grafoo commented Mar 16, 2016

when i try to create a graph from a custom item ( datasource is a command defined by a user parameter ) nothing will be plotted.
also tables and other types of panels are not working.

@alexanderzobnin
Copy link
Collaborator

Do you see this metric in zabbix?

@grafoo
Copy link
Author

grafoo commented Mar 17, 2016

Yeah. In zabbix itself it works alright. Can i somehow turn on logging in your plugin?

@alexanderzobnin
Copy link
Collaborator

Can you look at browser network requests in dev tools? What zabbix api return.

@grafoo
Copy link
Author

grafoo commented Mar 17, 2016

good idea!

a successful api query will look like this
request

'{"jsonrpc":"2.0","method":"history.get","params":{"output":"extend","history":"0","itemids":["11111"],"sortfield":"clock","sortorder":"ASC","time_from":1458182849,"time_till":1458204449},"auth":"someauthtoken1234","id":1}'

response
the resultset will have an array of the following entries:

{"itemid":"111111","clock":"1458182870","value":"0.0112","ns":"839060550"}

when querying the custom item, it will look for all items of a given host matching value types from 0 to 3
request

'{"jsonrpc":"2.0","method":"item.get","params":{"output":["name","key_","value_type","delay"],"sortfield":"name","webitems":true,"filter":{"value_type":[0,3]},"monitored":true,"searchByAny":true,"hostids":["99999"]},"auth":"someauthtoken1234","id":1}'

response
the response will have an array of those items e.g.

{"itemid":"22222","name":"$1 service available","key_":"net.tcp.service[ssh,,22]","value_type":"3","delay":"30","hostid":"99999"}

maybe it is important to know that the items where the query isn't working where created using low-level discovery?

@grafoo
Copy link
Author

grafoo commented Mar 17, 2016

i guess it's slightly different than i first anticipated.
you're using

'{"jsonrpc":"2.0","method":"item.get","params":{"output":["name","key_","value_type","delay"],"sortfield":"name","webitems":true,"filter":{"value_type":[0,3]},"monitored":true,"searchByAny":true,"hostids":["99999"]},"auth":"someauthtoken1234","id":1}'

for discovering all supported items by the host right?

so in this case when selecting the item which isn't working, grafana simply doesn't not send the additional request to get the values if the item.

@alexanderzobnin
Copy link
Collaborator

What version of Zabbix do you use?

@grafoo
Copy link
Author

grafoo commented Mar 17, 2016

2.0.16

@alexanderzobnin
Copy link
Collaborator

I need to check api details for 2.0. It's very old version, and it may have some differencies from 2.2 and 2.4.

Copy link

This issue has been automatically marked as stale because it has not had activity in the last 2 years. It will be closed in 60 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 13, 2024
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

2 participants