[ZBX-4991] zabbix[host,<type>,available] received values for agent/jmx does not change when it should Created: 2012 May 11 Updated: 2017 May 30 Resolved: 2013 Feb 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.0rc3 |
Fix Version/s: | 2.0.6rc1, 2.1.0 |
Type: | Incident report | Priority: | Critical |
Reporter: | Corey Shaw | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 4 |
Labels: | internalmonitoring, server | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
RHEL 5.6 x64 |
Attachments: | zabbix_patch zabbix_server.log | ||||||||
Issue Links: |
|
Description |
I've run into a very odd situation through two different methods now where the results from the zabbix[host,<type>,available] key do not come back with the correct values. The problem this caused was that my triggers based on this particular check for agent/jmx availability were either going off or not going off when they should have. Here's the first example: 1. Create a host that is monitored by the Zabbix server and make sure values are received correctly (especially zabbix[host,agent,available] should equal "1"). In my case, the host was created through auto-registration. I then added the appropriate templates to it. The second way that I ran into this is described below: 1. Create a host that is monitored by the Zabbix server and make sure values are received correctly (especially zabbix[host,agent,available] should equal "1"). In my case, the host was created through auto-registration. I then added the appropriate templates to it. |
Comments |
Comment by Corey Shaw [ 2012 May 19 ] |
I continue to see this problem constantly in 2.0.0rc4. I just had 6 servers go offline and none of them are showing up in Zabbix with problems for zabbix[host,agent,available] and zabbix[host,jmx,available]. The value still comes in as "1" for both keys even though "Configuration"->"Hosts" shows the Zabbix and JMX interfaces as being down. |
Comment by Andrew Howell [ 2012 May 19 ] |
I have the same problem. It's fine for agents monitored directly via the server, but via proxies doesn't work. I reported this a while ago in |
Comment by Corey Shaw [ 2012 May 19 ] |
Nice to know I'm not alone in this. I assume this bug could be marked as a duplicate. This is definitely a show stopper for us. We were going to switch from Nagios to Zabbix for all our monitoring, but obviously can't do that if we can't even tell when a host goes offline. |
Comment by Darryl Baker [ 2013 Jan 15 ] |
I raised the logging to 4 and the agent (2.0.3) reports ZBX_NOTSUPPORTED back to the server(2.0.3). No proxies involved. Log excerpt below. This is from a Windows 2003 R2 Enterprise 32 bit server with PAE. 1156:20130114:152530.365 In collect_perfstat() |
Comment by richlv [ 2013 Jan 15 ] |
you are using incorrect item type. https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/internal |
Comment by Darryl Baker [ 2013 Jan 15 ] |
I am just following the documentation: zabbix[host,<type>,available] Return value: 0 (not available), 1 (available), 2 (unknown). This item is supported starting from version 2.0.0. |
Comment by richlv [ 2013 Jan 15 ] |
sure, but if that ends up on the agent, your item type is "zabbix agent" (or active). it must be "zabbix internal" |
Comment by Darryl Baker [ 2013 Jan 15 ] |
I really don't understand what you mean by that statement. The document says this is how you set up the test through the GUI. If it needs to be converted into a different form to query the agent shouldn't the server or the GUI do the translation? |
Comment by richlv [ 2013 Feb 08 ] |
what is selected in the "type" field for the item ? |
Comment by Darryl Baker [ 2013 Feb 08 ] |
The type field is agent. zabbix[host,agent,available] |
Comment by richlv [ 2013 Feb 08 ] |
no, item properties, "type" dropdown |
Comment by Darryl Baker [ 2013 Feb 08 ] |
"Zabbix agent" does it need to be "Zabbix agent (active)"? Is this a case of IBM? Idiot behind machine. I never thought to look for another type than "Zabbix agent". |
Comment by richlv [ 2013 Feb 08 ] |
it should be "zabbix internal", as noted in my comment on january 15th. also see https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/internal |
Comment by Maxim Tyukov [ 2013 Feb 12 ] |
Have the same bug, item key and type are correct. Zabbix version 2.0.2. |
Comment by richlv [ 2013 Feb 12 ] |
could somebody who have this problem create a new database with only single enabled host, single zabbix agent passive item and zabbix[host,agent,available] item, then run zabbix server with debuglevel4 and attach the resulting logfile (once the problem shows up) ? we just can't reproduce it so far... |
Comment by Leonid [ 2013 Feb 13 ] |
I have this problem. Some comments for log. testing - zabbix server There are 2 items: #1 {$MAX_UNREACHABLE_TIME} = 180 |
Comment by richlv [ 2013 Feb 13 ] |
err, this issue is about a single item only, please do not add other items or triggers |
Comment by Leonid [ 2013 Feb 14 ] |
zabbix[host,agent,available] is based on host.available field (2 - host.available). |
Comment by Leonid [ 2013 Feb 18 ] |
zabbix patch |
Comment by Leonid [ 2013 Feb 18 ] |
When zabbix server process host availability (process_host_availability()), it doesn't update cache - only zabbix database. So all subsequent checks (zabbix[host,<type>,available]) get data from not updated cache. It's a reason why zabbix[host,<type>,available] return wrong value. This patch forces zabbix server to update cache (DCconfig_deactivate_host()/DCconfig_activate_host()). |
Comment by Andris Zeila [ 2013 Feb 25 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4991 |
Comment by dimir [ 2013 Mar 11 ] |
(1) Compilation warnings: proxy.c: In function ‘process_host_availability’: proxy.c:1192: warning: implicit declaration of function ‘DCconfig_update_host_availability’ [...] poller.c: In function ‘activate_host’: poller.c:309: warning: implicit declaration of function ‘DCconfig_update_host_availability’ dimir more after the fix:
proxy.c: In function ‘process_host_availability’:
proxy.c:1065: warning: ‘available’ may be used uninitialized in this function
|
Comment by dimir [ 2013 Mar 11 ] |
Successfully tested. |
Comment by Andris Zeila [ 2013 Mar 12 ] |
Fixed in: |
Comment by dimir [ 2013 Jun 05 ] |
This fix introduced a regression |
Comment by Cristian Mammoli [ 2013 Oct 24 ] |
This bug still affects me from time to time, both with agent and snmp checks. [host,agent/snmp,available] returns 0 even if I the server is up until I restart zabbix_server Any hint on how to troubleshoot this? |