PDA

View Full Version : Can't see any data comming up in frontend


marc1911
23-10-2007, 12:29
I'm still fighting to get zabbix to work on my virtual private linux machines (OpenVZ).

I hope that with the information in this thread anyone is able to help me. I'm very much committed to ge Zabbix to work, but I'm out any idea's! :confused:

From what I see when I test the operation of zabbix is that the agent and server do indeed communicate, but somehow the data isn't aggregated in MySQL. I can't see any data comming in under Zabbix Front End "Monitoring | Latest Data".

1) This are the tests I've done to conclude that communication is correct:

1.1) Check if SERVER sees the agent:
# netstat -an |grep :10051
tcp 0 0 192.168.2.208:10051 0.0.0.0:* LISTEN
tcp 0 0 192.168.2.208:10051 192.168.2.206:55211 TIME_WAIT

1.2) check if agent is working:
# zabbix_get -s php4.cellar.home -k system.hostname
php4.cellar.home

# zabbix_get -s php4.cellar.home -k system.localtime
1193133010

2) Remarks:
2.1) zabbix_sender not working. So maybe the server daemon isn't accepting any send requests from the agent?
# zabbix_sender -zzabbix.cellar.home -p10051 -sphp4 -ksystem.hostname -ophp4 -v
zabbix_sender [1574]: Warning: Incorrect answer from server [NOT OK]
sent: 0; failed: 1; total: 1

2.2) The zabbix configuration of the host "php4.cellar.home" in the frontend reports Availability "Unknown"
See attached image "zabbix-config-host1"

2.3) The queue details view in the front end says:
see attached image "zabbix-queue-details1"

2.4) The latest view under monitoring says (01.01.1970 01:00:00 I'm puzzled??):
see attached image "zabbix-latestdata1"

2.5) When I execute "zabbix_get -s php4.cellar.home -k system.hostname" on the server the log on the client shows it:


32666:20071023:121701 Before read
32666:20071023:121701 In parse_list_of_checks('ZBX_EOF
')
32666:20071023:121701 In disable_all_metrics()
32666:20071023:121701 Parsed [ZBX_EOF]
32666:20071023:121701 In process_active_checks('zabbix.cellar.home',10051)
32666:20071023:121701 In get_min_nextcheck()
32666:20071023:121701 Sleeping for 60 seconds
32663:20071023:121731 Processing request.
32663:20071023:121731 In check_security()
32663:20071023:121731 Requested [system.hostname]
32663:20071023:121731 Before
32663:20071023:121731 Run remote command [hostname] Result [16] [php4.cellar.home]...
32663:20071023:121731 Sending back [php4.cellar.home]


3) These are the logs:

SERVER:
32734:20071023:055824 Starting zabbix_server. ZABBIX 1.4.2.
32734:20071023:055824 **** Enabled features ****
32734:20071023:055824 SNMP monitoring: NO
32734:20071023:055824 WEB monitoring: YES
32734:20071023:055824 Jabber notifications: NO
32734:20071023:055824 **************************
32738:20071023:055824 server #1 started [Poller. SNMP:OFF]
32740:20071023:055824 server #2 started [Poller. SNMP:OFF]
32742:20071023:055824 server #3 started [Poller. SNMP:OFF]
32744:20071023:055824 server #4 started [Poller. SNMP:OFF]
32746:20071023:055824 server #5 started [Poller. SNMP:OFF]
32748:20071023:055824 server #6 started [Poller. SNMP:OFF]
32749:20071023:055824 server #7 started [Poller. SNMP:OFF]
32752:20071023:055824 server #8 started [Poller. SNMP:OFF]
32754:20071023:055824 server #9 started [Poller. SNMP:OFF]
32756:20071023:055824 server #10 started [Poller. SNMP:OFF]
32758:20071023:055824 server #11 started [Poller. SNMP:OFF]
32760:20071023:055824 server #12 started [Poller. SNMP:OFF]
32762:20071023:055824 server #13 started [Poller. SNMP:OFF]
32764:20071023:055824 server #14 started [Poller. SNMP:OFF]
32765:20071023:055824 server #15 started [Poller. SNMP:OFF]
32767:20071023:055824 server #16 started [Trapper]
1325:20071023:055824 server #17 started [Trapper]
1327:20071023:055824 server #18 started [Trapper]
1329:20071023:055824 server #19 started [Trapper]
1331:20071023:055824 server #20 started [Trapper]
1333:20071023:055824 server #21 started [ICMP pinger]
1335:20071023:055824 server #22 started [Alerter]
1337:20071023:055824 server #23 started [Housekeeper]
1337:20071023:055824 Executing housekeeper
1339:20071023:055824 server #24 started [Timer]
1341:20071023:055824 server #25 started [Poller for unreachable hosts. SNMP:OFF]
1343:20071023:055824 server #26 started [Node watcher. Node ID:1]
1345:20071023:055825 server #27 started [HTTP Poller]
1351:20071023:055825 server #28 started [Discoverer. SNMP:OFF]
32734:20071023:055825 server #0 started [Watchdog]
1337:20071023:055826 Deleted 0 records from history and trends

AGENTD:
32660:20071023:115559 zabbix_agentd started. ZABBIX 1.4.2.
32661:20071023:115559 zabbix_agentd collector started
32663:20071023:115559 zabbix_agentd listener started
32664:20071023:115559 zabbix_agentd listener started
32665:20071023:115559 zabbix_agentd listener started
32666:20071023:115559 zabbix_agentd active check started [zabbix.cellar.home:10051]
32666:20071023:115559 In init_active_metrics()
32666:20071023:115559 In refresh_metrics('zabbix.cellar.home',10051)
32666:20071023:115559 get_active_checks('zabbix.cellar.home',10051)
32666:20071023:115559 Sending [ZBX_GET_ACTIVE_CHECKS
php4
]


4) This is the Configuration:

4.1) Server (CentOS v5): zabbix.cellar.home / 192.168.2.208
4.2) Agent: (CentOS v4.4): php4.cellar.home / 192.168.2.206
4.3) Both hosted as Virtual Private machines in OpenVZ running in CentOS v4.4

4.4) /etc/services fo both SERVER & AGENTD:
zabbix_agent 10050/tcp #zabbix ports
zabbix_trap 10051/tcp #zabbix ports

4.5) SERVER ZABBIX config file /etc/zabbix/zabbix_server.conf:

NodeID=1
StartPollers=15
StartPollersUnreachable=1
StartTrappers=5
StartPingers=1
StartDiscoverers=1
StartHTTPPollers=1
ListenPort=10051
ListenIP=192.168.2.208
HousekeepingFrequency=1
SenderFrequency=30
#DisableHousekeeping=1
DebugLevel=3
Timeout=5
TrapperTimeout=10
UnreachablePeriod=45
UnavailableDelay=15
UnavailableDelay=60
PidFile=/tmp/zabbix_server.pid
LogFile=/tmp/zabbix_server.log
LogFileSize=2
AlertScriptsPath=/home/zabbix/bin/
#ExternalScripts=/etc/zabbix/externalscripts
FpingLocation=/usr/sbin/fping
PingerFrequency=30
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=test
#DBSocket=/var/lib/mysql/mysql.sock


4.6) AGENT ZABBIX config file /etc/zabbix/zabbix_agentd.conf:

Server=zabbix.cellar.home
ServerPort=10051
Hostname=php4.cellar.home
ListenPort=10050
ListenIP=192.168.2.206
StartAgents=5
RefreshActiveChecks=60
DisableActive=0
EnableRemoteCommands=1
DebugLevel=5
PidFile=/tmp/zabbix_agentd.pid
LogFile=/tmp/zabbix_agentd.log
LogFileSize=2
Timeout=10
####### USER-DEFINED MONITORED PARAMETERS #######
UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
UserParameter=mysql.version,mysql -V

So anyone?

Regards,

Marc

swaterhouse
23-10-2007, 14:30
Can you telnet from agent to server on port 10051?

Did you install an agent on the server as well? What happens with that agent when you monitor it?

marc1911
23-10-2007, 14:55
Yes I'm able to telnet from the agent to the server:

1) I did this:
# telnet zabbix 10051
Trying 192.168.2.208...
Connected to zabbix.
Escape character is '^]'.
quit
Connection closed by foreign host.

2) When I've the Agentd active on the server the log file shows up like this:

12158:20071023:084751 zabbix_agentd started. ZABBIX 1.4.2.
12159:20071023:084751 zabbix_agentd collector started
12161:20071023:084751 zabbix_agentd listener started
12162:20071023:084751 zabbix_agentd listener started
12163:20071023:084751 zabbix_agentd listener started
12164:20071023:084751 zabbix_agentd active check started [zabbix.cellar.home:10051]
12164:20071023:084751 In init_active_metrics()
12164:20071023:084751 In refresh_metrics('zabbix.cellar.home',10051)
12164:20071023:084751 get_active_checks('zabbix.cellar.home',10051)
12164:20071023:084751 Sending [ZBX_GET_ACTIVE_CHECKS
zabbix
]
12164:20071023:084751 Before read
12164:20071023:084751 In parse_list_of_checks('ZBX_EOF
')
12164:20071023:084751 In disable_all_metrics()
12164:20071023:084751 Parsed [ZBX_EOF]
12164:20071023:084751 In process_active_checks('zabbix.cellar.home',10051)
12164:20071023:084751 In get_min_nextcheck()
12164:20071023:084751 Sleeping for 60 seconds


I've executed the same tests as with the seperate agent (php4.cellar.home) and I see no differences.

Could there be an incompatibility between OpenVZ and Zabbix?
Can't seem to get zabbix_sender to work either?

any idea's left?

swaterhouse
24-10-2007, 14:31
Can you install, start and add an agent on the same host as the zabbix_server host? If so are you getting anything from that agent?

Edit:

I doubt OpenVZ has anything to do with it, you are running CentOS as the guest operating systems and they work fine with ZABBIX, there has to be something else going on.

I run ZABBIX within CentOS on both VMware Server (free version) and VMware ESX server and I know there are others using some of other virtualization tools.

marc1911
24-10-2007, 14:41
I've done that already see post of Yesterday 14:55 point 2).

Enabling the agent on the server doesn't make any difference. No data comming in either. I've already compiled, installed and configured Zabbix 1.4.1. But I've the same problem here.

Could it have something to do with this 1970 date issue in the queue?
I'm very much out of idea's right now. Hope you have some suggestions left?

Regards,

Marc

marc1911
25-10-2007, 10:44
Hi there,

Is there anyone how can help me getting Zabbix up and running?
In the meanwhile I've completly re-installed Zabbix from scratch!
Instead off having CentOS v5 as host for Zabbix I've used CentOS v4.4 as the host platform but still running as a VPS on OpenVZ. And what do you know??
It still isn't working!! I've followed the instructions on http://www.zabbix.com/wiki/doku.php?id=howto:centosinstall. Even if this wiki is missing some important instructions like:
1) adding the ports in /etc/services;
2) changing the /var/lock/subsys in the daemon startup file for the agent and server to a directory that's is writable to the Zabbix user
3) installing Fping because it fails by default on Centos v4

Furthermore I've tested communications between agent and server like described earlier in this thread and no problems here. So why isn't the frontend getting any data in the database???????? HELP HELP HELP

Regards,

Marc

JonB
25-10-2007, 12:20
Your screen shot of the host setup shows that you haven't selected a template for that host. You need to select a template, in your case Template_Linux template, otherwise you wont get any data as the agent doesn't know what metrics it should be monitoring.

Jon

JonB
25-10-2007, 12:26
Your screen shot of the host setup shows that you haven't selected a template for that host. You need to select a template, in your case Template_Linux template, otherwise you wont get any data as the agent doesn't know what metrics it should be monitoring.

Jon

marc1911
25-10-2007, 13:41
The problem is solved!
If you read my zabbix_server.conf file at point 4.5 in thread post "23-10-2007 12:29" it says "NodeID=1".
I need to make it "NodeID=0" to be able to retreive data.:) Yipeeeee!!!!!
Solved it myself.

Calimero
25-10-2007, 13:42
I see that your zabbix_server has NodeID=1.
Did you upgrade your database to "distributed monitoring mode" (zabbix_server --new-nodeid 1) ?

What if you create simplechecks (ping) instead of zabbix_agent items ?

Edit: you made the same mistake as I did ("Yeah let's define a NodeId despite this is a standalone server" :D)

marc1911
25-10-2007, 13:49
No I did't upgrade the database to "distributed monitoring mode". I just started with the so simple installation instructions and overlooked the fact that the NodeID needed to be set to 0 for a standalone server. But than again, this is easy overlooked because the remarks in the server configuration file says:

# This defines unique NodeID in distributed setup,
# Default value 0 (standalone server)
# This parameter must be between 0 and 999

And furthermore the standalone option isn't explained in the manual, so it was searching for a needle in a haystack if you ask me.:cool:

Calimero
25-10-2007, 13:52
I've wasted 2 days on this too. :o

Running zabbix_server in debug mode and then finding out in the code where that "host_id" condition came from, in the sql queries. :confused:

swaterhouse
25-10-2007, 14:28
I've followed the instructions on http://www.zabbix.com/wiki/doku.php?id=howto:centosinstall. Even if this wiki is missing some important instructions like:
1) adding the ports in /etc/services;
2) changing the /var/lock/subsys in the daemon startup file for the agent and server to a directory that's is writable to the Zabbix user
3) installing Fping because it fails by default on Centos v4


I am glad you got it working, I havent done anything with DM and never would have caught that one.

As far as the wiki instructions go feel free to edit them, below are some remarks on your comments.

1) this is not a critical step nor is it required - I tried to make the instructions as easy as possible

2) I never had to do this on any of my systems setup ith the instructions provided.

3) again not required for all installations and I was trying to make the instructions as easy as possible - maybe this can be added as an optional step.

Alexei
26-10-2007, 15:27
The Hostname must be set to 'test' in zabbix_agentd.conf to make active checks work.