In a Linux system, almost all of the running services produce a relative log (log), and the running program will have errors in error, even if there is no prompt to see if the run was successful with "echo $". Using Zabbix has been around for some time, sorting out the problems encountered and solving the problem.
Zabbix log is stored in/tmp, the server side of the corresponding log is zabbix_server.log, the monitoring side of the corresponding log is zabbix_agentd.log.
First, whether the Zabbix service has been successfully opened
See if the system already has a Zabbix process running # PS aux |grep Zabbix to see if the system is listening on the 10050, 10051 ports used by Zabbix server and Zabbix agent # Netstat-nplut |grep za Bbix if not, turn on: #/etc/init.d/zabbix_server_ctl start #/etc/init.d/zabbix_agent_ctl start
It is important to note that each time a configuration file is modified, the corresponding Zabbix server or Zabbix Agentd will need to be restarted.
Partial run script cannot close Zabbix when doing restart, cause the service cannot restart, can kill the Zabbix related process by killing the command of kill to start again.
Second, the zabbix_server.log appears the hint
2009:20121023:193549.354 sending list of active checks to [192.168.30.3] failed:host [CentOS-3] not found
This is because the hostname in the zabbix_agentd.conf configuration file corresponds to the host name in the Web.
650) this.width=650; "Width=" "class=" Zoom "id=" aimg_56148 "src=" http://www.iyunv.com/data/attachment/forum/ 201410/14/130526lvuktv43jisuvvp8.jpg "alt=" 130526lvuktv43jisuvvp8.jpg "/>
1.jpg (89.63 KB, download number: 5)
Download attachments to albums
2014-10-14 13:05 Upload
Third, the error occurred in the webpage
(1)
650) this.width=650; "Width=" "class=" Zoom "id=" aimg_56147 "src=" http://www.iyunv.com/data/attachment/forum/ 201410/14/130525vgpm008hp2bp9pk3.jpg "alt=" 130525vgpm008hp2bp9pk3.jpg "/>
2.jpg (50.32 KB, download number: 1)
Download attachments to albums
2014-10-14 13:05 Upload
| Get value from Agent Failed:cannot connect to [[192.168.30.2]:10050]: [111] Connection refused |
192.168.30.2 is my Zabbix server server, which itself also has the ability to monitor its own agent. This error occurs because you forgot to open an account on the Zabbix server zabbix_agentd. There are also hints in last issues
| Host |
Issue |
Last change |
Age |
Ack |
Actions |
| Zabbix Server |
Server Zabbix Server is unreachable |
OCT 2012 18:42:14 |
6m 57s |
No |
|
Workaround: Turn on ZABBIX_AGENTD.
(2)
650) this.width=650; "Width=" "class=" Zoom "id=" aimg_56146 "src=" http://www.iyunv.com/data/attachment/forum/ 201410/14/130524ard3euuwu2vwfr2z.jpg "alt=" 130524ard3euuwu2vwfr2z.jpg "/>
3.jpg (29.34 KB, download number: 1)
Download attachments to albums
2014-10-14 13:05 Upload
| Get value from Agent Failed:cannot connect to [[192.168.30.3]:10050]: [113] No route to host |
See the hint "No route to host", related to network connection. The following methods are excluded:
A) Check to see if the machine is powered on 192.168.30.3
b) Ping the machine on the Zabbix server to see if the network is
c) Log in to Port 10050 and 10051 with telnet to see if the host allows the two ports to communicate
D) See if the iptables firewall rule blocks 10050, 10051 ports
(3)
650) this.width=650; "Width=" "class=" Zoom "id=" aimg_56145 "src=" http://www.iyunv.com/data/attachment/forum/ 201410/14/130523a30cjozelz4lav03.jpg "alt=" 130523a30cjozelz4lav03.jpg "/>
4.jpg (94.98 KB, download number: 1)
Download attachments to albums
2014-10-14 13:05 Upload
The following red hints are kept in the Web page:
Zabbix server is not running:the information displayed could not be current.
Zabbix encountered the above problem
Can start from the following aspects of inspection, of course, first check the log, if you do not want to check the log, first check whether the following items are normal
1. If SELinux is closed.
2. Zabbix the web directory below $ZBX whether _server is IP, if localhost,ping under LocalHost can parse.
3. See if PHP's Fsockopen module is enabled.
Zabbix Server is running | No.
See/tmp/zabbix_server.log and/tmp/zabbix_agent.log without any exceptions. See Zabbix_server and Zabbix_agent process, ports are normal ... After a few Google and try to finally get the solution!
Http://www.zabbix.com/forum/showthread.php?t=23878&page=3 this has to say that Zabbix is affected by SELinux has this error.
Http://www.zabbix.com/forum/showthread.php?t=25321 This has been said to modify the hostname for the IP approach.
My specific practice is to:
① view the log generated by SELinux, there are indeed error prompts:
#tail-F/var/log/audit/audit.log
TYPE=AVC Msg=audit (1351863204.990:32): avc:denied {name_connect} for pid=1575 comm= "httpd" dest=10051 scontext=syste M_u:system_r:httpd_t:s0 Tcontext=system_u:object_r:port_t:s0 Tclass=tcp_socket
Type=syscall Msg=audit (1351863204.990:32): arch=40000003 syscall=102 success=no exit=-13 a0=3 a1=bfd494b0 A2=b76b0ad8 a3=d items=0 ppid=1434 pid=1575 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm= "httpd" exe= "/usr/sbin/httpd" Subj=system_u:system_r:httpd_t:s0 key= (NULL)
② then let SELinux allow it to pass
Setsebool-p Httpd_can_network_connect on
③ Edit the zabbix.conf.php file, change the value of $zbx_server to the IP address of the native computer
$ZBX _server = ' 192.168.30.2 '; ###### #用IP代替hostname
④ok
Four
Tail/tmp/zabbix_server.log Display
50952:20141012:195519.884 One child process died (pid:51233,exitcode/signal:255). Exiting ...
Indicates a child process is dead, is a Zabbix memory overflow error (this error also causes the red flashing above)
Correct:
Five, Tail/tmp/zabbix_server.log display
2552:20141012:211700.552 [Z3001] connection to database ' Zabbix ' failed: [1040] Too many connections
Because the number of connections to the database is more, MySQL default connection number is 100, generally set to 500~1000 more appropriate, we can adjust this value: Modify/etc/my.cnf This file, in [mysqld] added max_connections=1000
Then restart MySQL and Zabbix_server zabbix_agent
User-definable script monitoring:
A
Sometimes user-defined scripts may run longer, such as more than 10 seconds of 20 seconds. At this point when the execution of Zabbix_agentd-p or zabbix_agentd-t may appear "Alarm clock", so as not to get the desired results. This is because the timeout time defined in the Zabbix agentd configuration file defaults to 3 seconds, which occurs when the script runs for more than 3 seconds.
Workaround: Edit the configuration file/etc/zabbix/zabbix_agentd.conf, and find "Timeout" to define it as 30 seconds or less than 30 seconds.
b
The situation in a also requires attention to the configuration of the Zabbix server side, such as my own defined script
userparameter=ping.avgtime,ping 192.168.30.2-c 10-w |grep ' avg ' |awk-f '/' ' {print $} ' on 192.168.30.2 Ping 10 averaging,-W The parameter is 29 seconds for the ping time limit
This script will run about 10 seconds, at this time, although the agent can be used to zabbix_agentd-t results, but the Zabbix server-side logs are constantly appearing
1762:20121023:191941.360 resuming Zabbix agent checks on host [Zabbix Server]: Connection restored
1761:20121023:191952.149 Zabbix Agent Item [Ping.avgtime] on host [CentOS-3] Failed:first network error, wait for the Seco Nds
1762:20121023:192010.610 Zabbix Agent Item [Ping.avgtime] on host [CentOS-3] Failed:another network error, wait for the SE Conds
1762:20121023:192028.628 Zabbix Agent Item [Ping.avgtime] on host [CentOS-3] Failed:another network error, wait for the SE Conds
Such an error log, and there is no drawing on the web side.
Workaround:
① edit Zabbix Server-side configuration file/etc/zabbix/zabbix_server.conf find "Timeout" to define it as 30 seconds or less than 30 seconds.
② If there is a similar hint, it should be that the memory of the Zabbix server is set too small, and the server memory will be increased.
Zabbix Monitoring software Usage troubleshooting