[ZBX-4230] Zabbix agent 1.8.2 returning system uptime of 0 Created: 2011 Oct 12 Updated: 2017 May 30 Resolved: 2011 Oct 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Joel | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | agent | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian Squeeze (full updates) running on OpenVZ (using Proxmox) with 2.6.32-6-pve kernel. zabbix-agent installed using apt |
Description |
Ever since I rebooted my system a week ago both of my OpenVZ VMs are reporting a constant system.uptime of 0, even when they have been running for 5+ days. Have tried rebooting both the agent and the VM. Cannot reboot the physical box as there are other critical services running on it. Using zabbix_get from the site's proxy reports a system.uptime of 0 but other values are working correctly. Running 'uptime' from the command prompt gives me the correct output. I don't understand why it stopped working. Please help. |
Comments |
Comment by Viktors Kohanovskis (Inactive) [ 2011 Oct 14 ] |
Hi Joel. From which source you installed them via apt? Point please also on OpenVZ host OS, do you updated recently OpenVZ kernel or tools (If yes - from which kernel/tools version)? Thx in advances. |
Comment by nelsonab [ 2011 Oct 14 ] |
This issue came up on IRC today with 1.8.8. The person said the host in question was a Linux guest on a KVM server. The other guests however did not have an issue. To help track down issues like this in the future I would suggest adding a debug level statement to the process function. Specifically within the section where the command get's executed (lines 440-482 in src/libx/zbxsysinfo/sysinfo.c on 1.8.8). Presently there is no way to see what values are returned from the various functions before they are converted to/from text for sending to the Zabbix server, only the result after the text conversion. Adding a debug level statement in here may help to debug future issues which are similarly difficult to track down. |
Comment by Joel [ 2011 Oct 14 ] |
Here is my /etc/apt/sources.list: deb http://ftp.debian.org/debian squeeze main contrib deb http://ftp.debian.org/debian squeeze-updates main contrib deb http://security.debian.org squeeze/updates main contrib The last time I updated vzctl/vzdump was Sept 30, 2 weeks before problems showed up. Same with the kernel - old version was pve-kernel-2.6.32-4-pve_2.6.32-33_amd64.deb, current version is pve-kernel-2.6.32-6-pve_2.6.32-43_amd64.deb |
Comment by Viktors Kohanovskis (Inactive) [ 2011 Oct 17 ] |
Joel, can you follow nelsonlab advices and add debug level also in zabbix_agent.conf? |
Comment by Aleksandrs Saveljevs [ 2011 Oct 17 ] |
Just wish to point out that increasing DebugLevel to 4 is unlikely to help. The function for obtaining "system.uptime" on Linux boils down to a single system call: sysinfo(&info). The value returned by that system call in info.uptime is then propagated unchanged (at least that is how it should be) to higher levels. What we could do is prepare a patched version of the agent for you that provides more information about that system call and its returned value. |
Comment by Joel [ 2011 Oct 17 ] |
Never mind. I just ran an strace on the program; turns out sysinfo is returning an uptime of 0 as well as loads of {0, 0, 0}. Totally not your guys' code at all. Thanks for the help. Should I update this thread if I get a solution from the OpenVZ guys? |
Comment by richlv [ 2011 Oct 17 ] |
thanks, closing. any additional information might help somebody else, so you are welcome to add it |
Comment by Mattias Geniar [ 2012 Feb 17 ] |
While the problem is indeed located at the OpenVZ kernel at this point (bugreport: http://bugzilla.openvz.org/show_bug.cgi?id=2051), it may be worthwhile implementing the uptime to come from /proc/uptime? |