-
Notifications
You must be signed in to change notification settings - Fork 41
Anyone with issues in Zabbix 2.2? #20
Comments
Hi @vicendominguez, does the user you configured have access permissions on zabbix to see the servers you want to show? You can test it by login in on the Zabbix web frontend as that user. |
Hey Eric thanks for answering Sir.... In my Overview View from the Monitoring tag using that user I can see all the values. No problems here. My zabbix version is 2.2.9. It is very odd. I don't have any idea. If it helps you, ask me more questions please. |
sounds like the call right above that - our separate Zabbix call for status of http server - is returning null. Could be a missing setting in the Zabbix installation - does 2.2 support that trigger.get call we're making or does that have to be set up explicitly? Possible fix - if (!webtrigger) {
thisHostObj.error = 1;
thisHostObj.errorText = 'Web service is unmonitorable, check Zabbix settings';
} else if(webtrigger[0].status == 0 && webtrigger[0].value == 1) {
thisHostObj.error = 1;
thisHostObj.errorText = 'Web service is down (httpd or IIS)';
} See if this stops the page from throwing JavaScript errors, anyway... Could be worth testing. Feel free to try it in your installation. |
(would replace lines 265-268 in the index.html file) It's kind of a workaround though, I'll try and get a Zabbix 2.2 server spun up sometime next week to test on (out of town this weekend). |
Andrew... may be... but I have tried your patch and I dont see any difference. Same error.
if I play with the checkbox from settings this errror is repeated when i change something. But I don't see the message |
Well, it was worth a shot. The error shouldn't come up if you use https://github.com/velinath/zabbixweb/releases/tag/v0.1-release, but it looks like that commit doesn't include functionality for apache or iis monitoring. Will do my best to look further next week. |
Indeed Andrew, I don't have any error with the v0.1. So my question would be solved. 👍 But, on this release:
Anyway thank you for your interest and replies. |
@vicendominguez After reading your original post in more detail, I think I know why you are getting only two servers. Sorry, I first replied in a rush. The dashboard is built essentially by two nested for each loops: the first one iterates the servers, and the second one iterates on the items returned for each server. If an error occurs while iterating for the items of a server, execution stops and the following servers in the first loop are not processed (this is a bug, mainly because we didn't do any exception handling yet). For some reason, the third server in the list returned by Zabbix is not coming back with any items. Why is this happening I can't tell as it would depend on your Zabbix setup. Maybe you can help us with the debugging. Can you set up a breakpoint in line 202 in your browser console, do a "step into" until line 204, and then analyse the values returned for If you compare the first and second host (that are working), with the third one (that is failing), maybe it would give you a hint of why the code breaks. It could be that the items for that host in particular are not the ones we expect. |
Ok.. line 202-205 seems ok in the three hosts i can see. But...my firsts two hosts do not satisfy this case. The third it does.
i think webtrigger is a array of objects here but after the "trigger.get" call, it has length=0 and if i try to print something in that breakpoint (i put two of them: lines 261 and 265) i got:
So sorry, perhaps this is not the best info but i am sysadmin and i am a little lost here. |
Can you check to see if there is a trigger configured on the relevant host that you're having trouble with, as well? If you go into the host and look at its triggers, the one that I'm specifically wondering about is anything from the "App HTTP Service" template, or any with an expression that looks like "{servername:net.tcp.service[http].max(#3)}=0". I don't think the absence of the trigger in Zabbix would affect it, but just to get the additional information might help us get to a solution faster. I just spun up a Zabbix 2.2 instance with my production servers and was able to duplicate this issue, FWIW. While that info's coming in, I'm working on a code-based solution as well. edit: It looks like this is actually related to #8 to some extent - one of the cases described there may be applicable. Implementing the old code works, but if we went that route we'd break other things. If necessary we can add an explicit version check in this case and use the old method for <2.4, but I'd prefer not to do that if at all possible. |
think I have solution, changed the conditional as follows: if(webtrigger[0] && webtrigger[0].status == 0 && webtrigger[0].value == 1) { @eburgueno do you see any harm in this one? if not I can commit it |
@velinath I don't see any issues with it. Good catch. |
Sorry for the delay, it is late here. I can confirm the "if" solves the issue. Thx guys! PS: But, so sorry, i have to open other ticket for the bad info on used ram memory value. |
Cool, thanks for confirming @vicendominguez. Memory is a tricky one, as different versions of Linux have different metrics, and in turn Windows servers are also different. "Used memory" means something different depending on the OS. But yes, open a new issue and we can have a look. |
Hey guys! and Andrew! Thanks for your work.
I was checking zabbixweb and I can see info for two host and after it breaks.
With the inspector:
Uncaught TypeError: Cannot read property 'status' of undefined(index):265 (anonymous function)jquery.min.js:2 m.extend.each(index):214 (anonymous function)jquery.min.js:2 m.extend.each(index):201 filterHostsAndOutput(index):164 (anonymous function)jquery.min.js:2 m.Callbacks.jjquery.min.js:2 m.Callbacks.k.fireWithjquery.min.js:2 m.extend.readyjquery.min.js:2 J
index.html affected line:
if(webtrigger[0].status == 0 && webtrigger[0].value == 1) {
thisHostObj.error = 1;
thisHostObj.errorText = 'Web service is down (httpd or IIS)';
I have a lot of servers but i see only two servers in the zabbixweb and there is not complete info.
Looking at the last json request i see:
Request:
auth: "c11d9359fd1fdd2935c0248336bf4381"
id: 3
jsonrpc: "2.0"
method: "trigger.get"
params: {host: "cos.xxxxx.net", itemids: "24177"}
host: "cos.xxxxx.net"
itemids: "24177"
Answer:
{"jsonrpc":"2.0","result":[],"id":3}
It seems a empty answer... but i don't understand why. No info in the zabbix_server log file.
UPDATE: mmm... may be this is not the last request after all.... mmm... i am lost.
Vicen
The text was updated successfully, but these errors were encountered: